autobatch: Automates the use of SpriteBatches when drawing

Showcase your libraries, tools and other projects that help your fellow love users.
JohnnyC
Prole
Posts: 16
Joined: Mon Aug 15, 2016 11:39 pm

Re: autobatch: Automates the use of SpriteBatches when drawing

Post by JohnnyC »

At the very least it is a very noticeable improvement when used with anim8.
Image
Image on the left - autobatch off - 40-48 FPS - 6000 bullets on screen.
Image on the right - autobatch on - 87-90 FPS - 9700-9800 bullets on screen.
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: autobatch: Automates the use of SpriteBatches when drawing

Post by Positive07 »

WOW!! Slime any chance/interest this can be built directly into LÖVE?
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: autobatch: Automates the use of SpriteBatches when drawing

Post by slime »

Positive07 wrote:WOW!! Slime any chance/interest this can be built directly into LÖVE?
Maybe. Doing something like this in love's own codebase would make it a bit harder to maintain or add to love.graphics without breaking things, and in general it makes it harder to reason about performance issues (because you can't easily tell when you did something to make it flush the batch and do a new draw call). I'd prefer if people just used SpriteBatches. But we'll see. :)
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: autobatch: Automates the use of SpriteBatches when drawing

Post by Positive07 »

Thanks for the info, I understand what the issues we should look for are and totally see why using SpriteBatches is recommended this much. Also I'm now glad a tool like autobatch exists
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: autobatch: Automates the use of SpriteBatches when drawing

Post by davisdude »

I gotta say, this is a really great library. On a project I'm working on, it took it from 15 FPS to a steady 60 with no optimizations on my end. I just required the library and that was it. Really couldn't be easier.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
User avatar
holywyvern
Prole
Posts: 8
Joined: Wed Apr 05, 2017 7:06 pm
Contact:

Re: autobatch: Automates the use of SpriteBatches when drawing

Post by holywyvern »

Oh thanks for this, I really was looking for an automatic solution to reduce a container I had (it draws ~400 times, but it may use different sprites at different times and they may change every frame) This changed to 15, so it's really an improvement.
Post Reply

Who is online

Users browsing this forum: No registered users and 66 guests