+Random Terrain Posted March 5, 2022 Author Share Posted March 5, 2022 I didn't think anybody would need to look at the code, especially since it won't work correctly as-is, but I just added the .bas code to the bB page in case it might be helpful: https://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#ex_8_8_speed_change 1 Quote Link to comment https://forums.atariage.com/topic/331479-need-help-with-88-fractions/page/2/#findComment-5015851 Share on other sites More sharing options...
KevKelley Posted March 5, 2022 Share Posted March 5, 2022 9 hours ago, Random Terrain said: I didn't think anybody would need to look at the code, especially since it won't work correctly as-is, but I just added the .bas code to the bB page in case it might be helpful: https://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#ex_8_8_speed_change To be honest, I don't know if I would fully understand it but I was trying to come up with some kind of speed change. The code I posted previously was kind of a start where I was at but was curious what other ways were out there. I am not the best with math so I came up with my code of using the counter to then change the velocity and while it seems to work okay, I was wondering what other methods were out there. This was what I eventually settled on last night: if !joy0fire && f>0 then g=g+1: goto SPEEDDOWN if joy0fire then g=g+1: goto SPEEDUP goto AFTERSPEEDUP SPEEDUP if g=30 && velocity<2 then velocity=velocity+0.30:g=0 if velocity>2 then velocity=2 p0x=p0x-velocity if velocity<1 then m0x=m0x-velocity else m0x=m0x-1 if w{2} then player6x=player6x+1 goto AFTERSPEEDUP SPEEDDOWN if g=30 then velocity=velocity-0.30:g=0 if e=0 && joy0left then velocity=0 AFTERSPEEDUP p0x=p0x-velocity m0x=m0x-velocity To give a kind of parallax scrolling effect, I limit the speed at which the missile (m0x) moves since in my program that is located farther in the background and I max out the speed change. To have it slow down I check the individual variables that make up "velocity." 1 Quote Link to comment https://forums.atariage.com/topic/331479-need-help-with-88-fractions/page/2/#findComment-5015979 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.