Hi, I am a beginner developer and something has been on my mind for the last week. What are the advantages of implementing 2D games in a 3D environment and how would one go about implementing it?
The advantage of Unity is the ability to build at the click of a button to so many different platforms.
There’s no real advantage or disadvantage to this, it’s simply just a design style typically called “2.5D”.
In Unity, there’s functionality no difference between a 3D and 2D scene. You can mix 3D and 2D elements as you would normally add objects to the scene.
For instance, you can create a 3D world using 3D models or primitives, and 2D characters using SpriteRenderers & Collider2Ds. Both objects would be added onto the scene as usual.
It’s actually all being rendered in a 3D environment there is no separation between 2D and 3D. The only real difference is in the way the camera renders. 2D is generally in orthographic, 3D being in perspective. Though they are not mutually exclusive, 3D can use orthographic and 2D can use perspective. I played a game on the 360 that was using sprites but was on the z plane using a perspective camera, wish I could remember the name of it.
Many years ago it used to be quite different. 2D games didn’t use modern 3D rendering, they would blit graphics on the screen not using any idea of a mesh. Engines now don’t bother separating the two techniques and render the sprites on quads or sprite meshes so there is no need to worry if it’s a 3D mesh or a 2D sprite. They are all meshes and the engine renders what is in the camera’s view. Like @Vryken wrote, add whatever to the scene and it will work.