More newbie questions...
I just recently pulled up my game on someone else's computer and ran into a problem - it's running my game waaaaay too fast. I've run it on a few different desktops with varying speeds, but I haven't had a problem to date... It always seems to run at the same pace. The computer itself was a 64 bit dual core, running on VIsta (Is Vista doing this?)
So I guess my question is, how can I make my game function properly on a platform like this? Is there a good way to gauge the speed a computer will run my game, and adjust accordingly?
Some other computer...
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- nightvenom
- Prole
- Posts: 36
- Joined: Sat Aug 16, 2008 3:07 pm
Re: Some other computer...
Was Vista 64 bit or 32 ?
I don't know if that would cause the problem, but it might be a good place to look .
I don't know if that would cause the problem, but it might be a good place to look .
Re: Some other computer...
I think - THINK - that it was 64 bit Vista... This was a public computer at my college, and I didn't really have time to give it a look. I do know that it had a 64 bit core, though.
Re: Some other computer...
Blame it on Vista, that's what everyone does
Talking seriously, do your game objects move too fast? If that's the problem maybe you're not delta-timing correctly?
What I mean (Patronizing code ahead!):
Talking seriously, do your game objects move too fast? If that's the problem maybe you're not delta-timing correctly?
What I mean (Patronizing code ahead!):
Code: Select all
player_x = player_x + speed -- this is wrong
Code: Select all
player_x = player_x + speed * dt -- this is right
Teh Blog -> http://cryodreams.com.ar
Re: Some other computer...
Nothing patronizing here, just the first thing on the check list. Check to see if I actually plugged in the computer, try restarting it, yatta etc.
But yeah, that's how I have it coded. Well, basically. I used my dt, I promise. ^_^
Like I said, I've run it on a number of computers before and never really noticed a performance difference - for better or worse. I like the idea of blaming Vista for my problems here.
So, um... Any ideas as to what I could do? Or should i just avoid looking at Vista computers for now? (nobody likes them anyway)
But yeah, that's how I have it coded. Well, basically. I used my dt, I promise. ^_^
Like I said, I've run it on a number of computers before and never really noticed a performance difference - for better or worse. I like the idea of blaming Vista for my problems here.
So, um... Any ideas as to what I could do? Or should i just avoid looking at Vista computers for now? (nobody likes them anyway)
Re: Some other computer...
This is strange.
I've been making my Löve games on my own 64bit Vista computer, and when I play my games on other computers (A 32bit Vista, and the old XP school computers) they all run the game faster. There is a literal increase from steady 60 FPS on my PC to between 200-400 FPS on the other computers (Tested with just the love.timer.getFPS()).
I have been able to slightly fix the problem by doing
In my main update code, but this is probably a horrible way to go about it, since the love.timer.sleep function is supposedly inaccurate, and I can't think of any other ways of limiting the FPS.
And since I've got all my movement done through the physics engine, it sometimes messes up. Specifically, joints suddenly become super-accurate.
I've been making my Löve games on my own 64bit Vista computer, and when I play my games on other computers (A 32bit Vista, and the old XP school computers) they all run the game faster. There is a literal increase from steady 60 FPS on my PC to between 200-400 FPS on the other computers (Tested with just the love.timer.getFPS()).
I have been able to slightly fix the problem by doing
Code: Select all
if(love.timer.getDelta() < 0.0166667) then
love.timer.sleep(10)
end
And since I've got all my movement done through the physics engine, it sometimes messes up. Specifically, joints suddenly become super-accurate.
Re: Some other computer...
It's something? I'm going to add something similar to my code, next time I'm there I'll see if I still have a problem. Assuming I'll get a chance to use it anytime soon...
Re: Some other computer...
I'm new to LOVE so this might be a stupid question but is there a way to cap the FPS?
If not can it be added? Does SDL support this type of behavior?
If not can it be added? Does SDL support this type of behavior?
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Some other computer...
You can try vsync, and you can check the delta time variable for how much time has passed, however vsync is probably your best option, as it's all driver-handled.
EDIT: Post 100!!
EDIT: Post 100!!
Re: Some other computer...
Nothing strange about that; your video driver probably is set to enable vsync, so the framerate gets capped to 60fps, while on other PCs it runs uncapped. As long as you make sure to take delta time into account everywhere, there should be little difference between running at 60fps and 400fps. It's a nice thing though to still limit the framerate so that you free up some CPU cycles.Lord Tim wrote:I've been making my Löve games on my own 64bit Vista computer, and when I play my games on other computers (A 32bit Vista, and the old XP school computers) they all run the game faster. There is a literal increase from steady 60 FPS on my PC to between 200-400 FPS on the other computers (Tested with just the love.timer.getFPS()).
Who is online
Users browsing this forum: Bing [Bot] and 1 guest