Question: Hello, I'm trying to build a text-based game using Python. My theme is the player is searching an old mansion, like the original resident evil

Hello,

I'm trying to build a text-based game using Python. My theme is the player is searching an old mansion, like the original resident evil game. Starting at the front foyer I want the player to search through the mansion collecting all of the items before finally encountering the main villain the zombie in the final room. If they fail to collect all of the items they die. I'm trying to create pseudocode or a flow chart that will act as my guide when creating the python code. Any ideas what either of these may look like? I posted the room/item layout I'm going for below as well as some expected outputs might look like. Since I'm new to coding it would be beneficial if there could be separate flow charts or pseudocodes for moving around the rooms and for picking up items that way I can follow along easier. Any help or guidance would be greatly appreciated!

Hello, I'm trying to build a text-based game using Python. My theme

Zombie Mansion Text Adventure Game

Collect 6 items to win the game, or be eaten by the zombie.

Move commands: go South, go North, go East, go West

Add to Inventory: get 'item name'

You are in the Main Hall

Inventory : []

---------------------------

Enter your move:

go North

You are in the Conservatory

Inventory : []

You see a Knife

---------------------------

Enter your move:

get Knife

Knife retrieved!

You are in the Conservatory

Inventory : ['Knife']

---------------------------

Enter your move:

get First Aid Kit

Can't get First Aid Kit!

You are in the Conservatory

Inventory : ['Knife']

---------------------------

Enter your move:

go South

You are in the Main Hall

Inventory : ['Knife']

---------------------------

Enter your move:

go East

You are in the Basement

Inventory : ['Knife']

You see a Key

---------------------------

Enter your move:

Key

Invalid Input!

You are in the Basement

Inventory : ['Knife']

You see a Key

---------------------------

Enter your move:

get Key

Key retrieved!

You are in the Basement

Inventory : ['Knife', 'Key']

---------------------------

Enter your move:

go South

You can't go that way!

You are in the Basement

Inventory : ['Knife', 'Key']

---------------------------

Enter your move:

go North

You are in the Secret Lab

Inventory : ['Knife', 'Key']

You see a Zombie NOM NOM...GAME OVER! Thanks for playing the game. Hope you enjoyed it.

East Conservatory Cemetery Item: Knife Item: First Aid Kit West North South Secret Lab Zombie! Front Foyer East Main Hall Item: Backpack North South West East Basement Item: Key West North South Kitchen East Bedroom Item: Body Armor Item: Gun West East Conservatory Cemetery Item: Knife Item: First Aid Kit West North South Secret Lab Zombie! Front Foyer East Main Hall Item: Backpack North South West East Basement Item: Key West North South Kitchen East Bedroom Item: Body Armor Item: Gun West

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!