New guy, performance question

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
timmeh42
Citizen
Posts: 90
Joined: Wed Mar 07, 2012 7:32 pm
Location: Cape Town, South Africa

Re: New guy, performance question

Post 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
User avatar
Plu
Inner party member
Posts: 722
Joined: Fri Mar 15, 2013 9:36 pm

Re: New guy, performance question

Post 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 :)
Kyle
Party member
Posts: 146
Joined: Sat Mar 16, 2013 9:46 pm

Re: New guy, performance question

Post 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!
scutheotaku
Party member
Posts: 235
Joined: Sat Dec 15, 2012 6:54 am

Re: New guy, performance question

Post 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/
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: New guy, performance question

Post 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???)
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: New guy, performance question

Post by Nixola »

Jasoco, didn't I PM you the Geometry branch of LÖVE, along with a Windows build?
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
spectralcanine
Citizen
Posts: 65
Joined: Sat Dec 22, 2012 8:17 am

Re: New guy, performance question

Post 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?
User avatar
Rob.m
Prole
Posts: 23
Joined: Mon Mar 11, 2013 1:57 am

Re: New guy, performance question

Post 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.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: New guy, performance question

Post 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?
User avatar
slime
Solid Snayke
Posts: 3147
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: New guy, performance question

Post 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.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests