Platform game written for the GHI/OutrageousCircuits RETRO game device. Navigate the caves collecting all the pickups and avoiding the creatures and haunted mine carts that patrol the caves. Oh and remember to watch out for the poisonous plants... This game demonstrates the ability to have multiple animated sprites where the sprites can overlap the background environment. See how the player moves past the fence and climbs the wall in the 3rd screen.

Dependencies:   mbed

Committer:
taylorza
Date:
Mon Feb 16 03:46:57 2015 +0000
Revision:
16:f9227904afc4
Added a 4th game screen

Who changed what in which revision?

UserRevisionLine numberNew contents of line
taylorza 16:f9227904afc4 1 #ifndef __SCREEN4_H__
taylorza 16:f9227904afc4 2 #define __SCREEN4_H__
taylorza 16:f9227904afc4 3
taylorza 16:f9227904afc4 4 class Screen4 : public Scene
taylorza 16:f9227904afc4 5 {
taylorza 16:f9227904afc4 6 public:
taylorza 16:f9227904afc4 7 Screen4() :
taylorza 16:f9227904afc4 8 _player(),
taylorza 16:f9227904afc4 9 _enemy1(3, PatrollingEnemy::LeftRight),
taylorza 16:f9227904afc4 10 _enemy2(4)
taylorza 16:f9227904afc4 11 {
taylorza 16:f9227904afc4 12 Game::Surface.clearScreen();
taylorza 16:f9227904afc4 13
taylorza 16:f9227904afc4 14 addGameObject(&_enemy1);
taylorza 16:f9227904afc4 15 addGameObject(&_enemy2);
taylorza 16:f9227904afc4 16 addGameObject(&_player);
taylorza 16:f9227904afc4 17
taylorza 16:f9227904afc4 18 restartScreen();
taylorza 16:f9227904afc4 19 }
taylorza 16:f9227904afc4 20
taylorza 16:f9227904afc4 21 virtual void restartScreen()
taylorza 16:f9227904afc4 22 {
taylorza 16:f9227904afc4 23 _player.setStartPosition(10, 16);
taylorza 16:f9227904afc4 24
taylorza 16:f9227904afc4 25 _enemy1.setStartPosition(72, 48);
taylorza 16:f9227904afc4 26 _enemy1.setCollisionRect(0, 6, 16, 16);
taylorza 16:f9227904afc4 27
taylorza 16:f9227904afc4 28 _enemy2.setStartPosition(88, 78);
taylorza 16:f9227904afc4 29
taylorza 16:f9227904afc4 30 setPosition(0, 8);
taylorza 16:f9227904afc4 31 setMap(Maps::Screen4, 20, 15, blocks, sprites);
taylorza 16:f9227904afc4 32
taylorza 16:f9227904afc4 33 Scene::restartScreen();
taylorza 16:f9227904afc4 34 }
taylorza 16:f9227904afc4 35
taylorza 16:f9227904afc4 36 private:
taylorza 16:f9227904afc4 37 Player _player;
taylorza 16:f9227904afc4 38 PatrollingEnemy _enemy1;
taylorza 16:f9227904afc4 39 BouncingEnemy _enemy2;
taylorza 16:f9227904afc4 40 };
taylorza 16:f9227904afc4 41
taylorza 16:f9227904afc4 42 #endif //__SCREEN4_H__