-
Notifications
You must be signed in to change notification settings - Fork 1
Project Layout
There are a few core design goals that LittleEngine strives to stick to / achieve, which result in most of the structural decisions around the project.
-
Portable: should not require any special paths to run (CMake
installstage updatesRPATHs) - Flexible: should not require to be run from any specific working directory (the application attempts to figure out its own working directory at runtime)
- Standalone: should have minimum external dependencies (static libs / app bundles where possible)
- Self-contained: all executable dependencies must be located in the same directory as itself (or its subdirectories)
- GUI friendly: should launch when interacted with from the OS explorer / finder / etc, and should embed icon and version info (each OS has its own implementation)
- Monolithic: releases should contain all necessary files and a single installer for all supported platforms
Development
-
Platform-independent: should be possible to build on all possible platforms (of course, limited by
ThirdPartycompatibility) - Tools-independent: should not enforce any specific IDE / toolchain / compiler (except on MacOSX)
-
Fast: builds should be as fast as possible (hence the recommendation to use
ninja; the use of forward declarations; preference towards large number of small code files; etc) -
Develop Configuration: should use
Releaselibs but be unoptimised and have all debugging features, including filesystem assets - Cross-platform tools: all tools scripts should be in Bash / Python for maximum compatibility
LittleEngine follows a relatively strict directory structure, intended to ease continuous development and contribution. In general, in-source builds are not permitted, and CMake scripts will attempt to detect build subdirectories within Source and prevent those configurations from succeeding as well. All unsuccessful CMake configurations leave behind some build artefacts (CMakeCache.txt and CMakeFiles/), which must be manually cleaned up.
Directory structure:
LittleEngine/
.travis/
Source/ # All source code
.CMake/
ThirdParty/
Include/ # All library headers
physfs/
[SFML/] # Downloaded during ThirdParty configuration (ignored)
CMakeLists.txt # Top level for ThirdParty
Core
Engine
Game
App
CMakeLists.txt # Top level for LittleEngine
{Runtime/} # Debugging working directory (ignored with exceptions)
{GameAssets/} # Assets root directory (ignored with exceptions)
*.amf # Cook-time and runtime manifest(s)
[GameMusic/] # Music (streamed) root directory (ignored)
Utils/ # Tools scripts and packaging resources
[GameAssets.cooked] # Cooked assets (ignored)
[Project*/] # IDE directories (ignored)
[_Build/] # Build path for executables, libraries and third party dependencies (ignored)
[CI/] # Local CI projects and builds go here (ignored)
A short description of each sub-project / target of LittleEngine:
| Project | Description |
|---|---|
| ThirdParty | All dependencies that are built from source, like PhysicsFS and SFML. |
| Core | Core structures and utilities used by all projects. (Core contains a few submodules.) |
| Engine | All Engine code: Context, Audio, Input, Physics, Renderer, Repository, etc. |
| Game | All game-specific code, including Model, Framework, and Gameplay. |
| App | OS-specific application resources and main(). |
Note: A few features in
Coreare fully isolated and are available as standalone repositories for use with other projects: they are integrated intoLittleEngineas Git submodules; without them the project cannot be built.
Config | MSVCRT | Libraries | DEBUGGING | SHIPPING | Optimisation | Disk Assets -------|--------|-----------|----------|--------------|-------------- Debug | CRTd | Debug | True | False | Od/O0 | True Develop | CRT | Release | True | False | Od/O0 | True Release | CRT | Release | False | True | O2 | False
(Win64, non-MinGW) Note: ``ThirdParty
libraries will be built as Debug/Release according to the CRT being linked with, and the compiler configuration for it must be identical across all projects inLittleEngine` (`/MDd` vs `/MD`).