Lots of engine improvements (from the last 2 weeks), mobile view3dscene in-progress

Posted on

test_bump_mapping on Android

There’s a lot of new stuff to announce:

  1. Jan Adamec is developing a mobile view3dscene: a viewer for various 3D and 2D models our engine can handle (X3D, Collada, Spine JSON…) designed to run on Android and iOS!

  2. You can use the <custom_options> in CastleEngineManifest.xml to specify custom FPC options for compiling your game.

    Thanks to Jan Adamec, you can also specify custom options on the build tool command-line: add something like --compiler-option=-dMY_SYMBOL to the castle-engine compile|simple-compile|package ... command.

  3. New section in manual about optimizing PNG loading.

  4. New engine demo test_bump_mapping, to easily show bump mapping (with steep parallax, and self-shadowing) with animated light working everywhere — on mobile too.

  5. GLFeatures.Memory to query GPU memory information. This way you can easily detect graphic cards with lower memory (e.g. test GLFeatures.Memory.LessTextureMemoryThan(1024)), to eventually load some alternative (e.g. smaller) textures.

  6. When loading Spine JSON models, the atlas name is now more eagerly auto-detected. Loading various examples from official Spine installation will now (again) work.

  7. New feature allows to apply fog from SceneManager.MainScene to the rest of SceneManager.Items . See UseGlobalFog. This is enabled by default, thus potentially changing the way your game looks. I decided to enable it by default, as it’s consistent with UseGlobalLights, which is also enabled by default.

  8. RenderControlToImage is a new powerful function to easily render any TUIControl (like a scene manager, TCastleSceneManager!) into an RGBA image. It uses using off-screen rendering and FBO underneath (and thus you’re not limited to your window size).

  9. Thanks to Jan Adamec, you can now associate files to open with iOS application. An equivalent for Android is in-progress 🙂 See the CastleEngineManifest.xml in view3dscene-mobile for example usage. The Window.OnDropFiles callback will be called when user will use our application to open a specified file type on a mobile device.

  10. Creature corpses using TCreatureResoure by default no longer collide. Change TCreatureResoure.CollidesWhenDead (or collides_when_dead in resource.xml file of the creature) if necessary.

  11. Fixes and a huge optimization for CastleCreatures if you have many (like > 50) creatures on your level.

  12. Jan Adamec wrote a nice documentation how to set up FPC to compile from Mac OS X for iOS and Android on. Things are a little more complicated than usual there, due to having both 3.0.2 and 3.0.3 compilers.

  13. The option --fpc-version-iphone-simulator of the build tool is auto-detected now by default. So it will be 3.0.5 for FPC 3.0.4, and thus work correctly out-of-the-box in more cases.

  14. Also, look what Michalis is doing right now: Wyrd Forest – terrain and spawning fun 🙂 See code on GitHub.

Leave a Reply