when does your game slow down?

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.
User avatar
hertzcastle
Party member
Posts: 100
Joined: Sun Jan 04, 2009 4:51 pm
Location: brighton, uk

when does your game slow down?

Post by hertzcastle »

hi!
just getting my first couple of demos going and planning some bigger projects. i was wondering if anyone could provide me with an example of a game that pushes love too far, as in it's too power hungry for love to deal with. anything with slowdown etc. i basically want to see where the ceiling is in terms of power. im from a blitzmax background and would really appreciate any help in seeing what the difference between the two is speed-wise. i understand that every computer's different, but if anyone has anything that slows down their computer, id really love to see it.
thanks!x
User avatar
napco
Party member
Posts: 129
Joined: Fri Jun 12, 2009 9:28 pm
Location: Ital... ehm...

Re: when does your game slow down?

Post by napco »

I use a computer with only 1 GB RAM to program with LOVE, in order to optimize my code. It slows down when displaying more then 750 32x32 tiles per frame or, obiviously when a load function (es newFont or newImage) is running continuously inside the update callback.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: when does your game slow down?

Post by bartbes »

The biggest slowdowns are when you either send a lot to the GPU (newFont, newImage, etc) or use huge loops. (i.e. draw pixel-by-pixel)

EDIT: and.. moved.
User avatar
hertzcastle
Party member
Posts: 100
Joined: Sun Jan 04, 2009 4:51 pm
Location: brighton, uk

Re: when does your game slow down?

Post by hertzcastle »

ah cool ok! thanks for the advice!
my computers only got 1gb ram as well. doing most of my tiles at 64 x 64 and i guess i'll be drawing them to an 800 x 600 window. been using 640 x 480 up till now. 800 x 600 should be ok tho right? i mean, as long as i dont have too many layers to my map(i dont plan on having more than 2 or 3).
thanks again!x
User avatar
napco
Party member
Posts: 129
Joined: Fri Jun 12, 2009 9:28 pm
Location: Ital... ehm...

Re: when does your game slow down?

Post by napco »

It should be ok, but remember to draw only visible tiles (using this method you can load very large maps). Another answer is Mode7. Mode7 slows down a lot my game (it's unplayable)...
User avatar
hertzcastle
Party member
Posts: 100
Joined: Sun Jan 04, 2009 4:51 pm
Location: brighton, uk

Re: when does your game slow down?

Post by hertzcastle »

how would you go about setting up a loop that only draws visible tiles? so far ive just been using

Code: Select all

 for y = 1, hMapIn do
	for x = 1, wMapIn do
		sheetIn:seek(mapIn[y][x])
		love.graphics.draw(sheetIn, (x * wTileIn) + xOffIn, (y * wTileIn) + yOffIn)
	end
end
User avatar
hertzcastle
Party member
Posts: 100
Joined: Sun Jan 04, 2009 4:51 pm
Location: brighton, uk

Re: when does your game slow down?

Post by hertzcastle »

is that what scissor() is for?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: when does your game slow down?

Post by bartbes »

That is what setScissor does, yes.
User avatar
hertzcastle
Party member
Posts: 100
Joined: Sun Jan 04, 2009 4:51 pm
Location: brighton, uk

Re: when does your game slow down?

Post by hertzcastle »

so, do you just use setScissor(args) once, or do you have to use setScissor(no args) every draw call? probably sounds like a stupid question but with bmax you had to use Cls every loop.
thanks guys.x
x
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: when does your game slow down?

Post by bartbes »

Once, doc page. The no argument version is only to clear the scissor (draw everything again)
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 151 guests