Eggys Games Banner

My Big Transition To Unity and Getting Used to the Engine

Article Picture
Share on :
Facebook PictureTwitter PictureReddit Picture

When I was releasing games full time it used to be Flash many years ago. However I moved onto Unity now and I have to say I definitely love the engine and what it can do. It's become one of my favourites.

Powerful Prefab System

Right off the bat, I am a developer that loves having a scene to work with and game objects. I am just familiar with this style of development. It's fast and easier to get going. I always find Javascript to slow me down when developing games due to having to handle most objects individually too much and manually setting up your UI. However with Unity I can drag some scripts and physics onto my prefab, drag it in while it's playing and boom I have a prototype up and running in no time.

Unity Hierachy System in Eggys Games

It is really clean when it comes to setting up your game design. Here for Bouncy Egg you can see I set up groups of prefabs and then when I made changes to these it would change on all my scenes for the levels. You do need to be careful with this system if you don't want something changed in another level. Only link the ones you want changed.

It comes with a great UI on the right to tweak everything I need. I set some physics components to it and made it bouncy and it was ready to go in no time. Unity comes with a lot of preloaded components to throw right on prefabs ready to go. This allows you to get a simple bouncing or ball game up in no time.

Bouncy Egg Unity Scene for Eggys Games

Then you can write C# class files that are very re-usable. You can see below a very simple C# snippet from my game. I also made all the code open source on my Github. So if you would like to view this game go check it out here - Bouncy Egg Open Source Files

Unity Code Example for Bouncy Egg

Scene Creation and Testing

Even though Unity was mostly made for 3D you can easily set up a 2D camera, point it in one direction and then put everything on similiar Z axis. You can also manipulate this to your favour which is quite cool by zooming the camera when needed, making it shake, or even putting background elements at different Z positions allowing your background to move in a 3D way and paralaxing made easy. You can see I took advantage of this system in my Unity Game - Eggys Big Adventure

You can also made a different scene for each level. This allows each level to start blank and you can transition between them with very simple code. Makes it very easy to make a game with multiple levels.

It's really amusing to me to press the 3D button for a 2D game and see the sprites layed flat. Not only is it fun but also helpful.

Eggys Big Adventure Levels Unity 3D Mode

Easy Class System in C#

I do love using C# in game development. So far it is my favourite language, it's so easy to make a class that I can re-use over and over for games. Like my fadeout tutorial here. I also can open older projects and simply drag and drop C# files I have already coded directly into my project this allows me to save a lot of time. Calling classes from other classes is quite easy and you can also setup a global main static class to use for global variables.

Static Class Eggys Games

The great thing with C# classes mixed with Unity is you can choose which variables become public or private. Now if it's public you can simply edit it directly in the editor so you don't need to spool up the coding engines again you can just edit any number you have got ready right there while the game is even running in play mode! who needs cheat codes huh?

Player Variables in Unity Eggys Big Adventure

Can Deploy To Everything But Has Some Downsides

Unity is a one size fits all option. You can deploy to Web browser, Android, PC and more. Now this is where I would say there is some downsides. The Android .SDK does not like to play nice with Unity a lot of the time and there is some trial and error involved when the versions are incorrect.

My other big complaint is Unity does not like going backwards with versions. If you open an older project with a newer version of Unity don't be surprised to see a lot of errors. This strict version control can be frustrating and make you need to have multiple versions of Unity for older projects. Backwards capability can be an Issue.

You will also find the Unity Dashboard for monetization to be a living hell. Not sure why Unity made that part so difficult but they're not a fan of multiple projects it seems.

Eggbot vs Zombies Unity Map

Helpful Animation System

I have to say overall Unity is an amazing choice. It also has this great shader utility allowing you to design things like lasers, smoke, fire and other effects. I wouldn't bother with shader coding because it gets complicated but if you use the UI system it's quite good.

You also have UI maps for lots of things. Like animation is easy to drag arrows between things and trigger changes when you need. Here we can see my zombie animation screen in Eggbot Vs Zombies that needed animation changes between my spritesheets.

You can also import spritesheets and can them yourself to turn them into animations. One thing you need to be careful of is the pivot point on where it slices. Unity can mess up easily so make sure you keep it even for slicing.

Unity UI Zombies Animations Screen

Going Forwards

As usual I mostly made web developed games. But going forwards I want to develop a full PC game for steam now that I have gotten used of the engine. I will be aiming for something much huger and am in development of a big egg idle based game.

Dopamine Eggs in Development by Eggys Games

Overall if you are a developer of any size I fully recommend Unity going forwards. It's probably the best engine for developers that want a one size fits all. However if you want better browser games you may need Javascript since not everyone supports WebGL for browser games. If you want a better graphics based engine than you are going to want to go for Unreal Engine. For now Unity is the jack of all trades engine that's best to get started.

Don't let your game ideas only be memes and dreams!