You need a window on the screen to display the engine content. We support two approaches to this:
Most of this manual describes the process of using the engine with the TCastleWindowBase. It is used by all new editor templates. We generally advise this approach, as:
TCastleWindowBase avoids some problems with LCL application loop (for example, to make mouse look perfectly smooth).
On the other hand, using the TCastleControlBase has one big benefit: you place the control inside a Lazarus form, and you can surround it with all the standard LCL GUI controls. So you can use numerous LCL GUI controls, with native look on all desktop systems, together with Castle Game Engine. To use this:
Install in Lazarus the package
In the package dialog, the option to "Install" package is under the "Use" button.
Note: Installing the
will also automatically install the package
as a dependency. That's good.
castle_components.lpk is successfully installed,
Lazarus restarts, and you should see the "Castle" tab
with our components.
Create a normal new project (using Lazarus "New Project" menu item). Choose "Application".
TCastleControlBase from the component palette (tab
"Castle") and drop it on a regular Lazarus form.
Press "Run" :)
See the engine examples in examples/lazarus/ subdirectory for various demos of this approach.
Copyright Michalis Kamburelis and other Castle Game Engine developers.
Thank you to Paweł Wojciechowicz from Cat-astrophe Games for various graphics.
This documentation is also open-source and you can even redistribute it on open-source terms.