Godot Project Structure - RichardMarks/naming GitHub Wiki

Naming

Use the format {prefix}_{identifier}_{variant}_{suffix}.{ext} when naming any files.

Identifiers

Use PascalCase alphanumeric characters and underscores sparingly for the identifier. An Identifier must match the regular expression [A-Za-z0-9_]+

Variants

The variant is either a second identifier such as Happy or Dark, or is a 4 digit numerical value indicating belonging to a collection ####

Variants could have both an identifier and a collection number as well such as Skin_03 or multiple identifiers such as Wall_Concrete_Base_0305

Prefixes

Every type of file has its own prefix to allow fast identification of the file.

Suffixes

Many file types use a suffix to indicate the usage, or purpose of the file.

3D Mesh Assets

The extension should be fbx, glb, or gltf for all 3d model assets.

Use the prefix SM_ for static meshes. static meshes do not have skeletal nor keyframed animation

Use the prefix AM_ for animated meshes.

Use the suffix _K for keyframed animation, and _SK for skeletal animation.

Texture Assets

Use the prefix T_ for textures.

Use the suffix _D for diffuse/albedo textures.

Use the suffix _N for normal map textures.

Use the suffix _AO for ambient occlusion textures.

Use the suffix _M for metallic map textures.

Use the suffix _R for roughness map textures.

Use the suffix _S for specular map textures.

Use the suffix _E for emissive textures.

Use the suffix _A for alpha/opacity map textures.

Level Maps

A level map, or map, or level is any "root" scene such as the main menu, an individual area of a game level, etc...

Often it is useful to separate a level into a root map and several additive maps to dynamically load/unload sections of a large level.

The extension should be .tscn for level maps.

Some level maps may have level-specific game logic which should be found in a sub folder with the name of the level eg, LevelName/LevelName.gd

Use the prefix L_ for both root and additive level maps.

Use the suffix _R for root level maps.

Use the suffix _A for additive level maps.

Folder Structure

At the project root folder there will be the project file project.godot, the version control metadata .git, .gitattributes, and .gitignore, addons for third-party and internal tool plugins, and all other files should be under the ProjectName folder.

/repository_root_folder/
  .git
  .gitattributes
  .gitignore
  project.godot
  addons/
    THIRD_PARTY_PLUGIN_FILES
    INTERNAL_PLUGIN_FILES
  ProjectName/
    PROJECT_FILES

The PROJECT_FILES should have the following structure nested underneath the ProjectName folder.

ResourceTypes/{Purpose}/RESOURCE_TYPE_FILES
Data/{Purpose}/DATA_FILES
Maps/{MapName}/MAP_FILES
Characters/{CharacterName}/CHARACTER_FILES
Props/{PropName}/PROP_FILES
UI/{UIName}/UI_FILES
AudioSFX/SOUND_EFFECT_AUDIO_FILES
AudioBGM/BACKGROUND_MUSIC_AUDIO_FILES
AudioAMB/AMBIANCE_AUDIO_FILES

Maps

In the example below, there is a single root level map with three additive level maps to separate a large level into three areas. Each area and the root level have game logic that is specific to the map, and so there are eight files for the one logical level.

Maps/
  {MapName}/
    L_{MapName}_R.tscn
    L_{MapName}_Area_0001_A.tscn
    L_{MapName}_Area_0002_A.tscn
    L_{MapName}_Area_0003_A.tscn
    {MapName}.gd
    {MapName}_Area_0001.gd
    {MapName}_Area_0002.gd
    {MapName}_Area_0003.gd

WORK IN PROGRESS - SAVING BEFORE LOSING POWER FROM STORM