Hi, @gregest and welcome to the forum!
There are two ways you can create a game in Castle Game Engine:
You can use Lazarus LCL, and add
TCastleControl, among any other Lazarus controls, to the form. This is a bit easier, as Lazarus will automatically add all dependencies to
Usessection and will configure the project options for you.
(I really advice going this way) Use an universal
TCastleWindowBaseto create game environment. With
TCastleWindowBaseyou can ensure portability of your game much easier (like compilation for Android).
In order to have
TCastleWindow-related classes available for hints in Lazarus (and use the second approach) you have to “File > New > Simple Program”. Then “Package > Open Package File (*.lpk)”. Navigate to Castle Game Engine folder and add castle_base.lpk and castle_window.lpk to your project (“Use > Add to project” for both).
Now in your
Uses section include
CastleWindow and you are ready to go.
This is the very minimal example how to create a
TCastleWindowBase this way:
program Project1; uses CastleWindow; var Window: TCastleWindowBase; begin Window := TCastleWindowBase.Create(Application); Window.OpenAndRun; end.
However, this is a “minimal” example. In order to use the newly created window efficiently, check the documentation https://castle-engine.io/manual_window.php and/or examples with your Castle Game Engine.