Videopac / Odyssey2 forum
June 25, 2022, 10:12:40 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Al lot of attachments from Nov 2011 till april 2012 are damaged. Please ask the original poster to re-upload if you need them.
   Home   Help Login Register links  
Pages: [1]   Go Down
Author Topic: Fractional Speed  (Read 2082 times)
Attacked the Timelord
Posts: 141

« on: July 11, 2014, 12:44:37 AM »

This code is a "translation" from a 6502 code I have here, if you know a fast and most optimized way to make it, feel free to share, I'm still a newbie in 8048 programming.

Fractional movement/speed is useful for add gravity or acceleration during sprite motion.

The trick is add with carry. Not aways the carry will be set, not aways the player will move. When more you add, more often the carry will be set and faster the player will move.

This demo move the sprite up and down, the same code can be used for horizontal motion.
Press up or down to move, press fire button to stop the player.
Pages: [1]   Go Up
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!