Since version 6.5, Castle Game Engine includes an Editor.
Run it using the
castle-editor executable in the
subdirectory of the latest Castle Game Engine release.
The editor allows to:
Create and build CGE projects.
A Castle Game Engine project is just a directory
containing the CastleEngineManifest.xml
file. Most often it also contains a subdirectory
that is accessed from code using the
Everything else is up to you, organize your source code and data
however you like.
From the editor you can create a project using a number of templates. You can compile, run and package the project using the Run menu.
Note that compiling and packaging a project can also be done using the command-line CGE build tool. Actually, the editor just calls the build tool under the hood. The build tool in turn calls a compiler (FPC) and some other tools (e.g. Android-specific packaging tools).
Design user interfaces and 3D/2D transformation hierarchies.
A design is a hierarchy of components descending from
(for user interfaces)
(for 3D and 2D worlds).
Each design is saved into a file with extension
and can be loaded at any point in your game using
You can also use TSerializedComponent class to efficiently load a design once, and instantiate it many times. There is also TUIState.InsertUserInterface, comfortable to insert UI into TUIState (which is typically used like a form in Lazarus/Delphi: each TUIState represents a functional user interface).
Everything related to designing is in the editor Design menu (once you open any project). You can open any example project from the engine designed using the editor (e.g. examples/tiled/strategy_game_demo) and play around with it.
Browse the files in your project. Double-click on files in the file browser at the bottom of the editor to:
Open image in castle-view-image,
Open design in the current editor,
Open other files in the default associated application.
The tools, like view3dscene and castle-view-image are already distributed with CGE, so you don't have to install anything additional. Just double-click from the editor and it will run a suitable viewer.
See also the movie about the editor:
The source code of the editor is inside tools/castle-editor subdirectory of sources. You can compile it yourself from Lazarus.
Copyright Michalis Kamburelis. Thanks go to Paweł Wojciechowicz from Cat-astrophe Games for various graphics. Even this documentation is open-source, you can redistribute it on terms of the GNU General Public License.