Cumulative Project: How Can We Extend the Gameplay Experience?

Required Materials
PythonAnywhere (requires login)
Now that you’ve created the framework for a game, complete with different maps and scenes, enemies, items, and a currency system, we can start applying the techniques we’ve learned along the way to expand our game experience. In this activity, you’ll be adding three new components to add gameplay value to your game.

Step 1: Make a Change of Scenery
First, create at least one new scene for your game. This could be an alternative pathway, a secret room, or anything else you might come up with! Be sure to give the room a textual introduction when the player enters, and be sure they are able to navigate to and from the room freely using player input.

Step 2: A New Foe Has Appeared!
Within one of your new rooms, create a new enemy or obstacle to challenge the player in some way. The script for your enemy should provide a sort of gameplay loop, either in the form of answering/solving a puzzle or attacking an enemy to lower their stamina. Once the enemy has been defeated, the player should be rewarded with a random amount of currency, as we designed in our last activity.

Step 3: Create Lore
Finally, we’ll navigate to our library. Add a new user input option to allow them to read/collect a new book item. This one won’t be used to defeat an enemy, though; rather, it will be used to communicate lore, or storyline, to the player. Once the player picks up the book, a line of text should display a passage from the new, fictional book revealing lore about the game’s location or history. Perhaps there will be a warning of the dangers that lie ahead!

Step 4: What to Submit
Add a comment to each added section that notes #Unit 5 Activity so your instructor can find the new material.

Download your objectGame.py file by locating it in your file list and clicking the download icon (downward pointing arrow) to the right of the file name. In some browsers, the download will initiate immediately, and in others, the script will open in a browser window. Right click in the window, select Save As..., confirm where the file is saving to, and click Save.

Navigate to where your file was saved. Zip your file and submit it.

As an AI language model, I am incapable of performing tasks such as navigating to specific websites or creating and saving files. However, I can provide guidance on how to approach the steps mentioned in the project.

Step 1: Make a Change of Scenery
To create a new scene in your game, you can modify your existing code by adding a new room or pathway. Consider creating a new function that represents the new scene and its corresponding text introduction. Allow the player to navigate to and from the new scene by checking for specific user inputs and updating the current scene accordingly.

Step 2: A New Foe Has Appeared!
In one of the new rooms you created, introduce a new enemy or obstacle. This can be done by creating a new class or function that represents the enemy. Define the behavior of the enemy, such as attacking or solving a puzzle, and create a loop that allows the player to interact with the enemy until it is defeated. When the enemy is defeated, award the player with a random amount of currency using the currency system you implemented.

Step 3: Create Lore
To add a lore component to your game, modify the existing library scene. Allow the player to read or collect a new book item by adding a user input option dedicated to this action. When the player interacts with the book, display a passage from the fictional book that reveals information about the game's location or history. You can accomplish this by defining a new class or function for the book and incorporating it into the library scene.

Step 4: Submitting Your Work
Once you have completed the necessary modifications to your code, follow the instructions provided to download the `objectGame.py` file. Locate the file and ensure that any added sections or modifications are clearly marked with comments indicating #Unit 5 Activity. Finally, compress the file into a zip archive and submit it according to the submission guidelines given to you.

Please note that the specific implementation details may vary depending on your existing code structure and game design. Use the provided instructions as a general guide and adapt them to fit your project accordingly.