Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Voodoo Dev

Manual.
To quickly organize your project
and your code

(c) Voodoo 2021 - All Rights Reserved


This document is intended
for the external studios
working with Voodoo.
You are all welcome to check it out whenever you
struggle with technicalities or before starting a new
project.

These guidelines are not mandatory of course, but we


highly recommend you to follow them. We have tried
to bring together some of the most important and
impactful tips we could think of.

This will impact game development speed, game


performance (thus KPIs, especially when scaling), and it
will also help anyone (from Voodoo or elsewhere) to join
you during game development.

Don’t hesitate to send us feedback on any of these


points!

(c) Voodoo 2021 - All Rights Reserved


Summary :
1 …………………. Organise your project

2 …………………. Unity-specific Folders

3 …………………. Github and Sourcetree

4 …………………. Prefabs are essential

5 …………………. Scriptable objects

6 …………………. Physics

7 …………………. Use Events

8 …………………. How to get reference to your object

9 …………………. When to get references?

10 ………………... Behind your UI

11 ………………… More about scenes

12 ………………... Sort it out!

13 ………………... The requirements of the QA

14 …………………. Save player progression

Appendices …….. Resources

(c) Voodoo 2021 - All Rights Reserved


1.Organize your project.
● Create in the root of your project a clear folder
hierarchy, which contains only basic categories, e.g.:

DON’T DO

● Put any downloaded assets in a single folder named


StorePackages like this example :
StorePackages > PackageName > asset.png

● Every part of your project must be written in English


● Separate your scripts. A class should have only one
job. Check out this simple example here

(c) Voodoo 2021 - All Rights Reserved


2.Unity-Specific Folders.
● Resources
This folder can be used to store assets that need to be
loaded at runtime with Resources.Load().
Be careful: every asset included in any Resources
folder will be included in your build, even if they're not
used.

● Editor
This folder should contain scripts used only in the
editor, like tools and other development helpers. Those
scripts won't be included in your build.

● If you want more information about specific Unity


folders, you can find the link to the Unity documentation
in the resources.

(c) Voodoo 2021 - All Rights Reserved


3.Github and
Sourcetree.
● These are versioning tools that allow you to keep a
track of your production changes. They allow you to
share your project with other people and teams

● When you work on your game it is essential to use


one of the programs below in order to organize your
production. They are needed to work with Voodoo’s
devs

Get Github here


Get SourceTree here

(If you’re already using some other versioning


interface, it’s alright, use your favorite, but it’s
recommended to stay on Github or Bitbucket for the
versioning part.)

(c) Voodoo 2021 - All Rights Reserved


4.Prefabs are essential.
● Convert each object / group of objects into
distinguishable prefabs.

● Pay attention that the prefabs parents scale are in


1,1,1 to avoid deformations

● Use prefabs as an autonomous set of objects (no hard


reference)

(c) Voodoo 2021 - All Rights Reserved


5.Scriptable Objects.
● Avoid putting all the values and data directly on
objects. You will save time if you want to change them
in the future

● Favor the use of scriptable objects to stock the main


configurations.

● Data kept inside scriptable objects should not be used


to store user-created information (e.g. skin purchase
status) but rather should contain static info, such as
skin name and icon.

(c) Voodoo 2021 - All Rights Reserved


6.Physics.

● Avoid using MeshCollider for simple shapes, you can


often replace them by primitive collider (such as cube
or sphere)

● Use the layers to determine if an item should interact


with another item

● When trying to identify an item after a collision, it is


better to check the layer rather than tags

(c) Voodoo 2021 - All Rights Reserved


7.Use Events.
(System.Action)

● Events allow you to listen to events happening in the


game.

● Listening this way allows you to avoid hard links


between objects.

(c) Voodoo 2021 - All Rights Reserved


8.How to Get references
to your objects.
● There are a lot of different methods to get a
reference to an object.

You should avoid the following ones:


X GetChild()
Breaks if you move any object in the hierarchy.

X GameObject.Find()
Extremely heavy operation
Breaks if you rename the object:

X Transform.Find()
Breaks if you rename the object:

Do it this way :
GetComponent() (or link directly in the
inspector as long as it's in the same prefab)

(c) Voodoo 2021 - All Rights Reserved


9.When to get
references? Use Awake() and
Start()

● Awake is always called before Start, it is used to


setup your references when needed (Use all your
GetComponents there)

● Start is used to setup these references to their initial


states

● If you don't want a public variable to be modifiable


in the inspector, you can set it to private and use a
public getter or add the [NonSerialized] attribute to it

(c) Voodoo 2021 - All Rights Reserved


10.Behind your UI.
● On your canvas scaler component, choose
1080x1920 as Reference Resolution and the option
“scale with screen size”
● Always use Text Mesh Pro for your text. You can
download it from the Unity package manager

● Keep all your image scales in 1,1,1 by using the rec


transform tool (Keypad T)

● Each part of your UI must be inside a specific


canvas (Main Menu, Win Screen, Lose Screen, etc…)

● Convert all your canvases into prefabs.


1 screen = 1 canvas

● Connect all your UI parts with a central UI Manager.


Each prefab view should include its own component
which listens to events

(c) Voodoo 2021 - All Rights Reserved


11.More about Scenes.
● If applicable, make sure your game is in Z forward
● Create a scene when you really need it
● Most of your scene must be divided into prefabs
● Keep all your scales at 1,1,1 and origins at 0,0,0

(c) Voodoo 2021 - All Rights Reserved


12.Sort it out !

● When downloading a third-party plugin/package,


be careful to remove any unused items. All the
unnecessary elements of your project (even those not
used in your scenes) weigh your project down.
(compilation time, updates, etc...)

● If you want to keep some items for future use, you


should use Github or Sourcetree to pack them onto a
special branch (if possible in a secondary branch to
avoid cluttering up the root)

● You can also use another empty project to gather


downloaded packs, and export only the elements
required

(c) Voodoo 2021 - All Rights Reserved


13.The Requirements of
the QA.

● Basics: Game can be installed and


uninstalled / launched (online and offline) / put in sleep
mode, closed and restarted without incident

● Levels: Player can complete them / next level


loads as designed / player doesn’t get blocked /
camera doesn't get blocked behind a game object

● Controls: Do not hesitate to quickly tap the


screen to make sure controls can't be broken / make
sure the players only go where you want them to go
and can't just get out of the level

● UI: No missing buttons / buttons take player to the


correct menu / no UI blocking the player's view or
access to other buttons (check on mobile devices with
and without notch to be sure, and check on iPad or
tablet formats as well, to account for different
resolutions)

(c) Voodoo 2021 - All Rights Reserved


14.Save player
Progression.
● Use PlayerPrefs to save you progression data

● Regroup those data in a single PlayerProgression


class

● Cache those data in Awake, and Save them when


needed

(c) Voodoo 2021 - All Rights Reserved


Questions?
If you need any additional information about our
recommendations, please reach your PM and he.she.they will
put you in touch with the GameOps Dev team.

Resources.
Find some resources you need here.

Published by
The Game Ops team
written by
Antony Oms
Thibaud Friedrich
Clément Dubois

(c) Voodoo 2021 - All Rights Reserved

You might also like