Create Your Own Adventure Game with Python

Create Your Own Adventure Game with Python

2019-02-07T16:59:28+09:00 Feb 7, 2019|Tinker Stories|0 Comments

So what’s an adventure game?

It’s a computer/video game in which the player is the main character and he or she explores an interactive story by making decisions.

 

Myra, age 14, developed her own adventure game called the “Prison Break.”

This is her story:

Welcome to the Myra’s Adventure game

You are trying to escape from jail

You either escape through the underground water passage or the back gate

Do you want to escape through the passage (p) or the back gate(G)

 

To plan her code, she first began by making a flowchart.

This process helped her to plan her mission and to identify her problem-solving steps clearly.

 

 

When programming using Python, Myra gave the player control of what happens next by
setting conditions using if else statements:

 

For example:

if choice== “y”:

  print (“you’re jail sentence is reduced by a year”)

  print (“and you’re case is closed”)

if choice3==“i”:

  print (“the witnesses say the truth in court”)

  print (“you’re sentence is increased”)

 

Let’s check out her script.

  

 

See her entire game below!

 

 

Leave A Comment