“Race Collision” is a one player game in which a truck has to avoid “particles” that appear on the road. By the use of the joystick, the player can guide themselves through the menu system to start the game. The truck is the main element of the game and it can be moved from side to side with the joystick. The road curves randomly from time to time and the player has to be careful to keep the truck within the road boundaries. Particles appear on the screen at random positions and 4 collisions lead to the end of the game.

Dependencies:   ELEC2645_JoystickLCD_LPC1768_2021

Revision:
5:7930d289e7fc
Parent:
4:def20a1665d1
Child:
6:40ef2030334c
--- a/lib/N5110.h	Sun Mar 21 17:03:59 2021 +0000
+++ b/lib/N5110.h	Fri Mar 26 15:21:07 2021 +0000
@@ -2,7 +2,8 @@
 #define N5110_H
 
 #include <vector>
-#include <cmath> 
+#include <cmath>
+#include "math.h" 
 #include "Utils.h"
 #include "Vector.h"
 #include "mbed.h"
@@ -386,7 +387,7 @@
                     
     // Draw Curve
     void drawCurve(std::vector<Vector2Df> curve_points, 
-                   int offset, 
+                   float offset, 
                    int dash_len, 
                    int type);