-
Notifications
You must be signed in to change notification settings - Fork 12
Naming Conventions
sagivo edited this page May 11, 2014
·
2 revisions
- Call a thing what it is. A bird should be called Bird.
- Choose names that can be pronounced and remembered. If you make a Mayan game, do not name your level QuetzalcoatisReturn.
- Be consistent. When you choose a name, stick to it.
- Use Pascal case, like this: ComplicatedVerySpecificObject. Do not use spaces, underscores, or hyphens, with one exception (see Naming Different Aspects of the Same Thing).
- Do not use version numbers, or words to indicate their progress (WIP, final).
- Do not use abbreviations: DVamp@W should be DarkVampire@Walk.
- Use the terminology in the design document: if the document calls the die animation Die, then use DarkVampire@Die, not DarkVampire@Death.
- Keep the most specific descriptor on the left: DarkVampire, not VampireDark; PauseButton, not ButtonPaused. It is, for instance, easier to find the pause button in the inspector if not all buttons start with the word Button. [Many people prefer it the other way around, because that makes grouping more obvious visually. Names are not for grouping though, folders are. Names are to distinguish objects of the same type so that they can be located reliably and fast.]
- Some names form a sequence. Use numbers in these names, for example, PathNode0, PathNode1. Always start with 0, not 1. Do not use numbers for things that don’t form a sequence. For example, Bird0, Bird1, Bird2 should be Flamingo, Eagle, Swallow.
- Prefix temporary objects with a double underscore __Player_Backup. Naming Different Aspects of the Same Thing
- GUI buttons states EnterButton_Active, EnterButton_Inactive
- Textures DarkVampire_Diffuse, DarkVampire_Normalmap
- Skybox JungleSky_Top, JungleSky_North
- LOD Groups DarkVampire_LOD0, DarkVampire_LOD1 Do not use this convention just to distinguish between different types of items, for instance Rock_Small, Rock_Large should be SmallRock, LargeRock.