GameBulbGame development in a nutshell

​With over 4.5 million developers using Unity, it is one of the best game engines today. Here are a list of some great tips on different parts of development. These tips depend on the project and your personal preference.

Organization

1. Organize Your Project Structure

​Whether it’s a small project or a long term project always make sure to organize your project. This will give you quick access to the project files and make it easy to find anything. The project structure should be categorized depending on your project:

2D:

Effects

Environments

Fonts

Prefabs

Scenes

Scripts

Sounds

Sprites

UI

3D:

Effects

Environments

Fonts

Materials

Prefabs

Scenes

Scripts

Shaders

Sounds

Textures

UI

You can add sub-categories for more organization. For example if you have more than one environment/world create sub-folders for each world so you can easily manage them.

​Mobile Optimization

2. Use One Scene

Many scenes will make your mobile game slower and take time to load. Use only one scene to make your mobile game. Here’s how. Make a global object that will be always active and add a script called GameController. Consider each scene/layout as an object so for each scene create an empty object in the hierarchy and then with using the GameController activate and disable the scenes you wants. This will load your game much faster.

​3. Use Right Materials

​For mobile games always use the mobile shaders available in unity. If you are making a 2D game use the mobile unlit shader because 2D games doesn’t require lighting and shadows.

4. Never Use Instantiate

​If you want to create new objects never use the instantiate function for a mobile game because it will cause the game to flicker and lag. Instead preset your objects you need to use in the scene and activate them when needed.For example if you are creating enemies, if the player kills an enemy , disable it and when you need to create a new enemy, reposition it and activate it back again.

Scene Design

5. Always Use Prefabs

​Always use prefabs for your game. Prefabs are easy to manage and has all components that you need for an element. Also when you change the prefabs, all the instances of the prefab will changes.

6. Use Depth for 2D Games Too

Yes, depth (Z) must be used for 2D Games too. If you are trying to create an environment use (Z) depth as layering and make your scene, but before you do that make sure to set your camera to orthographic. Here is an example:

​7. Create Art First

Unless it is a prototype, make sure you make create the needed art for your scene in the game. Your game might work because of different sizes and you will need to rebuild and design the scene from scratch.If you want to start off with art you can create temporary art but make sure to create your art with the same size.

Game Design

8. Keep UI Simple

​The UI of the game must simple and easy to access for the player so he can navigate through scenes and options. One way is to put buttons and bars on the edges so it doesn’t cause problems like accidentally clicking the buttons. Also use the new UI system.

9. Use Light Effectively

​Focus on finding the right lighting for your 3D games. Lighting has a huge impact on your game visuals and can make your game visually better if you know how to adjust the light accurately.​ So keep this in mind when you create your next game.

10. Add a Global Game Object

This is one of the best way to control your game. In the hierarchy make an empty object and name it game and add GameController script for it. This object should be the only object to contain the GameController script and it must be always active in the hierarchy. Now you can control the game scenes, the players, settings all within the GameController and hold data like total stars and max level reached and total coins etc...