A background disproportionately consumes CPU
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- TechnoCat
- Inner party member
- Posts: 1612
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: A background disproportionately consumes CPU
When I take out the 3 image calls you have. I get 155FPS. Cool landscape generation.
Re: A background disproportionately consumes CPU
Are you sure? I think the problem is that you draw 1000 polygons every frame (and recompute their coordinates).Batrachus wrote:Without background image the FPS stabilized on 61. With background image it was less than 1.
I am attaching a version which uses a framebuffer, and while not moving, it uses almost no CPU.
- Attachments
-
- main.lua
- Using framebuffer to reduce CPU load
- (2.11 KiB) Downloaded 72 times
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
Who is online
Users browsing this forum: No registered users and 12 guests