Race around the city collecting the flags while avoiding those that stand in the way of your mission. Make no mistake you will need to be quick to outwit your opponents, they are smart and will try to box you in. I wrote this game to prove that writing a game with scrolling scenery is possible even with the limited 6kB of RAM available. I had to compromise sound effects for features, I wanted multiple opponents, I wanted to be able to drop smoke bombs to trap the opponents but all this required memory so the sound effects had to take a back seat.

Dependencies:   mbed

Committer:
taylorza
Date:
Sun Feb 01 00:43:25 2015 +0000
Revision:
1:1b8125937f28
Minor updates

Who changed what in which revision?

UserRevisionLine numberNew contents of line
taylorza 1:1b8125937f28 1 #include "mbed.h"
taylorza 1:1b8125937f28 2
taylorza 1:1b8125937f28 3 #ifndef __BEEPER_H__
taylorza 1:1b8125937f28 4 #define __BEEPER_H__
taylorza 1:1b8125937f28 5 class Beeper
taylorza 1:1b8125937f28 6 {
taylorza 1:1b8125937f28 7 public:
taylorza 1:1b8125937f28 8 static void beep(int freq, int duration);
taylorza 1:1b8125937f28 9 static void noise(int freq, int duration);
taylorza 1:1b8125937f28 10
taylorza 1:1b8125937f28 11 private:
taylorza 1:1b8125937f28 12 static uint16_t lfsr_rand()
taylorza 1:1b8125937f28 13 {
taylorza 1:1b8125937f28 14 static uint16_t lfsr = 0xACE1u;
taylorza 1:1b8125937f28 15 lfsr = (lfsr >> 1) ^ (-(lfsr & 1u) & 0xB400u);
taylorza 1:1b8125937f28 16 return lfsr;
taylorza 1:1b8125937f28 17 }
taylorza 1:1b8125937f28 18
taylorza 1:1b8125937f28 19 private:
taylorza 1:1b8125937f28 20 static DigitalOut _speaker;
taylorza 1:1b8125937f28 21 };
taylorza 1:1b8125937f28 22 #endif //__BEEPER_H__