I am trying to implement “2D Maze” in C++ to solve the following
1. load a file containing a 2d array of 10 by 20, with items for walls, corridors and enemies
2. The player is represented by an instance of a Player class (you create) that either inherits from sf::Sprite or has a sf::Sprite object as a member variable. The player character is drawn as a sprite that moves left, right, up and down along the corridors. The player cannot walk through walls. The player moves from one grid position into the adjacent one. The player moves from one grid position to the next and must not move too fast.
3. You must use sf::Text to display the player’s lives and scores.
4. Each enemy is represented by an instance of an Enemy class (you create) that either inherits from sf::Sprite or has a sf::Sprite object as a member variable.
The enemies are stored as an array of Enemy objects.
At the start of each game the enemies are randomly placed in the corridors (anything that’s not a wall). The enemies cannot be placed on a grid position that already contains a player or another enemy. The enemy randomly chooses a direction to move. If there isn't a wall in its way it will move into to the next grid position, the enemies must not move too fast.
When an enemy dies it is brought back to life and is repositioned in a random corridor, not on top of the player or another enemy.
5. The bomb (only 1 bomb) is represented by an instance of a bomb class (you create).
The player can drop a bomb; the bomb has a fuse of 3 seconds. During this time the player cannot change the bombs position. When the bomb explodes it, it explodes in 8 directions, the diagonals and left, right, up and down. This explosion is instantaneous, it destroys any enemy or player within a distance of 4 grid tiles in those directions. The bomb however cannot go through the walls i.e. a player or enemy with a wall between it and the bomb will be unaffected. The player’s score is increased for each enemy destroyed.
6. Winning and Losing
A player wins when a set number of enemies (e.g. 10) have been destroyed. The game is lost when the players lose all their lives.
7. If the player collides (intersects) with an enemy, the player loses a life. If the player loses all lives, a “Game over” sprite is shown.
14 freelancere byder i gennemsnit $205 på dette job
Hi, I'm c/c++ exporter. I have plenty of knowledge for completing your project. If you hire me, you'll get best results. Thank you for your visiting.
Dear client. I've read your project description carefully and very interested. Let's discuss over chat and get started. Waiting your reply. Best regards.