Per-platform compressed textures and build tool improvements

Posted on

Lady from "The Unholy Society" (unholy-society.com)
  1. When you use our auto-generated compressed and scaled textures feature, you can now indicate that certain compression formats are only useful for certain platforms.

    In effect, the textures will not be distributed on other platforms, i.e. castle-engine package --target=xxx (see the build tool documentation) will automatically exclude the unused textures on target platform.

    See the documentation for a precise description and example what to write in your data/material_properties.xml file to use it.

  2. Our build tool run command on Unix now supports a “wrapper script”, which allows to e.g. modify environment variables (like LD_LIBRARY_PATH) before running the application.

    An example of such script would look like this:

    #!/bin/bash
    set -e
    # Include current directory in LD_LIBRARY_PATH, to find fmod dynamic library
    export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:libraries/x86_64-linux/"
    ./play_sounds "[email protected]" # <- replace this with name of your application
    

    (This example is directly from FMOD for Castle Game Engine docs.)

    Executing castle-engine run will simply look for run.sh or <application_name>_run.sh script in the project directory, and executes it if found (instead of executing the compiled binary directly).

  3. castle-engine compile and castle-engine package commands support the --ios-simulator option, to include the iOS simulator support. By default this is off, as including simulator support makes build longer (2 more platforms to compile for) and often it is not necessary.

    This is meaningful only when building for iOS, that is with --target=iOS for the build tool.

Start the discussion at Castle Game Engine Forum