Jump to content

Photo

8.8 type movement with one variable

8.8 fixed point math integer fraction

No replies to this topic

#1 Lillapojkenpćön OFFLINE  

Lillapojkenpćön

    Star Raider

  • 97 posts

Posted Thu Sep 27, 2018 6:05 AM

Variable saving if alot of things use the same speed, I was using 16 variables for the x & y for 8 players before I came up with this

 

If you just want to slow down the players you don't need to use the a and b variables,

 

just replace .._fraction_counter + b   with  .._fraction_counter + (number between 1 and 255)

 

and .._speed = a + 1 else _speed = a   with   .._speed = 1 else _speed = 0

 
Attached File  8.8 with one variable.bas   1.68KB   11 downloads





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users