Godot Project Structure
It is my opinion, and is by no means "objective"
Godot conventions
Godot by default uses following conventions:
- if directory contains file
.gdignore godot won't look into it and won't import files from there - directory
/addons contains "addons"
Proposed file structure
├── _export/
│ └── .gdignore
├── addons/
├── assets-src/
│ └── .gdignore
├── core/
│ └── PROJECT.gd
├── demo/
├── full/
├── scripts/
│ └── .gdignore
└── test/
This separation is proposed to allow splitting exported project into different packs. Godot has some complications with moving files, so you probably want it from the start.
core is separated so that you can open source it in case you want to help modders/whateverFor
demo/ directory I would propose layout akin to
├── assets/
│ ├── meshes/
│ ├── music/
│ ├── sounds/
│ └── textures/
└── scenes/
├── levels/
└── ...
Such a layout can make it easier to find what you need
PROJECT.gd
I suggest introducing this autoload (singleton) to keep project global data, such as layer names (they must be synced with project settings, so that both godot UI and gdscript use the same)
extends Node
enum LayerPhys3D {
ENVIRON = 1,
HAS_HP = 2,
}
enum Nav3D {
WALK = 1,
SMART = 2,
}