Simple test of spritebatch

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
Party member
Posts: 687
Joined: Wed May 02, 2012 11:05 pm

Simple test of spritebatch

Post by Ref » Fri Dec 07, 2012 4:51 pm

Thought I'd share a test script.
Just trying to see what effect a large number of quads in a spritebatch had on frame rate and what happens when a portion of a spritebatch is off the screen (frame rate increases).
Of course, I couldn't just try one thing so all kinds of stuff added (just to confuse things).
Script contains:
quads (10,000)
mouse_contriol (a mouse selection menu system)
scrollbar (parameter adjustment)
but NO canvases!
In spite of all the junk, am able to get 100 fps on my laptop.
A test script
(50.27 KiB) Downloaded 121 times

User avatar
Posts: 21
Joined: Fri Oct 12, 2012 1:05 am
Location: Brazil

Re: Simple test of spritebatch

Post by frpnit » Sat Dec 08, 2012 2:45 pm

Spritebatches are very effective, i've done a simple test before on my machine (a core i7) and in an old one (a pentium D with intel 950 integrated graphics) - just scrolling a tiled map with arrow keys - and the difference was impressive, if i'm not remembering wrong, the test ran 2.3 times faster on the old machine, and 6x faster on my i7.

I really do not understand why people have complains about spritebatches.
  • Graphic Designer
  • Hobbyst Programmer

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests