Passer au contenu principal

2023 Jul: Gizmo & Unreal Engine 5.3!

· 4 minutes de lecture
Gabriel T. Nardy
nanos world developer (SyedMuhammad)

New Gizmo Class, Improved HTTP Class, Lua Updated, Unreal Engine 5.3 and more!

Tune in for a roundup of the latest updates from July!

New Class: Gizmo

I am happy to introduce a new wonderful class: Gizmo!

Gizmo

This is a custom tool to manipulate objects, providing a way to change it's location, rotation and scale through an easy 3D transformation tool!

Using Gizmo class with Props

It's usage is really easy and simple! The Gizmo has a Transform event which triggers always when it is updated, moved or changed:

Client/Index.lua
local my_prop = Prop(Vector(), Rotator(), "nanos-world::SM_Cube")

local gizmo = Gizmo()

-- To get the Gizmo location, we just subscribe to it's Transform event
gizmo:Subscribe("Transform", function(self, location, rotation, scale)
my_prop:TranslateTo(location, 0.02)
my_prop:RotateTo(rotation, 0.02)
my_prop:SetScale(scale)
end)

For more examples and complete documentation, please refer to the official page:

Gizmo Classnext/scripting-reference/classes/gizmo

Server Restart

We've got a new built-in server console command: restart. This new command does reconnect all the players and restart all the running packages!

Also, we've got a new method Server.Restart() to allow the same functionality but programmatically through scripting.

HTTP Client Side

The HTTP class was updated and now is present on client side too! Allowing scripters to make Async HTTP Requests on client side as well!

note

On Client side it's only possible to make Async HTTP requests, otherwise it would freeze the main game thread.

HTTP Enum Method

Also we got an improvement in the HTTP methods. Now HTTP.Request() and HTTP.RequestAsync() have the method parameter changed to an Enum: HTTPMethod (was a string).

This way we get more organized and less prone to passing invalid values.

tip

This will not break change as I implemented a new way to warn you if you pass an old parameter type.

Unreal Engine 5.3

In the last news blog I announced that I was going to update the game to Unreal 5.2, but last week we've got the announcement that UE 5.3 was just released as Preview. Usually after entering preview, it takes about 1-2 months to be officially released.

The Unreal 5.2 update was quite ready already, but with that in mind I took the decision to postpone it's release and wait for 5.3 instead. This way we don't need to pass through all the trouble of updating all the assets twice, and do it only once when it get fully released!

Directory/Files Access

We added two new Static Methods to our File Class: File.GetDirectories() and File.GetFiles(), which allow accessing any file from inside the server (or client .transient/) folder.

This is an improvement over the other methods Package.GetDirectories()/GetFiles() as it is not limited to only accessing Package files.

VehicleWater Methods

I am still improving and tweaking our latest new class VehicleWater. Thus I added two new methods to help customizing it:

Updated Lua 5.4.6

I also upgraded our Lua version to the latest 5.4.6 update (we were on 5.4.3).

Those Lua minor updates don't bring any big improvement or change, just small bug or security issues fixes, but it's always good to stay up-to-date!

Conclusion

This was a concise month with some very interesting additions such as the Gizmo class and the extension of the File and HTTP classes, as well as several fixed bugs we performed that can be found in detail on our Changelog in our Discord.

The new Gizmo class is an awesome addition that may facilitate the creation of custom build and editor modes to help creating and customizing maps within the game! Now it's up to your creativity to make good usage of it! I'm looking forward to see Build Modes coming up with that!

The Unreal 5.2 update was quite ready, all the needed migration code were updated, but considering Unreal is already releasing the next UE 5.3, I think we may took advantage of that and wait a little bit to make a big update to 5.3 directly instead.

Thank you for another month of support and help, as always! See you next month!