Thread: My First Game!

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    1
    Rep Power
    0

    Lightbulb My First Game!


    Hey guys this the first game I made in python!
    I WAS SO EASY I

    Here is the source:
    -------------------------------------------------------------
    # My first PYTHON PROGRAM!
    import time
    # Made by Auni38!

    print ('Hey wake up! Whats happend to you?')
    print ('Whats your name?')
    myName = input()
    print ('Ok but just stand up please, ' + myName + '.')
    print ('What happened to you ' + myName + '?')
    myCat = input()
    print ('Really? You ' + myCat + '?')
    print ('Wow, how do you feel about that?')
    myFeeling = input ()
    print ('That was your feeling?: ' + myFeeling)
    print ('Lets just go into a bar ' + myName +', my friend!' + 'YES or NO?')
    usr_input = ''
    while usr_input not in ['YES', 'NO']:
    usr_input = input("Input: ")
    if usr_input == 'YES':
    print ('Then lets go!')
    print ('You go to a bar with him. The bars name is "ROOT IN A BEER".')
    print ('Your friend says "What drink do you want?"')
    myDrink = input ()
    print ('2 glass of ' + myDrink + ' please!')
    print ('You have a great time and you eventually started living in the village!')
    print (' THE END ')
    time.sleep(10)
    if usr_input == 'NO':
    print ('Ok so bye!')
    print ('You see a little hut in the village.')
    print ('You go into the hut.')
    print ('You see there is nobody in the hut.')
    print ('Suddenly somebody appears!')
    print ('"Hey you! Yes you, ' + myName + '! If you are clever, tell me, what is 3x3 equal to?')
    answer = input ('Answer: ')
    if answer == ('9'):
    print ('You have won ' + myName + '!')
    time.sleep(1)
    print ('As a reward here is 5 gold bars for you!')
    print ('You happily run out of the house and go to a real estate merhcant')
    print ('near the hut!')
    time.sleep(1)
    print ('He asks you "What kind of house do you want?')
    time.sleep(1)
    print ('Small')
    time.sleep(1)
    print ('Fancy')
    time.sleep(1)
    print ('Big or')
    time.sleep(1)
    print ('Normal?')
    time.sleep(2)
    buy = input ('Buy: ')
    if buy == ('Small'):
    print ('You buy the house and you live hapily ever after!')
    print (' THE END ')

    if buy == ('Fancy'):
    print ('You buy the house and you live hapily ever after!')
    print (' THE END ')
    time.sleep(10)

    if buy == ('Big'):
    print ('You buy the house and you live in it.')
    time.sleep(2)
    print ('But one day when you were not looking somebody shot you and')
    print ('took your house! You were wrong to take such a big house!')
    time.sleep(2)
    print (' THE END ')
    time.sleep(10)

    if buy == ('Normal'):
    print ('You buy the house and you live hapily ever after!')
    print (' THE END ')
    time.sleep(10)

    else:
    print ('You decided not to buy a house and you decided to buy the whole village!')
    time.sleep(2)
    print ('You gave him the 5 gold bars and bought the whole village!')
    print ('Then you slowly develop the village and turn it into a city!')
    time.sleep(3)
    print ('You soon die away as a good legend in the city!')
    time.sleep(1)
    print (' THE END ')
    time.sleep(10)
    else:
    print ("WHAT?! You think it's " + answer + " ?")
    time.sleep(2)
    print ('Suddenly he takes a gun and...')
    time.sleep(2)
    print ('SHOOTS YOU!')
    time.sleep(2)
    print (' THE END ')
    time.sleep(10)
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,997
    Rep Power
    481
    White space is a critical element of python syntax. Please post code according to the instructions in the link at my signature. And congratulations!
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo