This is a simple program I made today that can bounce hundreds of balls around the screen and has the ability to add, remove, and clear and change the graphics of. It is a pretty entertaining program, and the source code is something you should really peruse if you wish to take a look at how to use interrupts and the keypad in your C programs. Enjoy Smile

Download: BounceCE




Code:
   [on]     - Quits the program
   [clear]  - Clears the screen
   [del]    - Delete latest ball
   [+]      - Shows number of balls
   [-]      - Switches between filled and outline
   [enter]  - Toggles background color
Awesome! It remains pretty fast even when there are more than 200 balls. And the code seems to be quite understandable, even if there's some strange things that I don't understand x)

It would be nice to reuse the code and make a game where you have to avoid the balls (just an idea, there are plenty of games to do with this).
Updated to be even faster and use the latest toolchain:

https://www.cemetech.net/programs/index.php?mode=file&path=/84pce/asm/graphics/bounce.zip
Bug: in your example gif, the green ball in the upperright corner doesn't move Razz

/me hides
PT_ wrote:
Bug: in your example gif, the green ball in the upperright corner doesn't move Razz

That's not a bug it just happened to get a random x and y speed of 0.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement