At the very least it is a very noticeable improvement when used with anim8.
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.
autobatch: Automates the use of SpriteBatches when drawing
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: autobatch: Automates the use of SpriteBatches when drawing
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)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
- slime
- Solid Snayke
- Posts: 3170
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: autobatch: Automates the use of SpriteBatches when drawing
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.Positive07 wrote:WOW!! Slime any chance/interest this can be built directly into LÖVE?
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: autobatch: Automates the use of SpriteBatches when drawing
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)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: autobatch: Automates the use of SpriteBatches when drawing
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
- holywyvern
- Prole
- Posts: 8
- Joined: Wed Apr 05, 2017 7:06 pm
- Contact:
Re: autobatch: Automates the use of SpriteBatches when drawing
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.
Who is online
Users browsing this forum: Google [Bot] and 0 guests