Around four months ago, the Godot game engine underwent a major overhaul with the release of version 4. Now, the first significant new version is out: Godot 4.1.
This new update includes new features along with over 900 bug fixes reported from users using Godot 4.
Let's have a quick look at what's new:
Core
A change was introduced that swaps the front and back camera directions in the editor. This was done to solve a problem where imported models would end up facing backward.
Additionally, The look_at()
function now has an argument to use the model space as the reference for looking forward instead of the camera's minus Z axis. These changes also help fix a long-standing bug with path following.
This update also introduces frame delta smoothing which can significantly improve the fluidity of motion and give smoother gameplay. The option is enabled by default but only works with VSync enabled.
Performance
Adding and removing child nodes, a common engine operation is now several times faster due to a new fast hashmap algorithm. However, uncommon node operations may experience a slight decrease in speed. The base node class also has a 10% higher memory footprint.
This small trade-off is nonetheless essential as it brings significant advantages to all Godot users, particularly those working on complex projects involving extensive node manipulation.
This version also introduces experimental multithreading. New node properties give you full control over how nodes get processed, sequentially or in parallel. It is nonetheless not advised to use this feature in production yet.
Godot 4.1 also introduces a pipeline cache for the Vulkan renderer, aimed at reducing stuttering and improving load times caused by compiling pipelines.
Although the issue is not completely resolved, this update represents a step in the right direction, resulting in a slight decrease in load times when using one of the RenderingDevice-based rendering backends. The cache is enabled by default in Godot 4.1 but can be disabled in the project settings.
Scripting
GDScript
GDScript now has static variables that enables you to store data on the class instead of each instance, so they're shared between every instance of the class.
Introduced in Godot 4, the automatic generation of documentation pages for named classes has been updated. Enumerations are now treated as types making the generated documentation more precise.
Additionally, you can now use inline docstrings, eliminating the need to place them solely above variable or function definitions.
C#
In GDScript, you can define a new node type to use in the editor by adding a global class name to your script. With Godot 4.1, this functionality is now also available in C# by using the [GlobalClass]
attribute in your file. You can also use the [Icon]
attribute to give your global class a unique icon.
GDExtension
Although still in beta, GDExtension is now even closer to GDScript and C# in terms of scripting capabilities. It is now possible to implement new visual shader nodes and create editor plugins with it.
This release also introduces a backward compatibility system to help ensure that code written for Godot 4.1 keeps working even if the API changes in future releases.
Editor
With this update you can now detach parts of the editor as floating windows. You can detach docs, the script editor and the shader editor. In addition, the editor now keeps track of your window layout so that when you close and reopen it, you should find yourself exactly where you left off.
Godot 4.0 made it possible to define and export typed arrays or export individual nodes to the inspector, but it wasn't possible to combine the two. This is now possible in Godot 4.1 which offers greater flexibility and convenience for connecting game elements.
The project manager now supports the assignment of tags to individual projects, along with the ability to filter projects based on these tags. This new functionality greatly simplifies the process of searching through a large number of Godot projects.
Rendering
This update introduces a significant rework of particle turbulence. This revamp provides artists with enhanced creative control over the creation of rich and expansive effects commonly seen in modern games.
It is now possible to easily control the density of volumetric fog and make it thinner in certain areas. This is possible by making use of the new 3D noise textures. NoiseTexture3D can also be used to create particle attractor vector fields, which is useful to simulate wind that affects particles.
Navigation
The real-time avoidance feature for AI navigation has been significantly enhanced. In the previous version (Godot 4.0), avoidance was limited to a single plane. However, in this release, the avoidance algorithms have been completely rewritten, resulting in improved behaviors and greater control. The new algorithms enable avoidance to occur in both 2D and 3D, allowing flying agents to navigate above ground-based entities.
Another notable addition is the implementation of layers, enabling precise control over agent avoidance and the ability to assign priorities for agents to push each other away.
Godot 4.1 is available for download on the official Godot website.