Character Movement

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
XxSolidJelloxX
Prole
Posts: 25
Joined: Sun Jul 14, 2013 2:46 am
Location: The Stars

Character Movement

Post 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.
Attachments
Survival.love
Use "WASD" to walk!
Press "E" to chop trees!
(4.06 MiB) Downloaded 211 times
Last edited by XxSolidJelloxX on Thu Aug 27, 2015 12:59 am, edited 2 times in total.
Joe Black
Prole
Posts: 39
Joined: Wed Jan 21, 2015 1:57 pm

Re: Character Movement

Post 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....
User avatar
XxSolidJelloxX
Prole
Posts: 25
Joined: Sun Jul 14, 2013 2:46 am
Location: The Stars

Re: Character Movement

Post 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.
User avatar
XxSolidJelloxX
Prole
Posts: 25
Joined: Sun Jul 14, 2013 2:46 am
Location: The Stars

Re: Character Movement

Post by XxSolidJelloxX »

Anyone else happen to give it a try?
User avatar
TheScout18
Prole
Posts: 10
Joined: Tue Aug 25, 2015 2:12 am

Re: Character Movement

Post by TheScout18 »

Yes! Character movements and animations were all very smooth.
Ubuntu is pretty cool! :awesome:
http://www.ubuntu.com
User avatar
XxSolidJelloxX
Prole
Posts: 25
Joined: Sun Jul 14, 2013 2:46 am
Location: The Stars

Re: Character Movement

Post 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.
Fantos
Prole
Posts: 11
Joined: Sat Aug 08, 2015 9:22 am

Re: Character Movement

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 51 guests