I am going on vacation, so I will be (mostly) offline for 2 weeks 🙂 So, please have patience with any questions to Michalis — I will get back to you, but with some delay!
I don’t have a new screenshot from the engine for this news. Instead, I wanted to share some screens from the games I like — the games that inspired me to make games (and, subsequently, an engine to make games 🙂 ).
The GitHub code now contains a start of migration from
FGLunit containers to
Generics.Collectionsunit containers. The
Generics.Collectionscontains a much richer (and Delphi-compatible) generic containers. I use generics a lot in the engine code, so this will be a larger change.
The main classes from
TObjectList<T>is very similar to the
TFPGObjectList<T>you know from FGL.
Generics.Collections were implemented in FPC by fantastic Maciej Izak, who also put a lot of work to actually make them part of the FPC standard library in FPC 3.1.1. In older FPC versions, we currently use a local copy of them (in
src/compatibility/generics.collections/src/). This “compatibility” path should be automatically added to your unit search path for all our supported compilation methods. If you use the build tool, be sure to recompile the build tool after getting the latest code from GitHub.
I’m also working on a new improved API for vectors / matrices, based on advanced records, somewhat cleaner and also Delphi-compatible. More news when I’ll get back from vacations 🙂
Our Automatic Cloud Build server has now cool scripts to switch FPC versions, which allows me to automatically check that the engine compiles with various FPC versions, and on various platforms. I really enjoy continuous testing, time to set it up always “pays off” by doing a lot of things automatically for you, and Jenkins rocks!
We’re proud to announce the release of Castle Game Engine 6.2!
New features in this release:
Trivially easy recompilation of your games for iOS (through an XCode project). You can now use our build tool to recompile the same game for all our platforms (desktops, Android, iOS, web plugin…). The iOS documentation was extended to describe everything necessary.
CommonSurfaceShader is our new “material on steroids” that allows you to configure material by normalmaps, specular maps, shininess maps, ambient maps… We include an extensive documentation and examples of it (in new demo models).
Improved Blender exporter. It’s now easier to install (it’s now a normal Blender add-on), and it can generate a CommonSurfaceShader node with all the goodies described above. The artist can now comfortably set normalmaps, specular maps and much more in Blender, and they “just work” in the engine.
The CommonSurfaceShader and Blender exporter improvements were implemented thanks to the support on Patreon. If you like what we do, please consider supporting the engine development on Patreon. This really helps me spend more time on the engine, and develop cool features like this!
Other build tool improvements, for all platforms:
- game_units attribute in CastleEngineManifest.xml.
- generate-program command for the build tool
- Places all the temporary output within
- The configuration of build tool for Android is now simpler, it can guess all the locations from $ANDROID_HOME. Also the wiki page describing Android prerequisites was much improved.
Other API and examples improvements:
- TSound.Offset to get/set sound offset in time.
- Sound/music player in
- STL format support
- Our ray-tracer now supports textures and smooth normals.
- TCastleEdit (example in
- Application.ParseStandardParameters, Application.Version
Together with the new engine, we also release a new version of view3dscene 3.17.0, our viewer for X3D and other 3D formats. As a tool developed using the Castle Game Engine, it inherits all the enhancements 🙂 You will probably be most interested in new CommonSurfaceShader node and STL format support.
I made a simple sound/music player using the Castle Game Engine 🙂 It is available in the engine sources in
It has all the features you would expect:
- Sound offset (position in time) control,
- Programmer-designed user-interface (ah, this brings back good memories:).
- It can open wav and ogg files, and plays them using OpenAL.
It was coded to show that TSound.Offset works cool. It’s a new property added today (for Eugene Loza, see here), allows to get/set the sound offset (aka “position in time”).
You can view the code on GitHub.
First of all, I hope to finish and release Castle Game Engine 6.2.0 this weekend! So, watch this page closely.
The next release 6.4.0 will focus on Delphi compatibility, and start of visual editing (of 3D world and 2D controls) within Lazarus and Delphi. In all the pre-release excitement, I started playing around with it already today 🙂 I added a property
RenderAtDesignTime to the Lazarus OpenGL control (patch here), and I made a simple design-time menu to add a sphere to the SceneManager at Lazarus design-time. See the screenshots!
In other news, there is a bunch of engine features done recently, not announced properly yet. Here they are (officially coming in 6.2.0 release this weekend):
- Rendering of normalmaps (through CommonSurfaceShader.normalTexture or Appearance.normalMap) was improved to work even when no diffuse texture is defined.
- TCastleEdit: a simple edit box. Demo in examples/2d_standard_ui/edit_box/game.pas . Not perfect, but already useful anyway 🙂
- New build tool command “generate-program”, to generate perfect starter program code and Lazarus lpi.
- Added easy Application.ParseStandardParameters method to the TCastleApplication in CastleWindow, may be useful for your standalone games.
- image_convert (in examples/images_videos/) has an additional command-line option –alpha-bleed, to perform “alpha bleeding” in batch mode.
- Added TDebug3DCustomTransform – a simple reusable utility to debug bounding boxes and spheres of T3DCustomTransform (like T3DTransform or T3DOrient). A generalized version of what you get for creatures (the ones from CastleCreatures unit) when you use RenderDebug3D.
- x3d-nodes-to-pascal is our new tool to parse X3D nodes and produce skeleton code to glue X3D with Object Pascal.
Support the engine development on Patreon ! We have just upgraded all the reward tiers, so now:
- 1 USD gives you access to all private posts on Patreon,
- 5 USD allows you to request new engine features each month,
- 10 USD allows you to request new game each month,
- 50 USD gives you access to the cloud build server (https://michalis.ii.uni.wroc.pl/jenkins/) !
P.S. Working hard on CGE 6.2.0, release very soon !:)
I wrote a few new chapters to the “Modern Object Pascal Introduction for Programmers” book:
- 4.8. Calling inherited method
- 4.9. Virtual methods, override and reintroduce
- 5.4. The virtual destructor called Destroy
- 8.5. Static class methods
- 8.6. Class properties and variables
It is also available now under a shorter URL, on a new domain for our Castle Game Engine. The book is not tied to the Castle Game Engine (I want it to be something useful on it’s own). Although it is also part of my plan for “how Castle Game Engine can succeed”, as it helps programmers interested in Castle Game Engine to use the Object Pascal language 🙂 If you like it, please consider supporting me on Patreon !
Simple platformer-shooter done during 12-hour gamejam using Castle Game Engine! Binaries on https://gitlab.com/michaliskambi/in-space-everyone-is-screaming/tags/v1.0 , source code on https://gitlab.com/michaliskambi/in-space-everyone-is-screaming . This is really just a technical beginning, without any playable level design, or fancy enemies swarms, or graphics.. But it’s a working start, with jumping and shooting and enemies, ready to be extended! 🙂
First of all, I’m proudly attaching a few images of various games using Castle Game Engine running on a real iPhone:)
Our build tool got some significant improvements lately. I hinted about some of them in the recent “Easy compilation for iOS” announcement, but actually there’s more, and some of them benefit all platforms 🙂 Here are the details:
"castle-engine-output"directory for compilation temporary files (.ppu, .o), and for Android and iOS projects. The advantages:
- The compilation files are kept per OS/CPU, so they can be reused more (no need to recompile everything just because you switch platforms).
- The Android project is in a predictable location (not in some /tmp/castle-engine-
), which is useful to run ‘ndk-gdb’.
- The iOS project is in a predictable location, which is useful to run XCode.
Project files (lpr) for Android, iOS (and soon — for others too) can be auto-created. So you really don’t have to write anything to recompile your project for a new platform. You only need to provide game_units in
CastleEngineManifest.xml, and make sure your units initialize Application.MainWindow . Make sure you define game_units in CastleEngineManifest.xml.
Android packaging process fixes and updates.
- CGE code fix for using (exact) FPC 3.0.2 to cross-compile to Android.
- The build tool no longer requires so many things (from Android SDK and NDK) on $PATH. It can guess everything’s location now from ANDROID_HOME (your SDK location).
- Much improved wiki page about installing Android dependencies. In particular, it contains now screenshots how to use the “SDK Manager”, that is integrated in “Android Studio” and replaces the old “android” GUI tool from previous SDK versions.
- The iOS wiki page was much improved and updated, to describe the process of compiling to iOS.
src/library/compile-iOS.shscript was reworked and updated. Many changes, but in principle it should generate exactly the same thing:)
"castle-engine compile --target=ios"is available, and generates a ready libxxx.a to be inserted into an XCode project.
- CastleWindow “library” interface (used for iOS in a library) simplified.
- Package any game for iOS! Just run
"castle-engine package --target=ios"and you get an XCode project, that compiles out-of-the-box in XCode, and can be tested and published from XCode. You can add
--mode=debugif you like.
Trivially easy compilation of your games to iOS!!!
You can now take any Castle Game Engine game, and recompile it for iOS (iPhone, iPad) easily. No need to write *any* iOS-specific code. Short instructions:
- Follow iOS documentation to get FPC, with a cross-compiler, for iOS targets.
- Inside CastleEngineManifest.xml, define
game_units="...", listing the necessary game units to be included in your lpr. It’s often just a single unit, that pulls other units along as dependencies.
"castle-engine package --target=ios --verbose"in console.
- Open the resulting project in XCode. From XCode you can build it, run it in a simulator, publish… I emphasize that the project builds out-of-the-box on Xcode, zero modifications on your side are necessary. Just open the project, and press “Run” button in XCode.
I will be posting more details (and polishing some rough edges) soon 🙂 Learn more about the build tool (“castle-engine”) and CastleEngineManifest.xml at these wiki pages. I just updated them with information about
Many thanks go to Szymon Stoma and Ten Square Games for making Apple hardware available to me, making it all possible!
And a great many thanks to Jan Adamec, who made the initial iOS work in our engine! Everything I did was just rehashing of that work, to integrate it with the build tool.
I was working intensively on support of CommonSurfaceShader (aka “material on steroids”) in view3dscene and Castle Game Engine, and the following features have been added:
- specular maps (vary specular color throughout the surface, e.g. making it selectively shiny or “rough”)
- shininess maps
- ambient maps
- configuring displacementFactor for parallax bump mapping
- support for reflectionFactor and transmissionFactor in ray-tracer
This is all added to the previous features: support of basic factors (similar to the standard Material features) and normal maps (bump mapping). Bump mapping was also improved a bit.
The demos are inside bump_mapping/common_surface_shader subdir (you can download complete demo models contents from GitHub). You can open them using the latest view3dscene from snapshots. Or you can just compile the engine from GitHub
The updated CommonSurfaceShader information is here. The fields marked in bold there are supported in view3dscene / Castle Game Engine. There’s also a lot of text that may help you understand how CommonSurfaceShader works:)
- In a (related) news, I have improved our custom Blender exporter to X3D. It now exports the CommonSurfaceShader, including various texture configurations like normal maps, specular maps and so on.
This means that an artist can configure all the goodies mentioned above from Blender! Just export with “Use CommonSurfaceShader” checkbox, and the resulting file will include CommonSurfaceShader with all the parameters and texture configuration.
My notes about exporting X3D to Blender (part of the Castle Game Engine documentation) include a detailed description how to use this feature. See the “Extra material textures (normal maps, specular maps) with CommonSurfaceShader” section here.
The modifications to the Blender exported are not yet submitted to the Blender developers, but they *will* be:) I want this to be present in Blender out-of-the-box.
At the end, I wanted to emphasize that this work was sponsored by Castle Game Engine patrons on Patreon. If you like what I’m doing, please consider supporting me, through the page https://www.patreon.com/castleengine . This really helps me spend more time on the engine and view3dscene, and you can also request a particular feature. This month, Robert Daniel Murphy requested “easy export from Blender of normal maps and specular maps”, and look what cool things happened! 🙂