Various important improvements done lately in Castle Game Engine:
-
You can set project caption when creating a new project in CGE editor.
-
Our CastleClientServer unit (for TCP/IP networking) has been moved to a new Lazarus package
castle_indy
that depends onindylaz
package. This makes our connection to Indy cleaner, and fixes the client/server example compilation. This entire section of the manual was also improved. -
CGE applications (if you let the build tool to auto-generate your program file) on Unix now by default use
CThreads
, thus they can useTThread
.This affects desktop Unix platforms, like Linux and FreeBSD.
This means that
- asynchronous downloading (
TCastleDownload
with http, https) and - music streaming (
SoundEngine.LoadBuffer(.., slStreaming)
with default OpenAL backend)
… just work out-of-the-box. I suspect that more and more such features will appear in the future, so it makes more sense to make the default “threads work on Unix”.
If you would like to disable CThreads for some reason, you can still do it by compiling with
CASTLE_DISABLE_THREADS
.FPC by default doesn’t use
CThreads
, to avoid linking with C library, to increase compatibility across Linux distros. But, as far as my experience goes, this argument is no longer relevant in 2020. I haven’t actually encountered any case when a binary FPC application cannot be transferred from one Linux to another due to CThreads API incompatibility. Reading one recent FPC bugreport about it I can conclude that the fear of “linking to C by default” is now more because of “unforeseen consequences”, not because of any proven visible problem that can occur on Linux in 2020. And that report is about FPC_USE_LIBC, while using CThreads should be a smaller issue.And note that CGE uses a few libraries that definitely change more rapidly than C library anyway (e.g. libpng, X, GTK, OpenGL…).
- asynchronous downloading (
-
remote_logging example was redesigned:
- Should work on all platforms nicely now, doesn’t need console
- Shows nice UI with animation (to show that all HTTP stuff doesn’t cause any interruption in the main thread)