Final Project for HKU ENGG1340 Spring 2022
Group 83
Group Members: Davin Wu, Yeung Wong
Turn-based game with cards. Player would control a prisoner in the dungeon, fighting against various monsters in order to escape from the dungeon.
Players would initPlayer with 5 skill points, they can use them on either attack/defense/HP/, each skill point brings a benefit of +1.
All actions in the game are controlled through text-based commands through std::input
. All output from the program will be from std::output
- Dynamic memory management will be used when dealing with user input
There are a total of 3 paths with the same number of stations, randomly generated by the program. Players should choose one of them to initPlayer the game. There are 4 types of station, shop/campfire/Opportunity/Monster, and the player is able to see what station it is in each Path.
- Data structure will be used to store the position of the player
When stepping on a monster station, combat would be started. Players would draw 5 cards from the card library, and use them according to the card type. Those cards that haven’t been used would be reorganized into the library. Each card has its own cost of spirit, players initPlayer with 3 spirit each round (if no skill point is added to it).
- Randomness in monster generation, rewards generation
- Data structure (inventory) will be utilized
- Game state (inventory) will be serialized to the disk incrementally
- Dynamic memory management to clean up game state after each battle has been completed
Players can buy new cards
- Game state (inventory) will be serialized to the disk
One skill point is added and the player is able to reallocate their skill points here
A random incident would be generated, different choices are provided and the player is able to choose one of them. Each one would have its pros and cons.
- Randomness in incident generation
- make demo
- run ./demo.o Once the game has started, press the enter key to traverse the game. You can type /help to get a list of commands which can be used
- start (Background information, skill point allocation)
- Path generation, 3 lists with 10 nodes each
- Player moves along path
- Player run commands to perform actions at each path
- Player wins the game
All files are under src
- demo.cpp (The entry point of the program)
- playerinfo.h (Includes the basic structs and classes for the player's data alongside methods needed to perform each path type)
- Data structures
- Randomness
- utils/game.h and game.cpp (Include the game client which controls the flow of the program)
- Dynamic memory management
- utils/command.h (Includes all the commands which the player can run during the lifecycle of the game)
- utils/cardtemplates.h (Include all the card templates which make up cards)
- utils/battle.h battle.cpp (Includes stucts and a handler for battles)
- campfire.cpp (Let player decide if heal HP or allocate one more skill point)
- shop.cpp (Provide new cards that player can buy)
- Randomness
- random_event.cpp (Provide a special effect to the player, either positive or negative)
- utils/database.h and database.cpp (Includes database functionality to save the state of the game)
- Game state / io