test my skills
Okay. Here's a bit of a challenge for you (nothing fancy, for a better challenge, learn Unity, or even Unreal Engine).
I'd like you to make a dungeon crawler game.
You have an N x M sized dungeon, where every cell can be either:
- an impenetrable wall
- a path, where you can move
- a treasure that can be collected
- a trap that deals damage to your hero
- a monster that can be fought
- and entrance/exit where the hero enters and leaves the dungeon. One and only one such cell must exist in the dungoen.
At any given cell it is known what the neighboring cells contain, so a decision can be made on which way to go.
A hero has
- HP that can take damage when fighting a monster
- a weapon that can be used to fight monsters
- up to P number of potions that can be used to restore health
- to enter and exit via the only entrance to the dungeon.
Make a game, where a hero with certain HP, weapon and P number of potions enters the dungeon and tries to gather as much treasure as possible without dying.
Various weapons should have various damage properties.
Monsters should have HP and damage too. You can add more monsters if you wish.
For a challenge the hero should be a bot, it should be controlled by your code (AI, if you prefer), not by player actions, and everything should be automated. As mentioned above, a hero knows what's in all 4 directions of the current cell, so they can make a decision on what to do, which direction to continue their journey.
You may log to the screen what actions have happened.
- Hero entered cell (4, 5): empty
- Hero entered cell (4, 6): trap
- Hero took damage from tap: HP reduced by 25 to 75.
- Hero entered cell (5, 6): Treasure
- Hero collected 100 gold: total gold collected 750
- Hero entered cell (6, 6): Monster
- Hero took damage from monster: HP reduced from 75 to 16. Hero killed the monster.
- Hero drank a potion. HP increased from 16 to 66. 2 Potions left
Sounds challenging enough? Good luck!