Hi everybody,
I'm really new on game development so you'll see a lot of my messages in these days anyway i writing this post because I started yesterday to use LOVE and I just LOVE it but using it on ubuntu 9.0 the cpu always run about 100% and the temperature rise up to 90°
can anybody help?
Alexintosh
LOVE cpu overload
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Alexintosh
- Prole
- Posts: 9
- Joined: Mon Apr 04, 2011 11:18 am
- Location: Italy
- Contact:
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: LOVE cpu overload
Welcome!
This may be because LOVE, by default, doesn't have a framerate cap; but then again, it doesn't do this on my computer. It could also be because you're doing some heavy duty processing; make sure you're not creating any resources in love.update or love.draw.
EDIT: By the way, what exactly is your avatar doing? I hope it's not what I think it is.
This may be because LOVE, by default, doesn't have a framerate cap; but then again, it doesn't do this on my computer. It could also be because you're doing some heavy duty processing; make sure you're not creating any resources in love.update or love.draw.
EDIT: By the way, what exactly is your avatar doing? I hope it's not what I think it is.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: LOVE cpu overload
You can use love.timer.sleep to slow it down.
Help us help you: attach a .love.
- nevon
- Commander of the Circuloids
- Posts: 938
- Joined: Thu Feb 14, 2008 8:25 pm
- Location: Stockholm, Sweden
- Contact:
Re: LOVE cpu overload
If you're thinking it's wielding a chainsaw, then yeah, that's exactly what it's doing.BlackBulletIV wrote:EDIT: By the way, what exactly is your avatar doing? I hope it's not what I think it is.
- Alexintosh
- Prole
- Posts: 9
- Joined: Mon Apr 04, 2011 11:18 am
- Location: Italy
- Contact:
Re: LOVE cpu overload
How can I set the framerate??BlackBulletIV wrote:Welcome!
This may be because LOVE, by default, doesn't have a framerate cap; but then again, it doesn't do this on my computer. It could also be because you're doing some heavy duty processing; make sure you're not creating any resources in love.update or love.draw.
I'm following this tutorial, so I use love.graphics.draw for any drawable object in a table may be this?
He was laughing , anyway to avoid problems i changed it.EDIT: By the way, what exactly is your avatar doing? I hope it's not what I think it is.
Do you mean in the love.draw() function?You can use love.timer.sleep to slow it down.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: LOVE cpu overload
You can't. You can aim for a certain framerate with love.time.sleep(), but it's imperfect.Alexintosh wrote:How can I set the framerate??
That particular tutorial has been criticised on this forum. Drawing things shouldn't cause problems like that.Alexintosh wrote:I'm following this tutorial, so I use love.graphics.draw for any drawable object in a table may be this?
Could you try running LÖVE without a game (you'll get the no-game screen) and tell us whether the same thing happens?
Also, could you upload a .love of your game to the forums, so we can look for clues there?
You can put it there, but traditionally, it's put at the end of love.update().Alexintosh wrote:Do you mean in the love.draw() function?You can use love.timer.sleep to slow it down.
Help us help you: attach a .love.
Re: LOVE cpu overload
I'm glad you pointed this out. I didn't realize my CPU usage increases by 500% (from 10% to 50%) when I run my game. It runs at about 325 FPS. I'll give the sleep idea a try.
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: LOVE cpu overload
The best way to attempt to set the framerate, is to redefine love.run and increase the amount of time slept at the end of the function (the love.timer.sleep call). You may to do something like:
Code: Select all
love.timer.sleep(1000 / 60) -- 60 FPS
- Alexintosh
- Prole
- Posts: 9
- Joined: Mon Apr 04, 2011 11:18 am
- Location: Italy
- Contact:
Re: LOVE cpu overload
That's the point, drawing two elements every frame shouldnt be a problem.That particular tutorial has been criticised on this forum. Drawing things shouldn't cause problems like that.
Could you try running LÖVE without a game (you'll get the no-game screen) and tell us whether the same thing happens?
Also, could you upload a .love of your game to the forums, so we can look for clues there?
I tried to run love without games and nothing happened, cpu was fine, but I also tried with a mario version posted by a user, with mario running cpu 100% and the temperature rise up to 90°
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], keharriso and 221 guests