Ben Evans University Second Year Project. Game Called Defender.

Dependencies:   mbed

https://os.mbed.com/media/uploads/evanso/84bc1a30759fd6a1e3f1fd1fae3e97c2.png

Hello, soldier, you have been specially selected as the defender of planet earth.

Your mission, if you choose to accept it. Fly around the planet and pulverise invading alien ships for as long as you can. Stop the aliens abducting the innocent people on the ground. Be warned if an alien ship manages to abduct a person and take them to top of the screen, they will no longer move randomly and will begin to hunt you down. This sounds like a challenge you were trained for.

But don’t worry soldier you’re not going into battle empty-handed. Your ship is equipped with a state of the art laser beam that has unlimited ammo and four smart bombs that will destroy anything on the screen. The ship also has three lives so use them wisely.

As time goes on more alien ships will arrive on planet earth increasing the difficulty of your mission. And remember the landscape bellow loops around so if you continually fly in the same direction you go to your original position. Good luck soldier.

Committer:
evanso
Date:
Thu Apr 16 16:25:53 2020 +0000
Revision:
6:12e8433382b3
Child:
7:0af4ced868f5
Restricted spaceship movement to middle third of the screen in the x-direction. Started adding drawing functions to map class.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
evanso 6:12e8433382b3 1 #ifndef MAP_H
evanso 6:12e8433382b3 2 #define MAP_H
evanso 6:12e8433382b3 3
evanso 6:12e8433382b3 4 // Include libraries
evanso 6:12e8433382b3 5 #include "mbed.h"
evanso 6:12e8433382b3 6 #include "N5110.h"
evanso 6:12e8433382b3 7 #include "Gamepad.h"
evanso 6:12e8433382b3 8
evanso 6:12e8433382b3 9
evanso 6:12e8433382b3 10 /** Map class
evanso 6:12e8433382b3 11 @brief Draws and moves map
evanso 6:12e8433382b3 12 @author Benjamin Evans, University of Leeds
evanso 6:12e8433382b3 13 @date April 2020
evanso 6:12e8433382b3 14 */
evanso 6:12e8433382b3 15
evanso 6:12e8433382b3 16 class Map {
evanso 6:12e8433382b3 17 public:
evanso 6:12e8433382b3 18 /** Constructor */
evanso 6:12e8433382b3 19 Map();
evanso 6:12e8433382b3 20
evanso 6:12e8433382b3 21 /** Destructor */
evanso 6:12e8433382b3 22 ~Map();
evanso 6:12e8433382b3 23
evanso 6:12e8433382b3 24 /** Initalises Spaceship */
evanso 6:12e8433382b3 25 void init();
evanso 6:12e8433382b3 26
evanso 6:12e8433382b3 27 /** Draws triangle to represent a mountain
evanso 6:12e8433382b3 28 * @param LCD object
evanso 6:12e8433382b3 29 */
evanso 6:12e8433382b3 30 void draw_triangle(N5110 &lcd);
evanso 6:12e8433382b3 31
evanso 6:12e8433382b3 32 private:
evanso 6:12e8433382b3 33 int position_x_map_;
evanso 6:12e8433382b3 34 int position_y_map_;
evanso 6:12e8433382b3 35 };
evanso 6:12e8433382b3 36
evanso 6:12e8433382b3 37 #endif