Page 2 of 4

Re: New guy, performance question

Posted: Sat Mar 16, 2013 7:22 pm
by timmeh42
spectralcanine wrote:Just out of curiosity, why would you need to map texture coordinates to triangles in a 2D game?
Shockwave-like distortions
Smooth arbitrarily-curved textured things (eg traintracks from birds-eye-view)
Faux-3D perspective

...among many others

Re: New guy, performance question

Posted: Sat Mar 16, 2013 10:33 pm
by Plu
(the entire "Programming in Lua" book, of which the first edition is free online, is a great place to learn Lua btw: http://www.lua.org/pil/contents.html ).
Lua seems to be an interesting language, but it's a good thing I'm an experienced programmer already because that doesn't look like something that'd help a rookie.

Thanks for all the help and advice so far guys :)

Re: New guy, performance question

Posted: Sat Mar 16, 2013 11:29 pm
by Kyle
timmeh42 wrote:
spectralcanine wrote:Just out of curiosity, why would you need to map texture coordinates to triangles in a 2D game?
Shockwave-like distortions
Smooth arbitrarily-curved textured things (eg traintracks from birds-eye-view)
Faux-3D perspective

...among many others
Also, skeletal animation and such!

Re: New guy, performance question

Posted: Sun Mar 17, 2013 1:16 am
by scutheotaku
Plu wrote:
(the entire "Programming in Lua" book, of which the first edition is free online, is a great place to learn Lua btw: http://www.lua.org/pil/contents.html ).
Lua seems to be an interesting language, but it's a good thing I'm an experienced programmer already because that doesn't look like something that'd help a rookie.

Thanks for all the help and advice so far guys :)
Yep, that book can be a little tricky for a complete newbie - I definitely took into account you knowing at least basic programming concepts :) For learning Lua, I'd usually recommend a really basic "programming concepts with Lua" tutorial, and then the book.

Oh, and this "Lua for Programmers" series should be useful for you too: http://nova-fusion.com/2012/08/27/lua-f ... rs-part-1/

Re: New guy, performance question

Posted: Sun Mar 17, 2013 3:57 pm
by Jasoco
Yeah, textured triangles would make my day. I wish I could play with 0.9.0 now. For now MoNkEyMaN's library is fine but it also relies on pixelEffects which many systems have problems on. (You should see how it looks in Windows 7 under Parallels on my machine. Whaaaaa???)

Re: New guy, performance question

Posted: Sun Mar 17, 2013 4:11 pm
by Nixola
Jasoco, didn't I PM you the Geometry branch of LÖVE, along with a Windows build?

Re: New guy, performance question

Posted: Sun Mar 17, 2013 6:28 pm
by spectralcanine
Until what year would people be bound to OpenGL 1.X and not use shaders?
I honestly don't understand this notion of "some computers older than me don't support shaders, must not use them", as every computer from the last 10+ years supports them. Yes, also those old bad Intel integrated chips (and if your computer doesn't support them as either extensions or as core (aka OpenGL 2), then you should probably buy a new one...).

About skeletal animations, how are triangles (or texture coordinates) related?

Re: New guy, performance question

Posted: Sun Mar 17, 2013 10:46 pm
by Rob.m
I am running an old (and out dated) Core Duo 2.66Ghz system.

I can get about 8000 FPS on one simple animation if I remove love.graphics.clear() and Just do the 'changed' screen render but I have all sorts of buffer issues and it is unworkable.

If I just use the standard setup (run.lua) then I get about 500 FPS for the same simple animation.

I can wind up the animations to about 10,000 and the FPS drops to about 200 FPS. Still very usable.

Re: New guy, performance question

Posted: Mon Mar 18, 2013 12:01 am
by Jasoco
Nixola wrote:Jasoco, didn't I PM you the Geometry branch of LÖVE, along with a Windows build?
Nope. You don't happen to have a Mac version too, do you?

Re: New guy, performance question

Posted: Mon Mar 18, 2013 12:33 am
by slime
Rob.m wrote:I am running an old (and out dated) Core Duo 2.66Ghz system.

I can get about 8000 FPS on one simple animation if I remove love.graphics.clear() and Just do the 'changed' screen render but I have all sorts of buffer issues and it is unworkable.

If I just use the standard setup (run.lua) then I get about 500 FPS for the same simple animation.

I can wind up the animations to about 10,000 and the FPS drops to about 200 FPS. Still very usable.
The performance difference between 8000fps and 500fps is the same as the performance difference between 60fps and 67fps.

http://www.mvps.org/directx/articles/fp ... e_time.htm
http://renderingpipeline.com/2013/02/fps-vs-msecframe/

LÖVE also adds a cap of 1000fps to your framerate by default (the love.timer.sleep in love.run), to have huge CPU/GPU usage savings at no real cost.

It's not a good idea to do these micro-optimizations before you have anything to optimize, let alone anything that's slowing you down enough to cause real performance issues. Doing that sort of "dirty rectangles" approach is especially not so good because it's not what graphics hardware has been designed for.