Dev Planet

Avatar photo

RSS feed aggregator for FOSS game development.

Castle Game Engine: Vectors changes, to avoid a trap with modifying a temporary value

We have made a significant change to how our vectors are declared. They now have X, Y, Z, W as fields (not properties), and the compiler will prevent you from falling into a trap of writing Scene.Translation.X := Scene.Translation.X + 10; Like in the below testcase: uses SysUtils, CastleScene, CastleVectors; var S: TCastleScene; begin S …

Castle Game Engine: Code cleanups: units map, more obvious subdirectories in engine, automatically checked dependencies, moved various units to internal

Lately I’ve done a number of rearrangements in CGE units, to make the engine code cleaner (easier to understand, both for new people and seasoned devs): Units map documentation is now up-to-date and more straightforward. Unit dependencies outlined in units map are (again) automatically checked by check_units_dependencies internal tool (using ppudump from FPC underneath). A …

Castle Game Engine: Example how to use a custom cursor (a static image or an animated scene)

I’ve added an example project examples/user_interface/custom_cursor showing how you can implement a custom cursor in your applications. It’s very flexible — the custom cursor is just a UI element, synchronized with mouse position, and it can contain an image, a viewport (with animated scene) or anything else you want. You even design the custom cursor …