Will/Would you add support for 2D if your system already working in 3D?

Started by
3 comments, last by Ungunbu 6 years, 12 months ago

For any system that already worked in 3D, is it worth the hassle to support 2D again for whatever reasons....

For example, in Unity, they support 2D and 3D games....

But when you editing stuff, they can well do it in 3D, and they don't have special support for 2D.

They just throw out a dimension in 3D so that you work as if in 2D....

I am considering to drop the 2D support for RAM save.

Thanks

Jack

Advertisement

I am considering to drop the 2D support for RAM save.


Are you talking about writing an engine and removing the code for 2D systems to save code space? Or something else?

The vast majority of a game is its textures, sounds, and other big asset files. Unless your engine code is really crazy, I doubt any 2D subsystems will make a noticeable impact on RAM use compared to those.

Nowadays all is quad based for sprites, so it's simply a quad batching.

In my opinion the only difference between 3D and 2D is the 'projection' matrix. You even need a z-buffer if you have two objects that overlap each other regardless if it is in 3D or 2D and so will always have a Z index in your coord system otherwise this wouldnt be possible or you need to sort draw-calls by your own what is a waste of CPU power.

What you say about Unity isn't true. The whole rendering process is optimized for 2D when using the relevant component (SpriteRenderer). An engine supporting 2D games doesn't just "lock" the 3D dimension, it also performs a lot of optimizations when rendering 2D objects. It certainly doesn't submit 1 draw call per sprite/quad. You could do everything with a pure 3D engine but you would need to do all the batching work by yourself.

TL;DR; a modern 2D engine can be considered a 3D engine that performs heavy optimizations under the hood intended to improve rendering performance of 2D objects.

Whether or not you want to have that feature in your engine is entirely up to you.

Since you mention Unity also consider that they have a few more 2D features like sprite packing (automatic creation of sprite atlases), 2D animation support and even an upcoming integrated tile editor (which looks quite powerful)

This topic is closed to new replies.

Advertisement