Basic game structure
https://github.com/noorvandamme/BachelorThesis
Goal
We tested the sensors earlier, but this phase was about building the foundation of our game. This makes it easier to test the game to catch any issues. It also gave us a solid starting point to be ready for the beta moment next week.
Key Points
- Linking sensors with effect animation
- Character selection screen: Two buttons allow players to choose their character.
- Level system: Multiple levels with increasing difficulty.
- Timer mechanism: Players must complete tasks within a time limit.
<aside>
☝
Remark
At this point in the process, we weren't able to implement the buttons with the Arduino to choose the character yet. So we prototyped this another way.
</aside>
Linking the sensors with an effect animation
We already had the code for the sensors in Arduino and in the browser code. So we started linking them with an animation.
Key points:
- The game listens for sensor inputs via the serial communication.
- When a sensor value changes (detecting a "broken" IR sensor), it triggers specific animations in the game (effect).
- We made sure the animation would play everytime we trigger the sensor, not just the first time. We do this by destroying it and reinitialize the animation.