Hollow Knight — An atmospheric 2D action-adventure Indie game.

The Essential Guide to Indie Game Development in Unity

Stepping Beyond Tutorials

Noor Binte Amir

--

Once you’re hit with the urge to make a game, the excitement tends to die very quickly once you realize what kind of work commitment you’re looking at. How does one put their idea into practice without tutorials leading them every step of the way?

Chances are you’ll get your hands on a good tutorial series. Maybe you’ll try your luck at the paid route. If it doesn’t teach you to think for yourself, you’ll still find yourself unable to start with your own idea.

The First Step

Before you dive into your game or even developing your idea, I recommend you check out the tutorials at Unity’s own Learn section. Check out all the relevant tutorials and spend time working on making some projects from Unity’s project page. This will give you insight about the inner workings, capabilities and workflow of the engine.

If you feel confident in your abilities at the end of this step, you can jump right into making your game! If you’re unsure about where to go from here, keep reading the article for a tutorial that takes you through all the stages of game development by learning to figure these things out on your own.

Deciding on an Idea

If you’re a beginner, and you’ve already thought of an idea, I recommend you jot it down for later and work on something basic for your first original game. It doesn’t have to be a proper game. One level of gameplay would be perfect. Check out some classic games or pick out a single aspect of gameplay you’re interested in and try to make it your own.

What I Picked for this Tutorial:

For the purposes of this tutorial, I decided to make a simple jump-on-enemies-to-kill-them game. The challenge is to make it slightly different so that it doesn’t feel like playing another level of Super Mario.

Our player is a short round character infuriated at being walked over by the tall townsfolk. With enough power-ups, the player can jump high and squash the enemies by landing on them.

Artwork showing our characters: The player (left) and enemy (right)

Setting up the Project

Launch Unity and set up a Unity 3D project. We’re choosing 3D instead of 2D so that we can set up our artwork in 3D space.

Click on the Main Camera in the Sample Scene visible in the Heriarchy tab. Set the camera’s projection to Orthogrophic in the Inspector. We will set up our own script for a depth effect.

Make sure that you reset the transforms of every current and new game object placed into the scene.

Importing Artwork

In the Project pane, create a new folder Art under the Assets folder. Copy BackDrop and LandSolid exported in this tutorial into the Art folder. Select each image in turn in the Project view and set the Texture type to Sprite (2D and UI) in the Inspector. Drag and drop both images into the Heriarchy. Now our art is ready to use in our scene.

Keep your Heriarchy nice and clean by creating a new game object Scene for holding all the landscape elements. Drag and drop Backdrop and LandSolid onto the Scene object to add them as children.

Reordering Layers

We have to set up our artwork in the correct order. Click on Backdrop or LandSolid and go to Sprite Renderer -> Sorting Layer -> Add Sorting Layer in the Inspector.

Add two layers: Background and Ground.

Click on LandSolid in the Heriarchy and change its sorting layer to the newly created Ground Layer. Change Background’s sorting layer to Background Since we want LandSolid to lie in front of the Background, we will go to Sprite Renderer -> Order in Layer and set it to 1 for LandSolid and 2 for Background. Smaller the layer number, the closer it is in order to the Camera.

Set the z-transform position of LandSolid to -5 as shown:

That’s it for Part 1 of this tutorial, stay tuned for Part 2 next week to learn how to set up the characters and script their behaviours! Until then, you can check out my Adobe Illustrator tutorial to make game artwork of your own!

Unlisted

--

--