Skip to content

ArduboyCollection/Pong-Arduboy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 

Repository files navigation

Pong v1.3.0

A Pong clone for the Arduboy

Controls

  • Up and Down buttons: Move the left paddle up or down respectively.
  • A and B buttons: Move the right paddle up or down respectively (2player mode).
  • Left button: Pause and unpause the game.

Features

  • Basic singleplayer mode AI that can be beat.
  • Ball can travel at an angle (without floating point math!).
  • Also changes its direction based on where it hits the paddle.

Things I learned

This game taught me the basics of vector math. I was able to calculate the new velocity of the ball based on its position and the center of the paddle it was hitting. After that, a version of Bresenham's line algorithm was used to animate the ball using ints instead of floats (a huge performance gain in the context of an 8-bit Arduino microcontroller!), mostly copied from Arduboy2's implementation.

Copyright

This project is under the MIT license.

About

A Pong clone for the Arduboy

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 100.0%