Wave Engine 3.0 Preview 4

We are thrilled to bring you a new preview of Wave Egine.

New features

WebGL improvements.

The fourth preview comes with a lot of changes in the WebGL implementation. We have focused on improving the performance of this platform and adding  experimental support for WebGL 1.0.

The main change is the use of Emscripten for calling EGL directly from C# and allowing the use of AOT when the project is built. This means a performance boost of up to 10 times.

Visual Editor in NetCore 3.1

We’ve worked hard to port the Visual Editor to NetCore 3.1, which will allow us to move to Net 5 when the stable release is launched.

Compute Shader and Render Doc Editor integration

Also, now the Visual Editor allows you to write Compute shaders and preview its changes on output textures, and also we’ve integrated RenderDoc for capturing frames and analyzing them.

Skinning with Compute Shaders

This version made possible to add Skinning in models using Compute Shaders in the supported platforms. This proved to be 4 times faster than our previous system, due to the amazing parallel performance.

Azure Remote Rendering

Finally, we have created a new integration for Azure Remote Rendering, that is available in GitHub.

Continue reading Wave Engine 3.0 Preview 4

Wave Engine 3.0 Preview 3

We are excited to announce the release of Wave Engine 3.0 third preview!

New features

In this one we have worked hard to include a new template for Web applications. The launch of Mono Wasm has allowed us to deploy your Wave Engine apps to the browser, although there are some limits at the moment (such like native libraries: Bullet Physics, Noesis GUI, etc.) You can read our post about the glTF viewer we have launched to find some details about the implementation.

Also, the engine has been updated to support HoloLens 2, integrating the new APIs and updating the Mixed Reality template.

Furthermore, we have integrated Physically Based Rendering (PBR), enabled by default in the Standard Material, and new photometric lights and cameras that will improve the render quality.

Continue reading Wave Engine 3.0 Preview 3

New async/await features

We have improved the async/await support in WaveEngine 2.4.0 by replacing our Dispatcher and TaskScheduler services with a custom implementation of .Net TaskScheduler and creating some useful helpers.

Porting project

The biggest change is the substitution of Dispatcher and TaskScheduler services. The new way to execute code in the foreground or background threads is by using the new helper methods from WaveForegroundTask and WaveBackgroundTask static classes.

To port current projects using the new classes, we need to change the following:

  • If you are using WaveServices.Dispatcher, you must replace it to use WaveForegroundTask.

  • If you are using WaveServices.TaskScheduler, you must replace it to use WaveBackgroundTask.

Both new ways to execute code return a .Net Task, which integrates easily with async .Net code.

Foreground and Background threads

Before we start to review the new included features, it is good to know these details:

  • When a task is executed in the Foreground thread, like with the Dispatcher service, it is executed in the next update cycle.
  • With the Background thread, the tasks are executed sequentially in a specific thread that can access the graphic resources. This allows us, for example, to load textures. The old TaskScheduler executes the code in a .Net thread and without taking concurrency issues into account when accessing the graphic context. In comparison, this new service ensures that each task is executed in the same thread and sequentially.

ConfigureWaveAwait

One useful helper introduced in the new WaveEngine version is the ConfigureWaveAwait extension method.
It allows us to configure how the await continuation is handled. Just as the .Net ConfigureAwait extension method allows us to configure if we want that the continuation of the await is executed on the captured context, the method ConfigureWaveAwait allows us to configure where the await continuation is executed: in the Foreground or the Background thread.

A simple way to test this new method is to load an image from a URL into a sprite:

The WaveTaskContinueOn enum also includes other options. The Default option acts as if the ConfigureWaveAwait has not been used, and the ThreadPool option acts as if the ConfigureAwait(false) from .Net has been used.

Async/await and GameActions

With the inclusion of GameActions, WaveEngine has acquired an excellent way to define a flow of actions that is integrated perfectly with the common scenarios in a game (like animations, play sounds, wait for a condition, etc.).

In this release, we have included the AsTask extension method that simplifies the way that .Net Tasks and GameAction interact with each other.

A simple sample using all of these new features:

I hope you find it useful when you want to use async code in your game. It is the first step and we will work to include new async APIs and features in next releases.