Drawing sprites with citro2d is slow?

Post Reply
TheGag96
Posts: 2
Joined: Wed Oct 23, 2019 1:33 am

Drawing sprites with citro2d is slow?

Post by TheGag96 » Fri Mar 06, 2020 2:36 am

I've been making a homebrew game for a little while now using citro2d. Through making it, I've noticed that citro2d, at least through the way the gpusprites demo draws sprites, can only get around 350 sprites drawn to both screens (~700 total draws) before it starts to lag on o3DS. I know the console is more capable than that, but I cannot figure out how you're supposed to draw sprites efficiently with this library. With those sorts of numbers, there's no way you could draw tile-based graphics without collapsing groups of tiles into single textures or something, and even then, you'd still be pushing things.

I don't know much about graphics programming, but I was wondering if it's because citro2d has no kind of sprite batching and is thus spending a bunch of time switching textures unnecessarily. That's just a wild guess though... Anyone know what's wrong? Is it me? Is it the library? Thanks!

TheGag96
Posts: 2
Joined: Wed Oct 23, 2019 1:33 am

Re: Drawing sprites with citro2d is slow?

Post by TheGag96 » Sun Mar 08, 2020 8:11 pm

I went through and looked at citro2d to see if it had anything to prevent unnecessary texture switching. It actually does have some checks for that, and when I tried recompiling with them off to see what would happen, I could draw even fewer sprites before things slowed down. So that's definitely not it... Any ideas?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest