Character Movement
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- XxSolidJelloxX
- Prole
- Posts: 25
- Joined: Sun Jul 14, 2013 2:46 am
- Location: The Stars
Character Movement
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 232 times
Last edited by XxSolidJelloxX on Thu Aug 27, 2015 12:59 am, edited 2 times in total.
Re: Character Movement
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....
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....
- XxSolidJelloxX
- Prole
- Posts: 25
- Joined: Sun Jul 14, 2013 2:46 am
- Location: The Stars
Re: Character Movement
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.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....
- XxSolidJelloxX
- Prole
- Posts: 25
- Joined: Sun Jul 14, 2013 2:46 am
- Location: The Stars
Re: Character Movement
Anyone else happen to give it a try?
- TheScout18
- Prole
- Posts: 10
- Joined: Tue Aug 25, 2015 2:12 am
Re: Character Movement
Yes! Character movements and animations were all very smooth.
Ubuntu is pretty cool!
http://www.ubuntu.com
http://www.ubuntu.com
- XxSolidJelloxX
- Prole
- Posts: 25
- Joined: Sun Jul 14, 2013 2:46 am
- Location: The Stars
Re: Character Movement
Thank you for letting me know! Glad to know it's working for the majority.TheScout18 wrote:Yes! Character movements and animations were all very smooth.
Re: Character Movement
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
Who is online
Users browsing this forum: Ahrefs [Bot] and 9 guests