engine/docs/CODE_STRUCTURE.md
To make it easier to find your way around the code, it's good to know about some of our naming conventions.
res_*.cpp - Resource types. These are responsible for loading/unloading a certain (compiled) asset type. E.g. res_sprite.cpp
comp_*.cpp - Component types. Reponsible for creating a component world and instances. Matched with a resource type using the same filename extension. E.g. comp_sprite.cpp
script_*.cpp - Script modules. These add new Lua modules to the engine. E.g. script_sprite.cpp
gameobject_script.cpp, gui_script.cpp and render_script.cpp*_ddf.proto - File formats. These are the file formats used for source and compiled content. sprite_ddf.proto
This is the list of libraries in the defold/engine/<library> folder that are used to make up the engine.
For the up-to-date list of libraries, see the ENGINE_LIBS in build.py
The order of these libraries is important as they determine the possible ways a library may use another library.
E.g. render may use graphics, but the reverse order is not allowed.
defold/external, see notes below)comp_gui.cppgdc and the editor launcherdmSDK headers.When building the engine, some headers are copied from the local library folder, to the DYNAMO_HOME/include sub folders.
Similarly, we copy header files from any dmsdk sub folders from each library.
These end up in the final SDK that our users use on a daily basis.
If you edit any of those header files, be aware of any breaking changes to the api!
Our command line content build system is called Bob.jar.
It is described here
We keep certain versions of external code in defold/share/ext
Since they change so rarely, we don't want them building in our main build step.
Examples are protobuf, tremolo and luajit
The output is stored in the repository, under defold/packages
Since the projects under defold/share/ext are farily cumbersome to maintain and build, we have moved some to defold/external.
The benefit is that we can use the same build system for all platforms, which makes it easy to maintain such a library.
Currently includes Bullet 3D and glfw.
The output is stored in the repository, under defold/packages
See the readme for more detailed info.
Ìn defold/packages we store code/tools that are rarely updated.
We unpack these packages with ./build.py install_ext and they're installed into the DYNAMO_HOME folder.