Swappy Jigsaw – Puzzle Game using Castle Game Engine

Posted on

Swappy Jigsaw Screenshot

With big thanks to Eugene Loza, we can celebrate new year with a new game using Castle Game Engine!

Swappy Jigsaw is a simple jigsaw puzzle game, where you have to unravel an image split into many tiles. Click to pick a tile and click another tile to swap them. There are 84 images total. The game is made in Castle Game Engine (Lazarus/FreePascal), is free, libre and open source.

Comments on the forum (2) ➤

Tiled Maps improvements

Posted on

tiled4
tiled10
tiled9
tiled5
tiled6
tiled1
tiled2
tiled7
tiled8

Many new features in our integration with Tiled, a cool open-source 2D map editor. They all can be tested by the examples/tiled/map_viewer application from the Castle Game Engine sources on GitHub.

This work is sponsored by supporters of Castle Game Engine on Patreon. You asked for a Tiled demo, it is in progress now:) Thank you for supporting the engine!

Tiled integration improvements:

  • Support Isometric, Isometric Staggered, Hexagonal maps (in addition to simple Orthogonal).

  • New properties: URL (easily load/unload the map), Origin, Scale (easily move and zoom the map), SmoothScaling, SmoothScalingSafeBorder (adjust map scaling mode). See the API documentation of TCastleTiledMapControl.

  • TCastleTiledMapControl is nicely configurable in the CGE Editor.

  • Tiled demo (in examples/tiled/map_viewer) improved a lot, designed using CGE Editor, and allows to move and scale the map, as well as adjust scaling properties.

  • Fix reading some Tiled files (support offset as float, try harder to determine proper tile size).

  • Use BackgroundColor optionally set in Tiled.

  • TCastleTiledMapControl is correctly influenced by UI scaling and anchors.

  • Refactored some internal structures.

Comments on the forum ➤

Database-aware demo using Castle Game Engine UI

Posted on

db_cge_1
db_no_cge
db_cge_2

You asked on Patreon can we have database-aware controls in CGE UI. Of course! 🙂

I present a simple implementation of a database-aware edit box using Castle Game Engine user interface. The repository https://github.com/castle-engine/castle-db-aware-controls contains an implementation and demo of TCastleDBEdit. It is a database-aware edit box (analogous to standard LCL TDBEdit), that is rendered using Castle Game Engine. It can be added to your window using CGE Editor.

As a database-aware control, it can be trivially connected to display or edit a database entry. More precisely: anything that descends from TDataSet, which includes a variety of SQL databases, or simple tables using DBF, CSV files and so on.

The example application also shows that you can use a TDataModule (where you drop and edit components using Lazarus) together with CGE user interface.

The application depends on the latest Castle Game Engine 6.5 from GitHub.

If you’d like to help in the development of the engine, and be able to request features like that, please support our development on Patreon. Thank you! And Merry Christmas! 🙂

Comments on the forum ➤

glTF 2.0 in Castle Game Engine

Posted on

BrainStem_0
glTF in Castle Game Engine
Sponza_0
Sponza_1
gltf_fish
gBoomBoxWithAxes_0

Castle Game Engine and view3dscene can now open glTF 2.0 model format. glTF is an efficient, modern 3D model format developed by Khronos.

Basic features of glTF are supported for now:

  • hierarchy of transformations,
  • meshes (with various primitive modes allowed, with Appearance nodes shared as much as possible),
  • materials (but without PBR for now; we just use glTF baseColor as Phong diffuseColor now),
  • textures (baseColorTexture and normalTexture, with configurable texture wrapping and filtering, with multiple texture coordinates on the same mesh possible),
  • cameras (orthographic or perspective),
  • miscellaneous (alpha mode (using CGE existing alphaChannel extension), double-sidedness, textures embedded in GLB buffers).

You can open glTF directly (using view3dscen “File->Open”), or you can use Inline X3D node to add glTF model to a larger X3D scene. You can also convert glTF to X3D (just open it in view3dscene, and then use one of “File->Save As…” menu entries to save in classic or XML encoding). You can also convert from the command-line, see view3dscene docs.

You can use view3dscene from snapshots or Castle Game Engine from GitHub to try it all today! If you’re looking for sample models, see glTF sample models . Or just export something from Blender 🙂

We use PasGLTF, a great open-source library for reading glTF by Benjamin “Bero” Rosseaux. It supports both GLTF (text JSON file accompanied by binary files) and GLB (everything packed in one binary file) formats. I encourage you to support Benjamin Rosseaux on Patreon to show the appreciation!

Comments on the forum (2) ➤