Processor intensive tasks in löve.

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
veethree
Inner party member
Posts: 877
Joined: Sat Dec 10, 2011 7:18 pm

Processor intensive tasks in löve.

Post by veethree »

So i recently upgraded my processor, And i was wondering what some processor intensive tasks löve could carry out.

I wanted to write some kind of a CPU benchmark / stress-test. I do realize there's software out there available that does just that, But i wanted to make my own just for the fuck of it.
User avatar
Eamonn
Party member
Posts: 550
Joined: Sat May 04, 2013 1:29 pm
Location: Ireland

Re: Processor intensive tasks in löve.

Post by Eamonn »

Load variables in love.update and love.draw maybe? Like a ton of them. I'd say that'd be pretty stressful. You could draw an insanely huge map using ATL and not setting the draw range. That's pretty stressful on my computer.

Also, what processor did you get and what was your old one, if you don't mind sharing? :)

EDIT: You could try spawning a lot of shapes using the love.physics module. It's meant to be a little heavier then the rest of the LÖVE module, so drawing a lot of stuff could be a good stress test. Let us know how it goes :) You could have an FPS counter at the top of the screen, so you can just watch it drop... ;)
Last edited by Eamonn on Mon Aug 19, 2013 3:30 pm, edited 1 time in total.
"In those quiet moments, you come into my mind" - Liam Reilly
arundel
Prole
Posts: 31
Joined: Tue Sep 21, 2010 8:49 pm
Location: The Netherlands

Re: Processor intensive tasks in löve.

Post by arundel »

From what I've noticed recently, is that when I run a love file on my laptop which uses 100% of the processor with intense calculations, does only use up 10% of the processor of a very fast pc I ran the same love file with without any difference in FPS. The fast pc even had an fps limit of 60 for some reason, while compared to my slow laptop which has no fps limit. Strange results.
User avatar
veethree
Inner party member
Posts: 877
Joined: Sat Dec 10, 2011 7:18 pm

Re: Processor intensive tasks in löve.

Post by veethree »

Eamonn wrote:Load variables in love.update and love.draw maybe? Like a ton of them. I'd say that'd be pretty stressful. You could draw an insanely huge map using ATL and not setting the draw range. That's pretty stressful on my computer.

Also, what processor did you get and what was your old one, if you don't mind sharing? :)

EDIT: You could try spawning a lot of shapes using the love.physics module. It's meant to be a little heavier then the rest of the LÖVE module, so drawing a lot of stuff could be a good stress test. Let us know how it goes :) You could have an FPS counter at the top of the screen, so you can just watch it drop... ;)
I had an intel core i5 3450 (3.10 GHZ, 3.50 turbo boost), Upgraded to an i7 3770 (3.40 GHZ, 3.90 turbo boost)

The physics module might be a good idea, In one of my tests i tried to just have a large amount of objects, Then update their position each frame (moving them from left to right). With that i was getting 30 fps with 60.000 objects. But that didn't seem to stress the processor too much as the heatsink fans remained at a relatively low RPM and the temperature didn't go above 40°c(It's in the 25°c area with no/little stress, And so far it hasn't gone above 54°c and i've been playing various games etc. while monitoring the temperature). Perhaps if i left that running for hours i'd see some results, But i'm looking for something a bit faster.

Might try something extremely inefficient with multiple nested loops and such.
arundel wrote:From what I've noticed recently, is that when I run a love file on my laptop which uses 100% of the processor with intense calculations, does only use up 10% of the processor of a very fast pc I ran the same love file with without any difference in FPS. The fast pc even had an fps limit of 60 for some reason, while compared to my slow laptop which has no fps limit. Strange results.
Yeah my pc has that 60fps limit as well, My old laptop didn't seem to have that.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Processor intensive tasks in löve.

Post by raidho36 »

That particularry depends on how you measure your FPS and on the OS. For any Windows OS, you're not gonna have any higher actual FPS than 60 if you use system "sleep" function.

As for CPU intensive tasks, I really suggest minimizing CPU load by all costs for any game. Because if your workstation quadruple-i7 or whateverthehell is running your game at 300 FPS, then some average PC only gonna have 15 FPS, all due to too slow logic.

The rule of thumb: just because PC can run it fast doesn't mean you can code it to be slow.
User avatar
veethree
Inner party member
Posts: 877
Joined: Sat Dec 10, 2011 7:18 pm

Re: Processor intensive tasks in löve.

Post by veethree »

raidho36 wrote:That particularry depends on how you measure your FPS and on the OS. For any Windows OS, you're not gonna have any higher actual FPS than 60 if you use system "sleep" function.

As for CPU intensive tasks, I really suggest minimizing CPU load by all costs for any game. Because if your workstation quadruple-i7 or whateverthehell is running your game at 300 FPS, then some average PC only gonna have 15 FPS, all due to too slow logic.

The rule of thumb: just because PC can run it fast doesn't mean you can code it to be slow.
I'm not looking to make an extremely inefficient game, I'm trying to deliberately stress my CPU.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Processor intensive tasks in löve.

Post by Robin »

Note that vsync is enabled by default. This means that on computers that support vsync, there is probably a 60 FPS cap on your game. On computers that don't support vsync, there will not.
Help us help you: attach a .love.
User avatar
veethree
Inner party member
Posts: 877
Joined: Sat Dec 10, 2011 7:18 pm

Re: Processor intensive tasks in löve.

Post by veethree »

Robin wrote:Note that vsync is enabled by default. This means that on computers that support vsync, there is probably a 60 FPS cap on your game. On computers that don't support vsync, there will not.
There's one mystery solved.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Processor intensive tasks in löve.

Post by raidho36 »

Ah, yes. That would depend on refresh rate of the display.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 10 guests