The Machinery — August 2021 (version 2021.8)

We’re super happy too see so many people starting to work with both the Free and the Pro versions of The Machinery and we are loving the reactions we are getting. Seems like a lot of you have been waiting a long time for a lightweight, flexible, plugin-based engine written in C.

As usual, we have a number of new features and bug fixes for you in this release. If you haven’t done so already, have a look at the roadmap page that we recently put up. This should give you an idea about what’s coming in the future and if you are logged in to your Our Machinery account, you can even vote for your favorite features.

If you are already running The Machinery, this new release should pop up in your Downloads tab. Otherwise, get it from our download page and have a look at this quick introduction video. We are also working on two books about The Machinery. One is an overview of the engine and the other one a collection of tutorials on how to do specific things. Note that both these books are still works in progress.

If you find bugs in this release or have requests for specific features, post them to our issue tracker. For more general discussions, hit us up on GitHub discussions or Discord.

Key highlights in this release are:

And as always, we also have a number of smaller updates.

Workspaces

A Workspace is a collection of tabs in the editor window. It’s a bit like a “big tab” containing a bunch of “small tabs”. Workspace tabs appear at the left edge of the window and let you switch quickly between workflows focused on specific tasks.

Workspaces.

Workspaces.

If you hold down Ctrl while opening an asset, the asset will open in a new workspace. Similarly, if you hold down Ctrl while pressing the Play button in the scene tab, the simulation will start in a new workspace.

Customizable Shortcuts

Based on a pull request submitted by ForxVT, The Machinery now supports customizable keyboard shortcuts. This will be a relief to anyone using a non-QWERTY keyboard. Use File > Settings to change the default shortcuts:

Customizable shortcuts.

Customizable shortcuts.

High Level Simulation API

The newly introduced tm_simulation_api makes it possible to quickly execute common high-level operations on the game. For example the save_state() and restore_state() functions can be used to save and restore the entire game state, and the pause()/unpause() ones to pause and restart the simulation.

The simulation and rendering of the world has been separated as well to give users of the API more flexibility: simulate() and render() are now exposed to the end user as separate calls.

Note that this is now the API that both the runner and the Simulate Tab use internally, so from now on expect all the features implemented for the Simulate Tab to be available to the final user as well: In general, you can now assume that a published game will look exactly the same as it looks inside the Simulate Tab, as the code that is executed underneath is the same.

Improved Accessibility

As mentioned in a recent blog, we’ve recently done a push for improved accessibility. In addition to the UI Zoom feature that was already in the engine, this push adds high-contrast color schemes and UI automation:

New high-contrast color schemes.

New high-contrast color schemes.

Highlight of UI controls exposed to automation.

Highlight of UI controls exposed to automation.

Community Contributions

  • Thanks to ForxVT for submitting a pull request for user-configurable shortcuts. [#690]
  • Thanks to julhe for submitting a pull request for a look direction matrix. [#701]
  • Thanks to aclysma for submitting a pull request that fixes relative mouse movements in remote desktop sessions. [#711]
  • Thanks to infosia for submitting a pull request that fixes a bug in remove_asset_io() among other fixes. [#699] [#705]
  • Thanks to ProtonGustave for submitting a pull request fixing conditional transitions from empty states and a bug related to animation previews. [#721]

Properties

  • tm_properties_ui_info_t has been removed since it was unclear how it should be used. The field last_hovered_context_menu_rect is now contained in tm_properties_ui_args_t instead. The field last_hovered_focusable_control has been removed as it was a hack used only by the graph.
  • Fixed a potential crash when multi-editing entities. [#706]
  • Fix for a bug where property changes were applied to the wrong object after lost focus. [#697]

Asset Browser

  • Thumbnails are now regenerated after changes have been made to an asset [#624].
  • Creation Graph Assets that have a Shader Instance output will now have a thumbnail generated. The thumbnail is a sphere with the Creation Graph set as material. Since this mode of thumbnail generation renders an entity, the concept of a Baker Context has been added, which can be accessed through tm_baker_context_api. The baker context can be used in combination with a viewer to do these kinds of off-screen entity renders.
  • The Icons View has been replaced by a size slider in the bottom right part of the Grid View.

Editor

  • The camera component can now be previewed by clicking on it in the entity tree.
  • You can now switch the selected camera by double-clicking on a camera component in the entity tree.
  • An orientation tool was added to the scene tab that allows for rotational snapping [#154].
  • Improved false color visualizer. [#709]
  • Improved EV100 visualizer. [#710]
  • Fixed a problem where Zoom keyboard shortcuts were triggering multiple times. [#713]
  • The editor now switches to Safe Mode after a crash.
  • The editor no longer loses focus after saving. [#683]
  • Fix for a crash when a tab is copied by shift-dragging it to another docking well. [#709]

Graph

  • Fix fora crash when opening graphs due to uninitialized memory being used in data returned by the graph importer.
  • Input, Output Overview is unified between graphs

Creation Graph

  • Asynchronous buffer loading is now done for the buffers contained within Image Archive and Crunch nodes. When the task that does the buffer loading finishes, the Creation Graph is marked as dirty and re-evaluated. This reduces stalls.

Simulation

  • You can now disable systems as well as engines in the Simulate Tab. [#48]
  • The Simulate Tab is now restored correctly at startup.

Entity Tree

  • Fixed a bug with Add Component/Child Entity Menus not resetting state correctly. [#699]

Math

  • Renamed tm_euler_to_quaternion to tm_quaternion_from_euler to be consistent with naming conventions.
  • Renamed tm_xyz_from_quaternion to tm_quaternion_to_xyz to be consistent with naming conventions.
  • Added tm_mat44_transpose.
  • Added tm_vec2_dist, tm_vec3_dist, and tm_vec4_dist.
  • Added tm_quaternion_from_direction.
  • Fixed various edge cases with bit-wise functions.
  • Added 2nd order smootherstep curve.

UI

  • Fixed ambiguous indentation in picker with categories. [#687]
  • Color the border in each property for TM_TT_TYPE__POSITION (X, Y, Z → Red, Green, Blue).
  • Hold down F9 to reveal English text when using other languages.
  • Rotating language localization test mode.
  • Fixed a bug where opening a picker using Enter or Space leaked the key press into the textedit inside the picker.
  • The mouse button icons in the status bar now respect the “Switch primary and secondary buttons” in Windows and different button mapping on Linux.
  • A multi-line text edit control was added.
  • Allows get raw theme color data information for faster modifications at runtime.

UI Components

  • Supports TTF font assets.
  • Supports spritesheet assets.
  • It’s possible register a custom interface for user created UI components.
  • Added UI Text component with support for long strings and wrapped text.
  • Added UI Rect component.
  • Added UI Button with support for textures.
  • Order UI Components using z-depth property.
  • Added UI Grid and UI Container layout components.
  • Enable depth test for world space UI Canvas.
  • It’s possible to set and get information using Entity Graphs.

Physics

  • Fixed crash when changing values for Physics Joint Component.
  • Updated PhysX version to PhysX_4.1.2.29882248 to fix crash. [#708]

Rendering

  • The primitive type can now be specified in Draw Call creation graph nodes.
  • Boosted default maximum exposure from 15 to 18. [#710]
  • Removed Lux as a valid light unit for point light sources. [#711]

Import Pipeline

  • Fix for emissive color not being respected during import. [#728]
  • Fix for errors that occur after undo of DCC asset import.

API

  • Callbacks for project loaded, unloaded and save are available

Foundation

  • Unified temp allocator interface.
  • tm_api_registry_api->implementations() returns a carray.

Animation

  • Fix for bad performance in blend_compute_pose().

Entities

  • Blackboard functions are now thread-safe. [#681]
  • Fix for crash in camera controller. [#690]
  • Fix for a crash in Owner Component.
  • Fix for misaligned Gamestate data structure.

Build

  • Fix for missing buildoptions in premake. [#619]
  • tmbuild now clearly alerts about failed builds. [#686]

Documentation

  • Documentation is now generated for the the_machinery directory. [#680]

Linux

  • Fix for incorrect detection of key repeat events.
  • Added some missing input key codes.
  • Fix for crash with drag and drop. [#704]

Runner

  • Fixed a bug that was preventing input events to be feed to the camera. [#753]
by The Machinery Team