FWIW I've been doing do the latter approach, since it's easier for me to set shader params and such before doing a big batch of similar things. But it does make it awkward for special cases, such as certain enemies or weapons that go in front of everything (like the Fat Beam)
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
2D sprites in a 3D space.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Typically the latter but with a well-ordered way to sort within groups to avoid z-fighting (sprite ID, etc.). I like distinguishing into groups as some effects will want to be applied to only specific groups, etc.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I do the later because I don't have a base object everything inherits from so I could do that. But if I did, I certainly could. I think do what makes the most sense for how your code is designed and how your game requires.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I have multiple grouping layers (similar to your foreground/background example.) I mostly just sort by material and blending modes to reduce draw calls when I can.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I did a hard coded draw order for my really early GBA/DS projects, then moved to priority values. When I moved to 3DS, I added a 3D depth value to each sprite. Sort is by 3D depth first, priority second. Nicely handles things like particles with 3D movement.
-
I didn't even think about 3ds... you definitely want a z value of some kind there
End of conversation
New conversation -
-
-
I liked the hard coded draw order on the sprite based systems. You had hard limits on how many things they could draw, and when using effects the exact draw order mattered. But without those limits, I find a priority field faster to work with and more flexible.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Group-driven order every time. Draw THESE, then draw THESE, then draw THOSE. Nice and clear.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
ive always hard coded the order but there are times it has ALMOST gotten me into trouble and i have to do silly work arounds to make things layer properly that i didnt anticipate at engine groundwork time
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.