Adventures in GameDev with GameDevHQ! Day 18: From prototype to work of Art.
Going through coursework, we were given art assets to implement into our game and it went from this:
Amazing how much a few professional assets can really make a game come together! Best of all, the switch from 3D (or 2.5D) to 2D was extremely easy. Unity 2D games are still working in a 3D Space, we only need to switch the scene mode from 3D to 2D as well as use more specific 2D tools like BoxCollider2D and Rigidbody2D. The code changes were minimal as well, as you can guess, we only needed to change a few things in code to handle the 2D Physics tools:
For example, The enemys trigger collider code went from:
There were a couple ways we converted 3D into 2D. One way was rebuilding the player from scratch by dragging the player sprite onto the screen, resizing it, adding a BoxCollider2D and a Rigidbody2D (with gravity set to 0) and then attaching the original player script to it and making the appropriate changes as explained before.
Introducing a background was as simple as dragging it into the scene and scaling it to the appropriate size.
There were some issues where the player would appear below the space background, but that was quickly fixed by Unitys sorting layers. Creating a background layer to put the space scene and a foreground layer for the Player, enemy, lasers, etc. did the trick!
I’m amazed at how quickly things are coming together with just some new assets!