Submit models to opengameart.org with [cge] tag, while we’re working on our Asset Store

Posted on

Screenshot of selection at 2018-08-30 17:14:29

We got excited and we decided to build our own Asset Store:) Initial plans are here.

While it’s being created, I suggest we upload models to opengameart.org and mark them by placing [cge] in the title. This way we can build the content for our asset store today 🙂 We have a persistent link to all models marked [cge], make sure your models appear there.

  • The point of the models tagged with [cge] (and later in our asset store) is to be available in formats that Castle Game Engine can handle. Like X3D, castle-anim-frames, Spine JSON. See the exporting documentation about how to export from various software.
  • Of course, just like all opengameart.org submissions, the assets must also be clearly marked with an open-source license. And, like all opengameart.org assets, you are strongly encouraged (but not required) to upload also a “source” model version (in Blender, Spine etc.), to allow people creating derivative works from it.

  • It is best to test your models in view3dscene (you can use stable view3dscene version, or view3dscene snapshots from the latest GitHub code). Run the animations to see they are OK too, using menu item Animation -> Named Animations (this calls the familiar method PlayAnimation in CGE).

Note: The assets I upload will also be available as part of CGE demo-models repository, in subdirectory opengameart.org-submissions. So you can also get them from GitHub, and you can submit pull requests to add/modify them. But that’s just my choice, you can host your models in any way you like, just make sure to upload them 🙂

Comment on this post ➤

Headlight, built-in simple profiler, more

Posted on

view3dscene-headlight-for-cge-news
view3dscene-copy-camera-pascal

New stuff in the engine 🙂

  1. More comfortable control over headlight using TCastleSceneManager.UseHeadlight property. This allows to easily turn headlight on/off regardless of the MainScene existence and it’s contents.

    See also TUseHeadlight type docs. See also new TCastleSceneManager.HeadlightNode property to customize headlight shape.

    A new demo showing how to control the headlight is in examples/headlight_test/

  2. view3dscene has a new menu option Print Current Camera (Viewpoint) (Pascal) that outputs a suitable Camera.SetView(...) Pascal code.

  3. The engine includes a simple time usage profiler (TCastleProfiler, Profiler singleton).

    It is automatically used by various CGE loading routines.

    Simply call Profiler.Enabled := true, and you will get in the log profile of the TCastleApplication.OnInitialize execution.

    Display Profiler.Summary at any point, in any way, in your application, to show the currently gathered profile.

    See the TCastleProfiler docs for more.

    Sample output:

    -------------------- Time Profile begin
    Profile (speed of execution).
    Each line shows time, followed by [time spent in this process], followed by description.
    Lines are sorted within each group, to show the most expensive operation at the top.
    
    7.35 [7.35] - TCastleApplication.OnInitialize
    > 1.65 [1.65] - Loading .../character/soldier1.castle-anim-frames (TCastleSceneCore)
    > 1.49 [1.48] - Loading .../level/level-dungeon.x3d (TCastleSceneCore)
    > 0.78 [0.78] - Loading All Sounds From .../audio/index.xml (TRepoSoundEngine)
    > > 0.71 [0.71] - Loading .../audio/dark_fallout.ogg (TSoundFile)
    > > 0.00 [0.00] - Loading .../audio/flaunch.wav (TSoundFile)
    2.07 [2.07] - Prepare Resources .../level/level-dungeon.x3d
    -------------------- Time Profile end
    
Comment on this post ➤

Sound engine improvements, paper about Tornado statistics in Ukraine, other news

Posted on

large_poster2_cthulu2
  1. Sound engine improvements:
    • Easy additional simultaneous music tracks, for easily playing looping sounds, using the new LoopingChannel property.

    • Added a <group> element to group your sounds in “sound repository” XML files. See the manual about “Sound”.

    • We auto-detect extension (.wav, .ogg) if no URL is specified for <sound> in “sound repository” XML files (previously we assumed .wav).

  2. The paper Tornado statistics in Ukraine based on new data is using Castle Game Engine for visualizations!

  3. Our xxx_compile.sh scripts now just call the build tool. See this commit log for numerous reasons why this is better.

  4. Our website is now protected by Cloudflare. In case of outage, you will see a cached version.

Sorry for being so quiet lately, lots of work! A big announcement about a big new feature is on the horizon, but I am not ready yet. 🙂

Comment on this post (2 comments now) ➤

User-defined clipping planes, TInputShortcut example

Posted on

clip_plane_0
  1. ClipPlane allows you to define custom clipping planes.

    See our documentation of nodes, X3D documentation of ClipPlane, and a simple demo or very complicated demo.

    Remember that this node can be specified in an X3D file (which you can open using e.g. view3dscene or load to TCastleScene), or it can be added and changed using Pascal code (use TClipPlaneNode class).

    While we already had this feature in the past, it was broken in the modern shader pipeline. It is fixed now, and will work both in modern OpenGL and on mobile OpenGLES 🙂

    • in OpenGL >= 3: use built-in gl_ClipDistance

    • in OpenGL < 3, keep using gl_ClipVertex,

    • in OpenGLES: use own castle_ClipDistance, discard in fragment shader.

  2. We also have a new example showing how to use TInputShortcut and save it to a config file.

Comment on this post ➤