Repository Reference/Naming conventions

From Blood Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{navigation title|Building a Game}} ==Texture names== Texture name should contain only latin characters, all lowercase. It should have one or two words explaining what this t...")
 
m
Line 1: Line 1:
 
{{navigation title|Building a Game}}
 
{{navigation title|Building a Game}}
 +
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.
 +
 
==Texture names==
 
==Texture names==
 
Texture name should contain only latin characters, all lowercase. It should have one or two words explaining what this texture is for. Special texture should be suffixed according to skinframe rules (see [[texture]])
 
Texture name should contain only latin characters, all lowercase. It should have one or two words explaining what this texture is for. Special texture should be suffixed according to skinframe rules (see [[texture]])
Line 14: Line 16:
 
  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.
  
If material is additional variation of a base materia, or additional layer of it, it's name should begin as it's base material
+
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:
 
Example:
 
  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>
 +
 +
{{tip|Material layers are done with copying a mesh in a model, or with q3map_cloneShader material keyword (this only works for map surfaces)}}
  
 
==Texture themes==
 
==Texture themes==
For convenience materials is grouped into different themes, each theme is subfolder of textures/ and separate list item in texture window of map editor.
+
Texture themes is way to categorize textures in map editor. Only one texture theme are seen in level editor texture browser. Also it is convenient way to break files into several separate 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.).
 +
 +
Examples:
 +
crypt
 +
mausoleum
 +
dungeon
 +
spiritforge
 +
town
 +
 
==Model names==
 
==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.
 
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.
Line 37: Line 49:
 
  models/mapobjects/misc/bat1.md3
 
  models/mapobjects/misc/bat1.md3
 
  models/mapobjects/misc/bat2.md3
 
  models/mapobjects/misc/bat2.md3
 +
 
==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.
Line 44: Line 57:
 
  dungeon
 
  dungeon
 
  graveyard
 
  graveyard
 +
 
==Map names==
 
==Map names==
 
Map name should contain lowercase latin characters and position of a map in hierarchy:
 
Map name should contain lowercase latin characters and position of a map in hierarchy:
Line 58: Line 72:
 
  w1m2-pillars-crypt2
 
  w1m2-pillars-crypt2
 
Test levels should be prefixed by '''test-'''. They are not added to game release build.
 
Test levels should be prefixed by '''test-'''. They are not added to game release build.
 +
 
==Map props==
 
==Map props==
All level pros is saved to models/maps/<location_name> folders. Yet again, use same names. For example, name terrain mesh as '''terrain.ase''', not '''02.ase''' or '''terr01b.ase'''.
+
All level props is saved to models/maps/<location_name> folders. Should use sane names for them.  
 +
 
 +
Example:
 +
 
 +
<font color=green>Correct:</font>
 +
'''terrain.ase'''
 +
<font color=green>Wrong:</font>
 +
'''02.ase'''
 +
'''terr01b.ase'''
  
 
{{navigation footer|Repository structure in-depth}}
 
{{navigation footer|Repository structure in-depth}}

Revision as of 17:33, 9 August 2012

Repository Reference | previous chapter: Building a Game

Contents

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.

Texture names

Texture name should contain only latin characters, all lowercase. It should have one or two words explaining what this texture is for. Special texture should be suffixed according to skinframe rules (see texture)

If there is several variations of this texture, use the following template for naming: texturename<group_number>_<texture_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

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
Tip: Material layers are done with copying a mesh in a model, or with q3map_cloneShader material keyword (this only works for map surfaces)

Texture themes

Texture themes is way to categorize textures in map editor. Only one texture theme are seen in level editor texture browser. Also it is convenient way to break files into several separate folders.

Texture theme should be one word explaining what it will be (like crypt, mausoleum, inn etc.).

Examples:

crypt
mausoleum
dungeon
spiritforge
town

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.

Important: Some exporters like a 3D Studio Max ASE exporter always makes file extensions uppercase, should fix this before models get uploaded to repository

Examples:

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

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

Map names

Map name should contain lowercase latin characters and position of a map in hierarchy:

  • World
    • Locations
      • Sub-locations

Template: w[worldnum]m[locationnum]-[location_name]-[sub-location_name]

If sub-location is grouped (there is several crypts, caves etc.) first one doesnt contain 1 in the end.

Examples:

w1m1-cemetery
w1m2-pillars-crypt
w1m2-pillars-crypt2

Test levels should be prefixed by test-. They are not added to game release build.

Map props

All level props is saved to models/maps/<location_name> folders. Should use sane names for them.

Example:

Correct:
terrain.ase
Wrong:
02.ase
terr01b.ase



Next chapter: Repository structure in-depth
Back to index | Top of the page

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox