Hello everyone !
No big deal, but here is my first “original” 2D game: PWM (Pulse Width Modulation)
Basically, the goal is to press or release the space key to generate square wave pulses (in blue) and keep the white small ball on the screen (representing the speaker diaphragm’s level) as close as possible to the yellow wave.
The ideia was based on this video https://youtu.be/4SBUrv7fXqI
Implemented in java 8 using just standard libraries (java 2D, Swing, AWT), so no external libraries required.
Keyboard Controls:
[Space] key: move the ball up or down
Thanks !
Link to download Runnable Jar [java 8]: https://github.com/leonardo-ono/JavaPwmGame/raw/master/dist/JavaPwmGame.jar (13.4KB)
Source code: https://github.com/leonardo-ono/JavaPwmGame
Video
S7eLh4NCEd4
Screenshots