Joe Body 201215898

Dependencies:   mbed

Navigation

  • From the Main Menu the A button will take you into one of the play, highscore or instructions options.
  • The B button will return you to the Main Menu from either the highscore or instruction screens, though this is prompted on screen.
  • When in the Main Menu Pot1 can be used to adjust the contrast and the volume control by the speaker is active.
  • When the game is over the B button can be used to return to the Main Menu, again this is prompted.
  • To return to the Main Menu while the game is being played the reset button must be pressed, this will not save your score or anything about the game.

In Game

  • While in the game the A button is used to shoot while you aim with the Joystick.
  • You have control over the cross while the objective of the game is to rack up as many points shooting the moving head.
  • There is a slight reload time on each shot so you are unable to spam A if you miss.
  • Once you miss 6 times the game will end and your score will be saved.
  • When hit by a falling spike the game will transition and the head will vanish.
  • 4 new spikes will spawn which you need to avoid, being hit by 1 of these will decrease your remaining miss chances by 5.
  • When the game is in this state you must avoid these spikes by tilting the device, the Joystick will have no effect.
  • The head will move progressively faster as the game goes on, make use of the clock power up by shooting it when it appears, this will slow the head down to a more manageable level hopefully helping you to reach a higher score.

Highscore

  • If you have a SD card inserted into the device the game can save your highest score.
  • A decent score is somewhere around 25.
Committer:
el18jgb
Date:
Sun May 24 11:24:57 2020 +0000
Revision:
23:0e8155320571
Parent:
20:6db651a3cfec
Final Submission. I have read and agreed with Statement of Academic Integrity.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
el18jgb 7:04a7826ff7e4 1 #ifndef PUP_H
el18jgb 7:04a7826ff7e4 2 #define PUP_H
el18jgb 7:04a7826ff7e4 3
el18jgb 7:04a7826ff7e4 4 #include "mbed.h"
el18jgb 7:04a7826ff7e4 5 #include "N5110.h"
el18jgb 7:04a7826ff7e4 6 #include "Gamepad.h"
el18jgb 7:04a7826ff7e4 7 #include "Aim.h"
el18jgb 7:04a7826ff7e4 8 #include "Heston.h"
el18jgb 7:04a7826ff7e4 9
el18jgb 20:6db651a3cfec 10 /** Power up class
el18jgb 20:6db651a3cfec 11 * @brief clock to slow heston sprite
el18jgb 20:6db651a3cfec 12 * @author Joe Body, University of Leeds
el18jgb 20:6db651a3cfec 13 * @date May 2020
el18jgb 20:6db651a3cfec 14 */
el18jgb 7:04a7826ff7e4 15
el18jgb 7:04a7826ff7e4 16 class Pup
el18jgb 7:04a7826ff7e4 17 {
el18jgb 7:04a7826ff7e4 18
el18jgb 7:04a7826ff7e4 19 public:
el18jgb 20:6db651a3cfec 20
el18jgb 20:6db651a3cfec 21 /** Constructor */
el18jgb 7:04a7826ff7e4 22 Pup();
el18jgb 20:6db651a3cfec 23
el18jgb 20:6db651a3cfec 24 /** Destructor */
el18jgb 7:04a7826ff7e4 25 ~Pup();
el18jgb 20:6db651a3cfec 26
el18jgb 20:6db651a3cfec 27 /** Initalises Pup*/
el18jgb 7:04a7826ff7e4 28 void init();
el18jgb 20:6db651a3cfec 29 /** Draws the first type of spike
el18jgb 20:6db651a3cfec 30 * @param lcd @details N5110 object
el18jgb 20:6db651a3cfec 31 */
el18jgb 20:6db651a3cfec 32 void draw(N5110 &lcd);
el18jgb 20:6db651a3cfec 33
el18jgb 20:6db651a3cfec 34 /** set initial semi random random position of a clock based on cursor
el18jgb 20:6db651a3cfec 35 * @param int x
el18jgb 20:6db651a3cfec 36 * @param int y
el18jgb 20:6db651a3cfec 37 */
el18jgb 7:04a7826ff7e4 38 void position(int x, int y);
el18jgb 20:6db651a3cfec 39
el18jgb 20:6db651a3cfec 40 /** gets co-ordinates of the sprite
el18jgb 20:6db651a3cfec 41 * @ return position vector
el18jgb 20:6db651a3cfec 42 */
el18jgb 7:04a7826ff7e4 43 Vector2D get_pos();
el18jgb 20:6db651a3cfec 44
el18jgb 20:6db651a3cfec 45 /** set co ordinates of sprite
el18jgb 20:6db651a3cfec 46 * @param int x
el18jgb 20:6db651a3cfec 47 * @param int y
el18jgb 20:6db651a3cfec 48 */
el18jgb 19:33c77517cb88 49 void set_pos(int x, int y);
el18jgb 7:04a7826ff7e4 50
el18jgb 7:04a7826ff7e4 51 private:
el18jgb 20:6db651a3cfec 52
el18jgb 20:6db651a3cfec 53 /**vertical size sprite
el18jgb 20:6db651a3cfec 54 * @return _height
el18jgb 20:6db651a3cfec 55 */
el18jgb 7:04a7826ff7e4 56 int _height;
el18jgb 20:6db651a3cfec 57
el18jgb 20:6db651a3cfec 58 /**horizontal size sprite
el18jgb 20:6db651a3cfec 59 * @return _height
el18jgb 20:6db651a3cfec 60 */
el18jgb 7:04a7826ff7e4 61 int _width;
el18jgb 20:6db651a3cfec 62
el18jgb 20:6db651a3cfec 63 /** x position of sprite
el18jgb 20:6db651a3cfec 64 * @return _x
el18jgb 20:6db651a3cfec 65 */
el18jgb 7:04a7826ff7e4 66 int _x;
el18jgb 20:6db651a3cfec 67
el18jgb 20:6db651a3cfec 68 /** y position of sprite
el18jgb 20:6db651a3cfec 69 * @return _y
el18jgb 20:6db651a3cfec 70 */
el18jgb 7:04a7826ff7e4 71 int _y;
el18jgb 7:04a7826ff7e4 72
el18jgb 7:04a7826ff7e4 73 };
el18jgb 7:04a7826ff7e4 74
el18jgb 7:04a7826ff7e4 75 #endif