Python Forum
Simple Game - Choice Based
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple Game - Choice Based
#1
I am very very new to python and trying to make a simple game where you type a choice and something happens depending on the choice but I'm not quite sure how to start as I dont really understand how to do it at all.
Im not even sure if im using the forum correctly- bear with me please
Reply
#2
If your question is unrelated to a current thread, it's best to start a new thread. I've split your question off into it's own thread for you :)

Your question isn't really specific, but what you're explaining can be handled through user input (https://docs.python.org/3/library/functions.html#input), and branching based on the result of that input (https://docs.python.org/3/tutorial/contr...statements)

As a simple example, take a look at this:
print("The tunnel splits here.  Do you want to go left (1), or right (2)?")
choice = None
while choice not in ("1", "2"):
    choice = input("1|2: ")

if "1" == choice:
    print("You go left.  You find a fountain granting eternal life.")
elif "2" == choice:
    print("Being bold, you head right.  There's a bowl of candy!")
Reply
#3
You might also want to check out my text adventure tutorial.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#4
Hey
I am new like u..
I choosed Renpy
u might check
more python
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Simple game help jarettday 1 3,940 Sep-07-2020, 10:45 PM
Last Post: bowlofred
  Adding an inventory and a combat system to a text based adventure game detkitten 2 6,873 Dec-17-2019, 03:40 AM
Last Post: detkitten
  Trying to make a simple pong game. kevindadmun 1 3,904 Aug-05-2019, 06:39 AM
Last Post: kevindadmun
  simple pygame game kinglarry0327 0 8,905 Jan-06-2019, 06:18 PM
Last Post: kinglarry0327
  Text Based Game DuaneJack 3 3,546 Aug-15-2018, 12:02 PM
Last Post: ichabod801
  Simple Digimon Game - Suggestions Welcome prog92 2 4,357 Jun-01-2017, 09:53 PM
Last Post: prog92

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020