![]() |
![]() |
Announcing a number of engine improvements from the last weeks:
- We have a new class for ZIP handling:
TCastleZip
. Features:- Reading ZIP files from any
TStream
or URL (see networking about our URL support). Just open ZIP byTCastleZip.Open
and read byTCastleZip.Read
. -
Create and write ZIP files. Again, with API consistent with our engine, supporting URLs and so on. Just open ZIP by
TCastleZip.OpenEmpty
and write byTCastleZip.Write
. -
Optionally register a URL handler, to read or write files inside a ZIP archive by just accesing URL with the given prefix. See
TCastleZip.RegisterUrlProtocol
for an example. Very comfortable to use ZIP throughout our engine. E.g. you can openTCastleScene
using an URL that points to a ZIP file, and relative URLs in the scene (e.g. texture names from a 3D format like glTF or X3D) will be automatically resolved to files inside the ZIP archive. Everything else in our engine also in effect supports ZIP, e.g. you can useFileToString
orStringToFile
to access ZIP files as well.Examples are in the linked API docs and in improved examples/network/custom_url_handler.
-
Works with both FPC and Delphi.
-
Has been tested on really wild examples, to make sure it supports out-of-the-box also files with non-ASCII characters (spaces, Polish characters) with all compilers, for both reading and writing. You can see some of the testcases it passes in tests/code/testcases/testcastlezip.pas and tools/build-tool/tests/testtoolutils.pas.
-
Used also internally in our engine, so it’s really well-tested, we rely on the API being functional and implementation being correct. Our build tool uses it, for both packaging web data to zip, and for packing whole application release to zip. Web target also uses it at run-time to read data —
castle-data:/
URLs are resolved to a ZIP file that holds your data on the web, by default.
- Reading ZIP files from any
-
Using
TAbstractShapeNode.Shading
withshWireframe
value in Pascal (or shading=”WIREFRAME” in X3D) is now supported for all geometry node types.This is a new way for rendering things as wireframe. It looks pretty (quads and other polygons look good in wireframe, as we don’t display diagonals) and it works also on OpenGLES and WebGL (as it doesn’t depend on
glPolygonMode
).See roadmap about our wireframe plans. This a step towards uniform support for
TCastleRenderOptions.WireframeEffect
, also on mobile (OpenGLES) and web (WebGL). -
We have added a new simple example examples/viewport_and_scenes/level_of_detail_demo showing how to setup LOD (level of detail) for your 3D models. This is a simple way to optimize rendering, by using simpler geometry for objects that are far away from the camera.
If you are interested in details, we talk about LOD on the forum thread now too.
-
We support WOFF fonts throughout the engine. Our underlying FreeType already supported them, we just enhanced some filters (in dialog boxes) and improved our documentation to make it official.
And by the way, our documentation about text and fonts has been improved in various small ways and documentation about localization (translation) is now on a separate page. Hopefully this makes things easier to find.
Do you like what we do? Please support us on Patreon or donate to keep the engine development going! Thank you!
Start the discussion at Castle Game Engine Forum