Harkonnens Attack!
"Pong, but more cool and in space!"
By Noah Schwartz
Spring 2022
"Pong, but more cool and in space!"
By Noah Schwartz
Spring 2022
Harkonnens Attack is an exciting physics-based pong game developed for the EFM32 Gecko Microcontroller in Simplicity Studio. The project showcases the implementation of kinematics, task scheduling, and real-time operating system (RTOS) programming principles to control the game's software.
The game achieves seamless task scheduling, ensuring smooth gameplay and efficient resource utilization. The project demonstrates my expertise in embedded software development and my ability to optimize performance within resource-limited environments.
Welcome to Harkonnens Attack, a captivating physics-based pong game! Your objective is to launch the Harkonnen Mass (HM) above the screen while not letting it fall below the paddle to emerge victorious. However, this is easier said than done.Â
Gravity and Friction play a significant role in this game, affecting the HM and the paddle. Merely relying on the paddle's natural upward force won't be enough to launch the HM above the screen. Fear not, though, as you are equipped with two optional buttons on the board to aid you:
Limited-Time Shield: This button activates a shield on the paddle, providing an extra boost to launch the HM with increased force. Use it wisely though, as it has a limited duration and must recharge after each use. The usage and recharge times are shown at the bottom left and right of the screen for your convenience.
Laser: The second button unleashes a power laser that automatically destroys the HM. Be cautious, as this option can only be used a limited amount of times and should be reserved for dire situations.
To control the game, simply press your finger on the CapSense sensor. The right side of the sensor moves the paddle right, while the further your finger is to the right, the stronger the paddle moves. The same principle applies to the left side of the sensor for moving the paddle to the left.
For your convenience, the LEDs are integrated into the game to provide valuable information:
LED1 blinks at a rate corresponding to the current force on the paddle
LED0 blinks at a rate proportional to the percentage of maximum force the paddle needs to hit the HM accurately
With all that in mind, good luck in your mission to protect us from the Harkonnens!
To ensure the successful functionality of the project, comprehensive testing procedures were incorporated. One such technique employed was unit testing, which played a crucial role in validating the accuracy of calculations involved in the HM and paddle movements as well as the PWM rates. Given the complexity of the kinematic calculations, unit testing provided essential assurance that each step of the calculations was performed correctly.
Additionally, Segger's SystemView program was utilized as a valuable tool in validating the scheduling of the software-defined tasks. This allowed for validation of task execution, ensuring minimal contention between tasks. The tasks were designed to be sufficiently optimized and completed within the required timeframes without risk of contention, further enhancing the overall performance of the project.
By employing these testing methodologies, the project was able to attain a higher level of reliability and functionality, ensuring that it operated as intended.
Join me for a live demonstration of Harkonnens Attack! I'll showcase some key features like paddle control using the CapSense touch sensor, gravity's effect on the HM, and the game over conditions and screen.