Map drawing really slow

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.
coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Map drawing really slow

Post by coffee »

So you can run other LOVE things but not your code. I would say some performance flaw in your code. But did a look to your code and apparently there isn't a big map or off screen objects being wasted. I had no problems with it (+60fps) but I'm getting at start that strange map scrolling moving to left and wasn't for sure smooth al all. So back to to your code. Your camera code is very strange for me and I would bet if there is problems is for sure there. Try please use another 3rd party camera first and see if you having same kind of performance.
User avatar
master both
Party member
Posts: 262
Joined: Tue Nov 08, 2011 12:39 am
Location: Chile

Re: Map drawing really slow

Post by master both »

josefnpat wrote:
master both wrote:
Can you please post your hardware specs?
ok, but dont laugh:
samsung n150 2010
os windows xp service pack 3
ram 1gb
graphic card Intel(R) Graphics Media Accelerator 3150
CPU Intel(R) Atom(TM) CPU N450 @ 1.66GHz

as you can see its really bad, but i dont understand why can i run mari0, almost, fine
What version of the graphics drivers are you running?

It's very odd that mariO runs well and yours does not.

Compare driver versions against this.
i have the latest version, and i have made some comparisons between my game and Mari0 and there are 10 FPS different in the speed. my game gives 31 FPS and mari0 gives 41, so as a conclusion my game was runnig normal all this time :P and my graphic card sucks. lol.
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: Map drawing really slow

Post by josefnpat »

So upping the the driver helped I see.

Mario, unless I'm mistaken (and slime can probably chime in here) takes the images and makes them into one image on load, so that they only have to draw 1-2 backgrounds per frame. If you're really pushing for FPS, there are a few things you can try using;
  1. Canvas
  2. Framebuffer
  3. SpriteBatch
  4. ImageData
edit: TIL the [wiki] tag.
Last edited by josefnpat on Mon Sep 24, 2012 8:28 pm, edited 1 time in total.
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Map drawing really slow

Post by Lafolie »

Get some [wiki] tags in there :P

Spritebatches are good, especially if you don't have to update them. You can give the batch a bunch of quads and store it for later so that you don't have to keep rebuilding it all the time.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
User avatar
master both
Party member
Posts: 262
Joined: Tue Nov 08, 2011 12:39 am
Location: Chile

Re: Map drawing really slow

Post by master both »

josefnpat wrote:So upping the the driver helped I see.

Mario, unless I'm mistaken (and slime can probably chime in here) takes the images and makes them into one image on load, so that they only have to draw 1-2 backgrounds per frame. If you're really pushing for FPS, there are a few things you can try using;
  1. Canvas
  2. Framebuffer
  3. SpriteBatch
  4. ImageData
edit: TIL the [wiki] tag.
the problem is that i cant support canvas, and i already tried spritebatch, but it didnt change the FPS. but it doesnt matter anymore, cause i change of computer and it run perfect now. the only problem i am facing now, is collision (if you havent heard of it) lol
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Map drawing really slow

Post by Lafolie »

It does matter though, because there are still people with computers like that, unless you don't mind dropping them from your audience. Anyway, I suspect that you were doing something odd with spritebatches, they're pretty useful. Were you rebuilding the batch every loop?
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
User avatar
qaisjp
Party member
Posts: 490
Joined: Tue Sep 04, 2012 10:49 am
Location: United Kingdom
Contact:

Re: Map drawing really slow

Post by qaisjp »

I have 40fps, but the movement replicates 1fps. Original Poster, use the *dt variable with a random x multiplier. (then multiply that by the direction, 1 or -1)
Lua is not an acronym.
User avatar
master both
Party member
Posts: 262
Joined: Tue Nov 08, 2011 12:39 am
Location: Chile

Re: Map drawing really slow

Post by master both »

qaisjp wrote:I have 40fps, but the movement replicates 1fps. Original Poster, use the *dt variable with a random x multiplier. (then multiply that by the direction, 1 or -1)
Yeah i already did that, i change my code a little bit, its all working fine and i also make use of the spritebatch which does a little help, but thanks for the support, i love this communiry.

btw, your coding song of the week is awesome, i love NIN.
User avatar
qaisjp
Party member
Posts: 490
Joined: Tue Sep 04, 2012 10:49 am
Location: United Kingdom
Contact:

Re: Map drawing really slow

Post by qaisjp »

master both wrote:
qaisjp wrote:I have 40fps, but the movement replicates 1fps. Original Poster, use the *dt variable with a random x multiplier. (then multiply that by the direction, 1 or -1)
Yeah i already did that, i change my code a little bit, its all working fine and i also make use of the spritebatch which does a little help, but thanks for the support, i love this communiry.

btw, your coding song of the week is awesome, i love NIN.
your welcome, i know - that album is EPIIIC.
Lua is not an acronym.
Post Reply

Who is online

Users browsing this forum: No registered users and 219 guests