The character in my game just moves way too fast, left and right and while jumping. I am currently just moving the x and y position around by 1 when a key is held. For my jump, I start a timer. I am trying to get the jump time to simulate a real jump time, the actual physics dont matter to me I just want same time up and down. Currently my jump time is at like .18 while it should be at .7-8.
#Need help with 2d game movement
8 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @polar gazelle! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
I will send a demo of what it looks like rn
as u can see it is insanely fast
i wanna slow it down
I haven't looked at your code, so apologies if I've made some incorrect assumptions, but perhaps change your sprite positions to doubles rather than storing them as ints (assuming you are), and make the position adjustment something like 0.5 or 0.3 (whatever feels good to you) then you can round back to an int when you go to render it if you need to.