Matis Requis 201241242

Dependencies:   mbed

Tempest Game

Game Screen

https://os.mbed.com/media/uploads/MatisRequis/tempest_board_wiki.png The board is made of 12 columns. The Hero stays at the top of the column

Game Controls

https://os.mbed.com/media/uploads/MatisRequis/gamepad_buttons.png

To control the hero spaceship point the joystick to the column you want the hero to go to.

Press the A button to shoot a bullet in the column you are currently in.

Committer:
MatisRequis
Date:
Fri May 22 10:29:49 2020 +0000
Revision:
4:8e3ba8d6d915
Parent:
3:54132cf073d7
Child:
6:037dfa5064a1
Hero movement done, now depends on joystick position

Who changed what in which revision?

UserRevisionLine numberNew contents of line
MatisRequis 2:d59a92e65bd9 1 #ifndef TEMPESTENGINE_H
MatisRequis 2:d59a92e65bd9 2 #define TEMPESTENGINE_H
MatisRequis 2:d59a92e65bd9 3
MatisRequis 2:d59a92e65bd9 4 #include "mbed.h"
MatisRequis 2:d59a92e65bd9 5 #include "N5110.h"
MatisRequis 2:d59a92e65bd9 6 #include "Gamepad.h"
MatisRequis 2:d59a92e65bd9 7 //#include "Bullet.h"
MatisRequis 4:8e3ba8d6d915 8 #include "Hero.h"
MatisRequis 3:54132cf073d7 9 #include "Board.h"
MatisRequis 2:d59a92e65bd9 10
MatisRequis 2:d59a92e65bd9 11 class TempestEngine {
MatisRequis 2:d59a92e65bd9 12
MatisRequis 2:d59a92e65bd9 13 public:
MatisRequis 2:d59a92e65bd9 14
MatisRequis 2:d59a92e65bd9 15 TempestEngine();
MatisRequis 2:d59a92e65bd9 16 ~TempestEngine();
MatisRequis 2:d59a92e65bd9 17
MatisRequis 4:8e3ba8d6d915 18 void init();
MatisRequis 4:8e3ba8d6d915 19 void read_input(Gamepad &pad);
MatisRequis 2:d59a92e65bd9 20 void draw(N5110 &lcd);
MatisRequis 4:8e3ba8d6d915 21 void update();
MatisRequis 2:d59a92e65bd9 22
MatisRequis 2:d59a92e65bd9 23 private:
MatisRequis 2:d59a92e65bd9 24
MatisRequis 2:d59a92e65bd9 25 int _column_amount;
MatisRequis 2:d59a92e65bd9 26 int _bullet_speed;
MatisRequis 4:8e3ba8d6d915 27 float _d;
MatisRequis 4:8e3ba8d6d915 28 int _mag;
MatisRequis 2:d59a92e65bd9 29 int _a;
MatisRequis 3:54132cf073d7 30 Board _board;
MatisRequis 4:8e3ba8d6d915 31 Hero _hero;
MatisRequis 4:8e3ba8d6d915 32 Gamepad _pad;
MatisRequis 2:d59a92e65bd9 33 };
MatisRequis 2:d59a92e65bd9 34
MatisRequis 2:d59a92e65bd9 35 #endif