THINGS TO AVOID/CONSIDER WHILE MAKING AN ARCADE GAME WITH MULTIPLE LEVELS

Dvij Kalaria
3 min readJun 2, 2020

--

  1. For scripting, to control level elements like score, powerups owned, player type, player upgrades and other elements, currently active player type with owned upgrades maintain a GameManager gameobject and add it to the don’t destroy list in the title or man menu scene. Attach scripts to it to manage and store these things including game options such as background and effects music.

2. Always, create prefabs of common game UI elements in each game for example, the display of score, lives and so on. Refrain from copy pasting these from one scene to the other as when you would have to change the style or add something to these, you will have to make the same changes to these elements of all the levels, this will consume a lot of time, so always have a habit of converting these objects to prefab and add these prefabs to all the levels. Hence, when you would like to change the style, change it and add to any one and click on update prefab to have this change reflected at all the levels.

3. Similarly, make prefabs for pause menu, game over menu, options menu or any other dialogs used in the game. For these menus, add an empty gameObject as the parent. Attach all scripts like to show, hide the menu, manage game over when won, lost and other events. Add the panel game object and the background translucent image to blur/outfocus background elements. Enable/disable these gameObjects when to show/hide the menu.

4. Always, make a habit to give the active game objects that will be used in the scripts meaningful unique names and always use :-

GameObject.Find().GetComponent()

method to refer to any gameobject or its component in the start function of the script. Refrain from declaring the variable as global and then drag-dropping the gameobject to be referred to in the editor view. This might seem tempting and fast for setting up the first level, but then when you extend it to more levels, you will have to do the same drag-dropping. So, do make this a habit in the beginning itself.

Also, note that to refer to inactive gameobjects, use

parent.transform.Find(“name”).gameObject

method but try to refrain from using this, instead use the method as described above as in menus as much as possible.

5. Lastly, always maintain all the assets under the resources folder and for referring to prefabs such as bullets, explosions, sound effects, shaders, textures use Resources.Load() method instead of drag-dropping also for prefabs. This will also have to be done for every level and if for eg you have multiple bullets, player prototypes, you will have to drag drop the same sound effects for each of them for the common script. Hence, instead add the Resources.Load() only once for the script.

--

--

Dvij Kalaria
Dvij Kalaria

Written by Dvij Kalaria

Don't take life so seriously, you wont come out of it alive anyways!

No responses yet