This is why we will use a Pixels Per Unit value of 1 for all our textures. The Snake will have a size of 1x1 pixel, which should be 1 unit in the game world. Note: Pixels Per Unit is the ratio between one pixel in the image and one unit in the world. Once we have them in our Project's Assets folder, we can select them in Unity's Project Area:Īfterwards we can change their Import Settings in the Inspector to make them appear in the right size with the right looks: and save the images in the project's Assets folder. Note: right click each link, select Save As. We will use one horizontal and one vertical white line image for our borders: Note: Size is pretty much the zoom factor. If we select the Main Camera in the Hierarchy then we can set the Background Color to black, adjust the Size and the Position like shown in the following image:
We will name it Snake, select any location like C:\GameDev, select 2D in the Template section, and click Create: Let's get started! Assuming you are using a recent version of the Unity Hub, we'll boot the Hub interface and select New, then fill out the dialogue accordingly: These versions are alpha and beta respectively, and more often than not things will break! Troubleshooting broken things isn't fun and causes frustration which you want to avoid when starting out in game development.
Protip: Never update to any version of Unity that has an 'a' or 'b' suffix. Newer versions such as 2019.2 should work as well, however to prevent any confusion it's always recommended to keep to the version of Unity the tutorial was written for. Our Snake Tutorial will use Unity 2018.4 LTS. Even if you don't know those concepts yet, the Tutorial should still be doable, however we recommend you brush up on your knowledge of the mentioned subjects before attempting this tutorial.įeel free to read our easier Unity Tutorials like Unity 2D Pong Game to get used to this amazing game engine.
This tutorial does not require any special skills except some knowledge about the Unity basics like GameObjects and Transforms.
In this tutorial, we will be explaining how to make a simple yet functional clone of Snake. It's been ported to almost all systems out there, even on classic old Nokia phones! Like most arcade games it's still easy and lots of fun to develop your own Snake game. Snake is an arcade game that was created back in the 1970's.