Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

What starter game should I make

+9 votes
asked Jan 5, 2023 by Max Jian (730 points)
I’ve quite familiar with C++ and I want to try and make a new game to test my skills - I’m not sure what I want to make and can make. Pls help

2 Answers

0 votes
answered Jan 6, 2023 by Peter Minarik (84,720 points)
edited Jan 6, 2023 by Peter Minarik

quite familiar

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:

  1. an impenetrable wall
  2. a path, where you can move
  3. a treasure that can be collected
  4. a trap that deals damage to your hero
  5. a monster that can be fought
  6. 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

  1. HP that can take damage when fighting a monster
  2. a weapon that can be used to fight monsters
  3. up to P number of potions that can be used to restore health
  4. 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.

E.g.:

  • 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!

commented Jan 6, 2023 by Max Jian (730 points)
Thanks for the super detailed answer. I might even send the code to you ; )
commented Jan 6, 2023 by Peter Minarik (84,720 points)
Yes, please. Share your code via OnlineGDB!
0 votes
answered Jan 16, 2023 by Julia Ameera (140 points)
You can try creating text-based WORDLE using C or C++
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...