Brave the Expanse: Project Update 3

Erin Kerr
2 min readOct 15, 2022

Adding assets to my top-down space shooter

Game behavior from last update

As of my last update, Brave the Expanse had fully functioning prototype with player movement, laser fire, enemy collisions and spawn manager. To move forward, it was time to add assets to give the game some flavor.

Preparing for Assets in Git

First things first, before I added several new assets to the project to work with, I installed Git LFS (Large File Storage), so I could continue to use Git and GitHub to track and maintain my project versions. I also add the .gitattributes to set which file types should be handled via Git LFS. With Git ready to go, I imported my project assets from GameDevHQ’s Filebase and re-organized them into my project structure.

3D to 2D — Assets

Next, it was time to convert my 3D prototypes to work with 2D assets. For my Player, Laser and Enemy objects, I recreated each from their asset sprite, making sure to add the appropriate script component, copy the previous values to the 2D asset scripts, update any prefab or object reference to the 2D version, and assign the appropriate Tag value. Adding each to the scene, I adjusted the size, rotation, screen bounds and any relative offsets via the serialized fields so the new assets fit well within the scene.

3D to 2D — Background and Foreground

I added a background image to scene to build the environment for the game, resizing it to just fit the screen. Since the game is now in 2D, I updated the Sorting Layers in Unity to include a Background and Foreground. Then, I assigned the Background layer to the background image and assigned the Foreground layer to the Laser, Enemy and Player sprites to ensure they appear over top the background image.

3D to 2D — Collisions

To support object collisions in 2D, I added the 2D Box Collider to the new Player, Laser and Enemy object, enabling “Is Trigger” and resizing the collider boundaries to closely fit around each sprite. I also add the 2D Rigidbody to the Enemy object and zeroed out the Gravity scale. Lastly, I updated the Enemy script to use the OnTriggerEnter2D method instead.

And then…

Sample of game play with assets

There’s quite a bit more to add to get this game deployment ready, but the base functionality is working and it is looking pretty good with the assets added in.

--

--