Spritebatch clear or pseudo removal

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
easy82
Party member
Posts: 184
Joined: Thu Apr 18, 2013 10:46 pm
Location: Hungary

Spritebatch clear or pseudo removal

Post by easy82 »

Hello guys!

I was wondering, which solution is better:
  • Clearing a spritebatch and adding sprites every frame,
Thank you for your answers!
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Spritebatch clear or pseudo removal

Post by zorg »

If i remember a past discussion about this correctly, if you're going to update all, or at least a large percentage, of the sprites you have in a batch each frame, then it doesn't matter; otherwise, go for the second one.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
easy82
Party member
Posts: 184
Joined: Thu Apr 18, 2013 10:46 pm
Location: Hungary

Re: Spritebatch clear or pseudo removal

Post by easy82 »

Thank you Zorg! :)

I'm updating most of them right now, so I could see no difference between the two solutions in performance. Later there will be situations when only a few will be updated, so I guess the best is the pseudo remove version.
Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests