fpcupdeluxe and Castle Game Engine

Posted on

fpcupdeluxe

Recently I’ve been playing with fpcupdeluxe, a great tool to install FPC/Lazarus (stable, unstable…), with cross-compilers. I’m very impressed by it, and I wrote a wiki page documenting how to use it (in the context of Castle Game Engine, although contains some general notes too):

https://github.com/castle-engine/castle-engine/wiki/fpcupdeluxe

In another news: Ten Square Games is helping us by lending Apple hardware with the latest Mac OS X! This is a great help towards the upcoming improvents of iOS in the Castle Game Engine (integrating it with the build tool better). Thousand thanks!

Comment on this post ➤

Support for the STL format for 3D models (commonly used for 3D printing)

Posted on

Knocker in STL format, by Shira, www.thingiverse.com/thing:1458545
Robot woman in the STL format, by Shira, see http://www.thingiverse.com/thing:614366
Moonkin Bust in the STL format, by bardiir, see http://www.thingiverse.com/thing:2211053

Castle Game Engine and view3dscene support now the STL format for 3D models, commonly used for 3D printing. This means that you can open these models using view3dscene, or the engine API (TCastleScene.Load), and you can convert STL files to X3D.

It’s a really simple 3D format (just vertexes with normals), and I think that the current loader (in file x3dloadinternalstl.pas) nicely serves as an example 3D file loader in our engine. It shows how to read binary and text files from a TStream instance using some helpers in our engine.

More information about the STL format is available in Wikipedia. We support both the text (ASCII) and binary formats.

Blender includes an exporter to this format.

Many sample models in the STL format, ready for 3D printing, can be downloaded e.g. from Thingiverse.

If you’d like to try it NOW in Castle Game Engine, you can download the view3dscene from snapshots. Or you can grab the source code of the engine and view3dscene from GitHub: https://github.com/castle-engine/castle-engine/ , https://github.com/castle-engine/view3dscene/.

Comment on this post ➤

Castle Game Engine 6.0.2 release!

Posted on

Test local (international) characters

We’re happy to announce Castle Game Engine 6.0.2 release!

Download it from our webpage.

This is a small, mostly-bugfix release. So we only have 6 new features:)

New features:

  1. sprite-sheet-to-x3d tool: The animations duration is now calculated looking at the number of animation frames and the FramesPerSecond value. FramesPerSecond is by default 4, but it can be changed by the –fps= command-line option.
  2. New test_local_characters testcase (inside examples/fonts/test_local_characters/), testing reading and rendering of international characters (Chinese, Russian, Greek…).
  3. LoadAnimatedGifs, see an example GIF player🙂 It requires having ffmpeg installed, though, for now.
  4. Better API around TextureProperties X3D node.
  5. Automatic gzip extension recognition for URLReadXML / URLWriteXML (by Eugene Loza, thanks!).
  6. Unix manpages for utilities can be generated (see doc/man/man1/ in sources). All utilities support now –help and –version options.

Bugfixes:

  1. OpenGLES (mobile) fixes for Color and ColorRGBA nodes handling.
  2. Removed the proprietary Chartboost and Heyzap jar files from the distribution. They were packaged by accident in our zip and tar.gz archives. Users should download them on their own, following links from Android components page.
  3. Fix reading X3D files with IMPORT.
  4. Fix UI in examples/fonts/html_text.lpr.
  5. Various fixes for switching font at runtime. The test_local_characters demo shows that now everything works.
  6. Remove the warnings from FPC 3.x around WideString convertions when dealing with XML units (by Eugene Loza).

Please check the downloaded file correctness!

Downloading the files from SourceForge may be unreliable now, in my tests. After downloading, please double-check the correctness of the downloaded castle_game_engine-6.0.2-src.zip file:

  • the size should be precisely 126164527 ,
  • the md5sum should be 7f6ccd3f4d6a2547299ea4dc9ef0ad15 .

I’m talking with SourceForge to have it fixed. Eventually, we may move our downloads to another server.

Comment on this post ➤

view3dscene 3.16.1 release

Posted on

View3dscene

We have just released view3dscene 3.16.1. This is a bugfix release for an important bug that slipped in view3dscene 3.16.0 (most files using the IMPORT keyword failed to load with “Invalid type cast” message).

view3dscene is our open-source cross-platform X3D and VRML browser (and a viewer for other 3D formats). It is quite powerful tool on it’s own, to inspect 3D models in various formats — it can play animations, you can work in 3D worlds with collisions and gravity, it can play X3D scripts and more:)

All the comments are welcome, as always!

Comment on this post (2 comments now) ➤

API Reference improvements

Posted on

API Reference search

I improved our API reference. It now has a search box, and a navigation toolbar, making it look more like a normal part of the Castle Game Engine website.

Hint: I’m the maintainer of both Castle Game Engine, and PasDoc — an open-source documentation tool for Pascal 🙂 I actually enhanced PasDoc to make it possible. PasDoc has now three new command-line options and produces nice HTML5 output. If you use PasDoc in your own projects, you benefit too — you can now style the PasDoc output to fit your webpage! If you’d like to try PasDoc, go to https://github.com/pasdoc/pasdoc/wiki .

Comment on this post ➤

Plans, thank yous, and improvements to “Getting Started”

Posted on

castle_base package: Compile

A week ago we have launched our Patreon campaign https://www.patreon.com/castleengine, and we already reached 25% of our first goal! I wanted to thank everyone who decided to support the engine, and please keep it coming! This really matters a lot to the engine future — it essentially allows me to focus all my (computer) life on the engine, and I think that I can do some amazing things with this:)

Plans for the next releases:

  • Release 6.2: Easy iOS recompilation
  • Release 6.4: Delphi compatibility (after many encouraging comments I got from the Delphi community on FB and G+)
  • Release 6.6: Physics, or Visual designing (like GLScene) (depending on YOUR feedback!)

More details about the above features, and more plans, are here. I plan to maintain this “Planned features” page forever, adding there stuff (and removing stuff, too, as it gets implemented:). So be sure to check it often.

Getting started improvements:

Our “Getting started” page was much improved, with screenshots showing the Lazarus installation process. See also a movie (thanks to Eugene Loza!)

Comment on this post ➤

New engine logo

Posted on

New engine icon

We have a new engine logo! You’re welcome to use it in your own games, with a title like “Made using Castle Game Engine”, to help promote our engine! It is available in doc/pasdoc/logo subdirectory of the release:

The logo is made by Paweł Wojciechowicz. Just like some other pretty stuff you see in the engine demos (black & white dragon on our banner).

Once we reach our first goal on Patreon (please support us!), Paweł promised to make a set of cool engine-themed wallpapers for patrons. So, more pretty stuff is coming:)

Comment on this post ➤

view3dscene and glViewImage for Mac OS X

Posted on

view3dscene on Mac OS X, with native UI (menu, open dialog...)

Remember to check out the latest Castle Game Engine 6.0 release ! And check our page on Patreon — it has a cool movie showcasing the engine possibilities:)

Since the release this weekend, we already did more stuff:

  • view3dscene and glViewImage released also for Mac OS X (initially were only for Windows and Linux). Highly advised to check your game assets and images.
  • Workaround in engine on GitHub for a small FPC 3.1.1 bug.
  • And improvements to our news pages.
Comment on this post ➤

Castle Game Engine 6.0 release!

Posted on

View3dscene "Lights Editor" at work setting shadow maps
HTML text
Savegames in the cloud using Google Play Games
Dragon Squash title screen and it's game balance equation designed in CastleScript
Curve drawn as enemy "swarm" trajectory
Tiled Sample Map rendered using our engine
Normalmaps - lizardman front in Blender
Normalmaps - lizardman front in our engine (view3dscene)
Normalmaps - lizardman back in Blender
Normalmaps - lizardman back in our engine (view3dscene)

We’re proud to release Castle Game Engine 6.0, a major upgrade to our open-source 3D and 2D game engine for Object Pascal!

Download it from our main page.

This release is the result of more than a year of intensive engine development. The main feature is that almost every part of the engine got significant improvement:) Throughout 2016 I was using the engine intensively to make some cool games, and it resulted in numerous major improvements.

The most important new features are:

User interface and 2D

  1. All UI classes now support automatic UI scaling, parents and anchors. The new manual page about user interface documents these features.

  2. New components: TCastleTimer (demo in examples/2d_standard_ui/timer_test), TCastleScrollView (demo in examples/fonts/html_text), TCastleFlashEffect, TCastleInspectorControl.

  3. TCastleLabel supports now basic HTML (rich text) (demo in examples/fonts/html_text).

  4. Render animation from a sprite sheet in 2D using TSprite (by Tomasz Wojtyś).

Build tool

See the build tool documentation and CastleEngineManifest.xml examples for more details about these features.

  1. Automatic generation of GPU-compressed and downscaled textures. They can also be automatically used by loading the same material_properties.xml in game, so you have a single place where you control which textures are compressed / downscaled.

  2. Valgrind compilation mode (--mode=valgrind), new subcommands "run" and "simple-compile".

Android

  1. A large number of Android package components that provide an instant integration with various 3rd party Android libraries: Google Play Games, in-app purchases, sound, ads, analytics, vibrations and more.

  2. Savegames in the cloud. See ShowSaveGames, SaveGameSave, SaveGameLoad.

  3. UserConfig supported for easy persistent data (local savegames).

Game assets – new formats, extensions, conversions

  1. New castle-anim-frames format, with a Blender exporter. This can export any animations from Blender to our engine (armature, shape keys, physics simulations, particles….), and it can be loaded to TCastleScene, and played by our simple PlayAnimation method.

  2. New X3D extensions: Shape.shading = “WIREFRAME”, fields “slices”, “stacks”, “divisions”, using normal maps from a MovieTexture, Shape.render, many shadow maps and shadow volumes improvements.

  3. Tiled maps support (by Tomasz Wojtyś).

  4. sprite-sheet-to-x3d utility, to convert Starling and Cocos2D spritesheets to X3D (by Trung Le).

More stuff!

  1. CastleRandom unit – fast, wrapped in a class random generator. Use when the speed of random generation is paramount, or you want to use a couple of the generators in parallel (by Eugene Loza).

  2. Design a 2D curve using the “castle-curves” tool, and use it in your programs.

  3. Not integrated with the engine yet, but do check it out: 2D particle system for our engine! (by Trung Le).

  4. Demo models 3.7.0: many new demos, e.g. for castle-anim-frames, bump_mapping, more path tracer demos in lights_materials/raytracer.

  5. Alpha bleeding option in glViewImage 1.6.0.

  6. view3dscene 3.16.0: easily set gravity “up” vector to +Y or +Z, numerous “Lights Editor” improvements.

  7. The engine development has moved to GitHub. The Castle Game Engine repository is here, and a lot of related projects and examples are part of our organization. One of the practical advantages of this is that anyone can submit improvements more comfortably through GitHub: you can fork the engine, commit stuff, and then submit a pull request. This is a cool advantage of Git and GitHub.

  8. Somewhere in the middle of it all, Michalis also wrote a small book about the modern Object Pascal language.

Last but not least, I wanted to mention our new Patreon page. You can support the engine development, help me add great features to the engine, and get some real rewards — I’m devoting a weekend per month exclusively to the features requested by Patrons, you can get access to the cloud build server (continuous integration) for your game projects, and I will have a 24h gamejam every month making a demo game requested by Patrons. Please check out our Patreon page:

Suppport the engine on Patreon

At the end, I wanted to thank many people who helped in this release. In particular, my warmest thanks go to Trung Le, Eugene Loza and Tomasz Wojtyś for contributing a lot of engine improvements. There’s nothing more rewarding than to see other people actually using your engine to do cool stuff, so you really made a difference in my happiness!:) Please continue to contribute!

And a special thanks go to Paweł Wojciechowicz for relentlessly designing fantastic graphic stuff for a color-blind, stubborn programmer!

Thank you!

Comment on this post ➤

Engine release next weekend, and last batch of December 2016/January 2017 news

Posted on

FPS game with debug boxes

OK folks, this is (almost) it!:) We will be announcing the grand engine 6.0 release next weekend! Everything in the engine is ready, so you’re welcome to test now the engine version from GitHub and report last bugs:) Everything should compile and work everywhere. We have many automatic tests performed by Jenkins, but they never cover everything, so please do test the engine yourself — in particular, test your own games too.

Below is the last batch of announcements about the smaller new-and-not-yet-announced engine features. It covers work from the last 2 months which was not yet announced properly on our social channels:

New features, in X3D (and view3dscene and demo-models):

  1. Shape.shading = “WIREFRAME” possibility in X3D. Allows to render something as a wireframe. For now works on Box and Sphere, but eventually all the geometry shapes will honor it. This is the new, portable to OpenGLES, way of making 3D stuff wireframe. It is a start to implement, in the future, all wireframe-related features on OpenGLES (see OpenGLES TODOs). It is used to debug bounding volumes for creatures/items on all platforms.

  2. X3D fields “slices”, “stacks”, “divisions” added to X3D primitives to control their triangulation. The old node KambiTriangulation, which was only consistent with the ancient VRML 1.0, is simply removed now.

  3. You can use normalMaps from a MovieTexture. This is a nice technique when you have a mostly flat surface (that can be rendered using a simple flat geometry) that has some small animated features that play with lighting. Like a water surface, or a water (or blood, or anything…) dripping from the wall, or boiling hot lava or such.

    The sample models are available in demo models (GitHub):

    • demo-models/bump_mapping/test_animated_normalmaps.x3dv
    • demo-models/water/water_shaders.x3dv (this was also possible previously, using shaders).

    You can test them in view3dscene. Use the “Edit -> Lights Editor” to move the light’s location, to see that it’s a dynamic technique — everything changes when lighting moves.

    You can use Blender’s “Bake” to bake normalmaps from an animated procedural texture. You can bake a series of normalmaps using the Python script embedded in the .blend file demo-models/water/water.blend, or using the Blender addon “Animated Render Baker”.

  4. view3dscene new menu items “Set Up (and Gravity Up) +Y” and “Set Up (and Gravity Up) +Z”

  5. Demo models now contain more impressive “path tracer” demos in https://github.com/castle-engine/demo-models/tree/master/lights_materials/raytracer . New files are “office”, “graz”, “bowl_of_soup” — they were used to generate some screenshots on raytracer gallery.

New features, in engine API:

  1. CastleRandom: Our custom, fast, wrapped in a class, random number generator. Can be used everywhere where the speed of random number generation is important, and / or when you want to use a couple of separated random number generators (for example, for use in different threads). By Eugene Loza​ (thousand thanks!).

  2. RenderStyle on every control is “rs2D” (even on scene manager and viewports, to behave naturally with other controls). This makes it easier to order UI stuff, previous rs3D option was rather counter-intuitive. If you want to revert to old behavior temporarily, set SceneManager.RenderStyle := rs3D .

  3. New component TCastleTimer. Cross-platform timer, working as our TUIControl, available both with Lazarus forms and with CastleWindow. See demo in examples/2d_standard_ui/timer_test/timer_test.lpr .

  4. TTimerResult, TProcessTimerResult, TSoundType are now opaque types.

  5. BlendingSort is bs3D by default.

Many improvements to the webpage

The new website is visible on https://castle-engine.io/ . Some highlights:

  1. More streamlined main page (just “Download” the engine)

  2. Documentation: Nice “Getting started” page, “Documentation” drop-down menu, many new manual pages, sidebar prominent on the left

  3. Much improved “Exporting from Blender” page. We have there many new features, too — a new exporter to castle-anim-frames (able to export any Blender animation — armature, shape keys, even physics and particles!), and script to render skybox and cubemap environment maps.

  4. X3D scene graph: Mentions extensions later, nice page about shadow volumes, links to API docs for nodes.

  5. New engine logo, thanks to Paweł Wojciechowicz (from SODA studio​ and Cat-astrophe Games)​!

  6. “Tutorial” renamed to “manual”, that’s a much better name I think:)

  7. New pages like planned features.

New examples:

  1. examples/3d_rendering_and_processing/build_3d_tunnel example, by Eugene Loza (thanks!).

  2. examples/3d_rendering_and_processing/cars_demo (for manual about TCastleScene)

  3. examples/2d_standard_ui/zombie_fighter/zombie_fighter (for manual about UI)

  4. some examples moved to examples/research_special_rendering_methods/ subdirectory. Read research_special_rendering_methods/README.txt to know why.

Fixes:

  1. QuadSet and IndexedQuadSet rendering on OpenGLES fixed.

  2. TGooglePlayGames.RequestPlayerBestScore fixed.

  3. Fixes to: Collisions in view3dscene, bump mapping, shadow maps, OnScreenMenu.

  4. TCastleButton size recalculation much optimized.

  5. PlayAnimation on the same animation fixed.

Comment on this post ➤