LOVE performance (framerate)
Posted: Sat May 24, 2014 10:16 pm
I recently got a laptop for doing programming away from home (for the record, a Fujitsu Lifebook, I think p1620, not sure. It's running Windows 8).
For the most part, it's served me well, and I've made a satisfying amount of progress on general design for my platformer project, but, unsurprisingly, drawing graphics is rather slow, and now I'm getting to the point where... significant amounts of graphics are being drawn.
Right now, I'm wondering what general advice can be given on improving graphics performance in LOVE, not necessarily for this project specifically (I've got a couple of other games being fleshed out in my head). At some point, I'm going to take advantage of spritebatches, but unless they're liable to have a great effect, I'd rather put it off until I've got the game's general structure and resource handling better figured out.
What I don't understand is, the game's logic isn't much a problem (removing the draw loop cuts the performance cost of a single enemy instance to under a tenth), and reducing the size of the main character sprite (obviously by shrinking the source image, but dynamic scaling works almost as well) has a very noticeable effect on framerate. So much so that I doubt that I could draw just 640x480 pixels in a single call at 30fps, let alone a scrolling background which extends beyond the screen with at least a dozen objects on top of that... although I haven't strictly tested this yet, and plan to do so later.
As it is, I'm worrying that I'll have to a. abandon LOVE, write code-in-progress in lua and gradually convert portions into c++ as they're finalized, b. reduce the resolution, which means a significant change in visual style and/or gameplay, or c. just move development to my desktop (which means drastically less development time in general).
For the most part, it's served me well, and I've made a satisfying amount of progress on general design for my platformer project, but, unsurprisingly, drawing graphics is rather slow, and now I'm getting to the point where... significant amounts of graphics are being drawn.
Right now, I'm wondering what general advice can be given on improving graphics performance in LOVE, not necessarily for this project specifically (I've got a couple of other games being fleshed out in my head). At some point, I'm going to take advantage of spritebatches, but unless they're liable to have a great effect, I'd rather put it off until I've got the game's general structure and resource handling better figured out.
What I don't understand is, the game's logic isn't much a problem (removing the draw loop cuts the performance cost of a single enemy instance to under a tenth), and reducing the size of the main character sprite (obviously by shrinking the source image, but dynamic scaling works almost as well) has a very noticeable effect on framerate. So much so that I doubt that I could draw just 640x480 pixels in a single call at 30fps, let alone a scrolling background which extends beyond the screen with at least a dozen objects on top of that... although I haven't strictly tested this yet, and plan to do so later.
As it is, I'm worrying that I'll have to a. abandon LOVE, write code-in-progress in lua and gradually convert portions into c++ as they're finalized, b. reduce the resolution, which means a significant change in visual style and/or gameplay, or c. just move development to my desktop (which means drastically less development time in general).