Repository Reference/Naming conventions
m (→Map props) |
m |
||
(14 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
{{navigation title|Building a Game}} | {{navigation title|Building a Game}} | ||
+ | {{grammar}} | ||
Naming conventions are required to keep repository clean and easy to work with. There is some files violating common rules, making them first candidates for the renaming. | Naming conventions are required to keep repository clean and easy to work with. There is some files violating common rules, making them first candidates for the renaming. | ||
+ | |||
+ | Be sure to follow this conventions when adding new files to the repository. | ||
==Texture names== | ==Texture names== | ||
− | Texture name should | + | Texture name should be one or two words explaining what this texture is for. |
+ | |||
+ | Special textures (normalmaps, glowmaps etc.) should have suffix according to skinframe rules (see [[texture]]) | ||
− | + | Name template: | |
+ | : texturename''<group_number>''_''<variation_number>'' | ||
Example: | Example: | ||
Line 15: | Line 21: | ||
textures/towns/brick2_3 | textures/towns/brick2_3 | ||
textures/towns/brick3_1 | textures/towns/brick3_1 | ||
+ | |||
==Material names== | ==Material names== | ||
Material names should mimic texture names where possible. For portability reasons there should be only forward ('''/''') slashes. | Material names should mimic texture names where possible. For portability reasons there should be only forward ('''/''') slashes. | ||
Line 23: | Line 30: | ||
textures/inn/window <font color=green>// base material</font> | textures/inn/window <font color=green>// base material</font> | ||
textures/inn/window_envmap <font color=green>// additional envmap layer</font> | textures/inn/window_envmap <font color=green>// additional envmap layer</font> | ||
− | |||
− | |||
==Texture themes== | ==Texture themes== | ||
− | Texture themes is way to categorize textures in map editor. Only one texture theme | + | Texture themes is way to categorize textures in map editor. Only one texture theme can be inspected in texture browser at one time. Also it is convenient way to separate files into several folders. |
Texture theme should be one word explaining what it will be (like crypt, mausoleum, inn etc.). | Texture theme should be one word explaining what it will be (like crypt, mausoleum, inn etc.). | ||
Line 55: | Line 60: | ||
==Model themes== | ==Model themes== | ||
− | Like texture themes, model themes are subfolders in models/mapobjects/. Model theme name should be one word, explaining what models will be used for. | + | Like texture themes, model themes are subfolders in '''models/mapobjects/'''. Model theme name should be one word, explaining what models will be used for. |
Examples: | Examples: | ||
Line 63: | Line 68: | ||
==Map names== | ==Map names== | ||
− | Map name | + | Map name contains position of a map location in hierarchy: |
* '''World''' | * '''World''' | ||
− | ** ''' | + | ** '''Location''' |
− | *** '''Sub- | + | *** '''Sub-location''' (optional) |
− | + | Name template: | |
+ | :w''<worldnum>''m''<locationnum>''-''<location_name>''-''<sub_location_name>'' | ||
− | If sub-location is grouped (there is several crypts, caves etc.) first one | + | If sub-location is grouped (there is several crypts, caves etc.) first one should not have 1 in the end. |
Examples: | Examples: | ||
Line 75: | Line 81: | ||
w1m2-pillars-crypt | w1m2-pillars-crypt | ||
w1m2-pillars-crypt2 | w1m2-pillars-crypt2 | ||
− | Test levels should be prefixed by '''test-'''. | + | |
+ | Test levels are special case, they should be prefixed by '''test-'''. Test levels are not added to game release build. | ||
==Map props== | ==Map props== | ||
− | All level props is saved to models/maps/<location_name> folders. | + | All level props is saved to models/maps/<location_name> folders. Use model names convention to name them. |
Example: | Example: | ||
Line 86: | Line 93: | ||
<font color=green>// Wrong:</font> | <font color=green>// Wrong:</font> | ||
'''02.ase''' | '''02.ase''' | ||
− | '''terr01b. | + | '''terr01b.ASE''' |
− | {{navigation footer| | + | {{navigation footer|}} |
+ | {{finished}} |
Latest revision as of 23:32, 9 August 2012
Naming conventions are required to keep repository clean and easy to work with. There is some files violating common rules, making them first candidates for the renaming.
Be sure to follow this conventions when adding new files to the repository.
[edit] Texture names
Texture name should be one or two words explaining what this texture is for.
Special textures (normalmaps, glowmaps etc.) should have suffix according to skinframe rules (see texture)
Name template:
- texturename<group_number>_<variation_number>
Example:
textures/towns/brick1_1 textures/towns/brick1_2 textures/towns/brick1_3 textures/towns/brick2_1 textures/towns/brick2_2 textures/towns/brick2_3 textures/towns/brick3_1
[edit] Material names
Material names should mimic texture names where possible. For portability reasons there should be only forward (/) slashes.
If material is additional variation of a base material, or additional layer of it, it's name should begin as it's base material
Example:
textures/inn/window // base material textures/inn/window_envmap // additional envmap layer
[edit] Texture themes
Texture themes is way to categorize textures in map editor. Only one texture theme can be inspected in texture browser at one time. Also it is convenient way to separate files into several folders.
Texture theme should be one word explaining what it will be (like crypt, mausoleum, inn etc.).
Examples:
crypt mausoleum dungeon spiritforge town
[edit] Model names
Model names can contain lowercase latin characters, numbers and underscore as spacer. Names should be sane, suffixes and numbers should be added only if model is part of some group.
Examples:
// Correct models/mapobjects/graveyard/stone1.md3 models/mapobjects/graveyard/stone2.md3 models/mapobjects/graveyard/stone3.md3 models/mapobjects/misc/bat1.md3 models/mapobjects/misc/bat2.md3 // Wrong models/mapobjects/my models/barrel.md3 models/mapobjects/graveyard/stone4.MD3
[edit] Model themes
Like texture themes, model themes are subfolders in models/mapobjects/. Model theme name should be one word, explaining what models will be used for.
Examples:
crypt dungeon graveyard
[edit] Map names
Map name contains position of a map location in hierarchy:
- World
- Location
- Sub-location (optional)
- Location
Name template:
- w<worldnum>m<locationnum>-<location_name>-<sub_location_name>
If sub-location is grouped (there is several crypts, caves etc.) first one should not have 1 in the end.
Examples:
w1m1-cemetery w1m2-pillars-crypt w1m2-pillars-crypt2
Test levels are special case, they should be prefixed by test-. Test levels are not added to game release build.
[edit] Map props
All level props is saved to models/maps/<location_name> folders. Use model names convention to name them.
Example:
// Correct: terrain.ase // Wrong: 02.ase terr01b.ASE