Creating a simple 2D mini-game – SpaceGirl
This recipe will show you how to create the 2D SpaceGirl mini-game that almost all the recipes in this chapter are based on. The following figure shows an example of the mini-game we will be creating:
Figure 3.1: Example of the 2D SpaceGirl mini-game
Getting ready
For this recipe, we have prepared the images you need in a folder named Sprites
in the 03_01
folder. We have also provided the completed game as a Unity package in this folder, named Simple2DGame_SpaceGirl:
https://github.com/PacktPublishing/Unity-2023-Cookbook-Fifth-Edition.
How to do it...
To create the simple 2D SpaceGirl mini-game, follow these steps:
- Create a new 2D (Core) project.
- Import the supplied
Sprites
folder into your project. - Since it’s a 2D project, each sprite image should be of the Sprite (2D and UI) type. Check this by selecting the sprite in the Project panel; then, in the Inspector panel, check the...