A superhero black-white-pixel game controlled by buttons and joystick about Hulk and Loki inspired by GameBoy, Street Fighter, and Super Mario Bros. Object-oriented programming is utilized to construct the modular and reusable game design using development board LPC 1768 for the game display shown on the LCD screen.
Interaction of the characters |
---|
![]() |
- Hulk and Loki use fireball and bubble to attack each other respectively
- Ejection of bubbles from Loki used ticker function of mbed, upper and bottom bubbles take turns to be ejected by Loki, which pass the timer flags from main.cpp to the Loki.cpp
Collision of attacks |
---|
![]() |
- The collisions for the attacks used a general bool function to detect, simply inputting the coordinates of two objects and the detected range
- Different pixel paints are drawn to illustrate the collision motions
- The sequence of the interaction of them in coding throughout the boss stage is crucial as it affects which object covers another object
Consistency of pixel frames |
---|
![]() |
- In order to interrupt a consistent motion, I used pass-by-reference functions of returning flags and set or get positions of different objects throughout the files and initialize the motion
- Counter is used to replace the function of for and while loop as a counter of if statement can be incremented by the frame running on the main.cpp, any for or while loop outside the main.cpp will interrupt the smoothness of the game