Development: Android and iOS, new game release "Darkest Before the Dawn", more
Hello everyone in 2014 :)
First of all, I would like to present a small game I did during a weekend "gamejam" at the end of November 2013:
The game is free to download for Android, Linux or Windows. Of course the game uses our Castle Game Engine for everything. The complete game code and data are available in our SVN repository.
Next, we have news about the engine development:
The rendering is done using an OpenGL ES 2.0 renderer. Most of the rendering features work (and the rest is in-progress :). Rendering 3D shapes with shaders, textures, lighting of course works. Note that mobile shaders use the Gouraud shading for speed. Rendering 2D images (TGLImage) is also done. Since TGLImage is used underneath by all our 2D controls — most of 2D GUI works (except fonts, for now...).
You can compile the whole engine for OpenGLES (as opposed to normal desktop OpenGL) by defining symbol
base/castleconf.inc file. This symbol is defined automatically when we compile for Android or iOS, but you can also test OpenGLES renderer on normal systems like Windows and Linux (it's a nice way to test your mobile game on a desktop system).
We can initialize OpenGLES context using the EGL library. This is useful to initialize OpenGLES on Android or Xlib (with glX+EGL) or Windows (with wgl+EGL).
The Android port uses NativeActivity, available since Android 2.3. It requires FPC 2.7.1 to cross-compile code to Android ARM, see FPC wiki about Android. Integration with Android includes using Android's log facility (just use WritelnLog from CastleLog unit) and using Android's assets (URLs like
assets:/my_texture.png are supported, and ApplicationData returns
assets:/ to read data from apk).
You can develop cross-target games (for Android, iOS, or standalone — normal OSes like Linux or Windows) using the engine. This means that a single source code can be used to compile multiple versions of the game. We also have plans to make a "build tool" for the engine to auto-generate the necessary files for the compilation on given target (although it's unsure if this will be ready for next release). See Planned: build tool wiki page, and drop a comment if you're interested!
libcastleengine.soon Linux), with API accessible from C or C++. We provide a C header in
src/library/castlelib.hfor this purpose. See code in
src/library/and tests in
MovieTextureas skybox sides. The rendering of
TextureBackgrounduses new simplified code, that can utilize our texture cache and works on OpenGLES too.
--hide-menuoption implemented for view3dscene. Useful e.g. for fullscreen presentations, where you may want to hide all UI.