Page 1 of 1

Character Movement

Posted: Wed Aug 26, 2015 8:21 pm
by XxSolidJelloxX
Hey guys, I'm having a problem where I run my game on my computer, and it runs just fine, the character movement is smooth and looks good. When I run my game on my laptop, the character movement seems to speed up and slow down and not feel good at all. This may be because of the way I wrote the character movement (I know it wasn't the best way at all), different displays have different pixel ratios and such. I've attached the .love file if you'd like to see how the movement works for you, or take a look at my code. Take a look in src/char.lua to see where everything goes down.

Re: Character Movement

Posted: Wed Aug 26, 2015 9:08 pm
by Joe Black
it works fine for me, and the code looks good (you update animation each frame of dt and you draw it, it must be smooth).

however you can check if your FPS rate is stable on your laptop with the love.timer module, but it might not be the problem....

Re: Character Movement

Posted: Thu Aug 27, 2015 12:56 am
by XxSolidJelloxX
Joe Black wrote:it works fine for me, and the code looks good (you update animation each frame of dt and you draw it, it must be smooth).

however you can check if your FPS rate is stable on your laptop with the love.timer module, but it might not be the problem....
Thank you for the input! Glad to know it works fine for you, and hopefully it does for others too. I will check that love.timer module. And by "not smooth", I don't think it's the animation, but the actual movement of the character moving 1 pixel up or down.

Re: Character Movement

Posted: Thu Aug 27, 2015 8:06 pm
by XxSolidJelloxX
Anyone else happen to give it a try?

Re: Character Movement

Posted: Fri Aug 28, 2015 4:49 am
by TheScout18
Yes! Character movements and animations were all very smooth.

Re: Character Movement

Posted: Fri Aug 28, 2015 7:41 pm
by XxSolidJelloxX
TheScout18 wrote:Yes! Character movements and animations were all very smooth.
Thank you for letting me know! Glad to know it's working for the majority.

Re: Character Movement

Posted: Sat Aug 29, 2015 3:43 pm
by Fantos
I don't know this gonna be useful, but I wrote a 2D platformer thing using Hardoncollider on a laptop and it was all good but when I moved it on my PC it was slow and turn out for some reason on the laptop it was running faster