Words Fail Posted December 26, 2022 Share Posted December 26, 2022 player0y=player0y-1 or +1 player0x=player0x-1 or +1 When moving horizontally it appears you move a tiny bit faster. I assume due to resolution.. is there a way around this? Quote Link to comment Share on other sites More sharing options...
KevKelley Posted December 26, 2022 Share Posted December 26, 2022 If I want a simple slow down I sometimes just alternate frames the horizontal movement moves on. like if w{0} then skip horizontal movement. otherwise I’d use another variable and dim playerx =playerx.a or something like that. Can’t remember all the details or if I’m missing something as I'm away from my keyboard 1 Quote Link to comment Share on other sites More sharing options...
bogax Posted December 26, 2022 Share Posted December 26, 2022 I can't help but wonder where it would matter. The simplest way I can think of is make one of player0x or player0y an 8.8 variable so you can move in fractional pixels So eg if 3 * y = 4 * x dim p0y = player0y.y player0x = player0x + 1 : p0y = p0y + 0.75 2 Quote Link to comment Share on other sites More sharing options...
Words Fail Posted December 26, 2022 Author Share Posted December 26, 2022 5 hours ago, bogax said: I can't help but wonder where it would matter. The simplest way I can think of is make one of player0x or player0y an 8.8 variable so you can move in fractional pixels So eg if 3 * y = 4 * x dim p0y = player0y.y player0x = player0x + 1 : p0y = p0y + 0.75 I didn't know I can do + 0.75.. I had tried to do something like that before but it didn't work. Will try again. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted December 27, 2022 Share Posted December 27, 2022 10 hours ago, Words Fail said: I didn't know I can do + 0.75.. I had tried to do something like that before but it didn't work. Will try again. Check out this program: https://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#ex_8_8_speed_change 3 Quote Link to comment Share on other sites More sharing options...
Words Fail Posted January 4 Author Share Posted January 4 On 12/26/2022 at 11:18 AM, bogax said: I can't help but wonder where it would matter. The simplest way I can think of is make one of player0x or player0y an 8.8 variable so you can move in fractional pixels So eg if 3 * y = 4 * x dim p0y = player0y.y player0x = player0x + 1 : p0y = p0y + 0.75 I appreciate it. That works great. Quote Link to comment 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.