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:
Wed May 20 14:37:02 2020 +0000
Revision:
18:c600a6545e81
Parent:
17:18ae81180853
Child:
19:33c77517cb88
spikemode uses accelerometer ;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
el18jgb 2:56b31902c800 1 #ifndef HESTON_H
el18jgb 2:56b31902c800 2 #define HESTON_H
el18jgb 2:56b31902c800 3
el18jgb 2:56b31902c800 4 #include "mbed.h"
el18jgb 2:56b31902c800 5 #include "N5110.h"
el18jgb 2:56b31902c800 6 #include "Gamepad.h"
el18jgb 2:56b31902c800 7
el18jgb 2:56b31902c800 8 /** Heston Class
el18jgb 2:56b31902c800 9 @date april 2020
el18jgb 2:56b31902c800 10 */
el18jgb 2:56b31902c800 11
el18jgb 2:56b31902c800 12 class Heston
el18jgb 2:56b31902c800 13 {
el18jgb 2:56b31902c800 14
el18jgb 2:56b31902c800 15 public:
el18jgb 2:56b31902c800 16 Heston();
el18jgb 2:56b31902c800 17 ~Heston();
el18jgb 2:56b31902c800 18 void init();
el18jgb 2:56b31902c800 19 void draw(N5110 &lcd);
el18jgb 2:56b31902c800 20 void update(Gamepad &pad);
el18jgb 2:56b31902c800 21 /// accessors and mutators
el18jgb 2:56b31902c800 22 //void set_velocity(Vector2D v);
el18jgb 5:c37f4ed2cad3 23 //int get_velocity();
el18jgb 5:c37f4ed2cad3 24 Vector2D get_pos();
el18jgb 2:56b31902c800 25 //void set_pos(Vector2D p);
el18jgb 17:18ae81180853 26 void hit(Gamepad &pad, int x, int y);
el18jgb 7:04a7826ff7e4 27 void miss(Gamepad &pad);
el18jgb 7:04a7826ff7e4 28 int checkscore();
el18jgb 7:04a7826ff7e4 29 int checkstrike();
el18jgb 7:04a7826ff7e4 30 void set_speed(int state);
el18jgb 18:c600a6545e81 31 void negfive();
el18jgb 2:56b31902c800 32
el18jgb 2:56b31902c800 33 private:
el18jgb 2:56b31902c800 34
el18jgb 2:56b31902c800 35 int _height;
el18jgb 2:56b31902c800 36 int _width;
el18jgb 2:56b31902c800 37 int _x;
el18jgb 2:56b31902c800 38 int _y;
el18jgb 2:56b31902c800 39 //int d;
el18jgb 2:56b31902c800 40 //float mag;
el18jgb 2:56b31902c800 41 int _speed;
el18jgb 2:56b31902c800 42 int d;
el18jgb 7:04a7826ff7e4 43 int score;
el18jgb 7:04a7826ff7e4 44 int strike;
el18jgb 2:56b31902c800 45
el18jgb 2:56b31902c800 46 };
el18jgb 2:56b31902c800 47 #endif