Tech Blog > Introducing WorkAdventure 1.18

Introducing WorkAdventure 1.18

We're thrilled to announce the release of WorkAdventure 1.18, packed with new features! 🎉

This update focuses on enabling the addition of bots in WorkAdventure and incorporates several minor improvements to enhance your experience.

Ready? Let's dive!

Evolving WorkAdventure: NPC Support

We've implemented significant changes to introduce non-playing characters (NPCs) and bots. WorkAdventure v1.18 expands the scripting API with new functions, empowering you to craft custom bots within the platform.

We even wrote a tutorial to explain how to create your own bot using WorkAdventure and ChatGPT!

Check it out! This release marks the beginning of our journey into the world of bots, with subsequent updates further simplifying the

bot addition process and expanding their capabilities.

Persistent Names and Wokas

In the past, logging into WorkAdventure from a different computer or a private tab meant re-entering your name and choosing your Woka again. Not anymore! Now, when you're logged in, your name and Woka are stored on WorkAdventure servers, ensuring they follow you wherever you log in from.

For anonymous users, nothing changes; your details will continue to be stored locally in the browser.

Quests and Badges for Everyone!

The previous version of WorkAdventure (SAAS release) added the notion of quests and badges. So far, they were enabled for new accounts, but old accounts did not benefit from them unless manually set up. Quests and badges have now been enabled for all worlds, with 2 predefined quests: Marathon (who is going to walk the most?) and Bubble quest (who is spending the most time chatting in a bubble?)

If quests aren't your thing, simply disable them from the Quests panel in your admin dashboard.

Scripting API improvements

Below is a breakdown of the functions we added in the scripting API to make coding bots possible.

Scripting API: New event system

WorkAdventure features a new "event system that integrates with the scripting API.

In the scripting API, until v1.18, the only way to exchange data between players was to use variables.

Variables are great to store data. Because you can track in real-time the changes to a variable, the variable system was often abused to send real-time messages between players.

While it did work, it was not the best solution. Variables are not meant to be used as a real-time messaging system.

WorkAdventure 1.18 introduces a dedicated event system that is meant to be used for exchanging real-time messages.

The event system can be used from the scripting API to broadcast an event to everybody in a room, or to send an event to a specific player. Additionally, the event system can be used from the RoomAPI (server-side API). From the RoomAPI, you can both send and listen to events.

Scripting API: Sending / receiving messages on behalf of the user

When you are in a bubble, the scripting API can now listen to messages sent to you, and also write messages on your behalf.

This means that now, you can indeed code a bot using the scripting API.

... and guess what? There is a new tutorial just for that.

Scripting API: Accessing the URL hash from the scripting API

From the scripting API, you can now access the hash using WA.room.hashParameters (the part of the URL after the "#"). This can be pretty useful to craft special links that enable some features in your maps.

Scripting API: Playing a sound to other players in a bubble (beta)

Via the scripting API, you can now play a sound (MP3 or OGG file) to other players that are in the same bubble as you.

The sound will appear to originate from the microphone of the user that runs the function.

We use this feature associated to a text-to-speech engine to simulate a bot talking to other users in a bubble.

Noise canceling in Jitsi by default

Noise canceling is now enabled by default in Jitsi (unless you are using Firefox).

Why not Firefox? Firefox records audio in stereo and the noise canceling feature does not support stereo input so noise canceling will stay disabled for Firefox users until a proper solution is found.

Screen wake lock

We are now using the screen wake lock API of the browser to prevent your screen lock from starting when you are in the middle of a call.

Stability

We now try to display an error message if a video in a bubble should be received, but is not received.

This should help users diagnose the issues.

#moveTo for area names

You can now put in the URL: "#moveTo=[area_name]" or "#moveTo=[area_id]" and your Woka will automatically walk to this position when entering the map.

This was already the case for areas defined in Tiled. It is now also possible for areas defined in the map editor.

Improved low-level Jitsi broadcasting

The technical stack to use Jitsi as a low-level SFU has been heavily refactored.

With this refactor, it will be possible, in the future, to replace Jitsi with any other SFU and support many SFUs at once.

Those improvements come with a number of bug fixes too.

Headless mode

WorkAdventure can now be started in _headless_ mode. In this mode, the browser will not render the "game" at all.

This will be useless for regular users, but can be useful in a number of specific scenarios (this will speed up E2E tests for instance).

Design

We keep migrating WorkAdventure to the new design system.

In this release, screen-sharing gets some additional space (the videos on the right will be smaller so that the screen-sharing can get more screen space).

Also, the error dialog gets a redesign!

Scrolling performance improved on overcrowded rooms

Some work was done to improve the scrolling performance on maps that are overcrowded (more than 100 users packed in a small area of the map)

Breaking changes

If you are implementing an Admin API, the AdminAPI endpoints have slightly changed.

Check out the release notes for more details.

As usual, there are no breaking changes in maps format or in the scripting API.

Instagram logo in the footer of this web page. LinkedIn logo in the footer of this web page. Twitter logo in the footer of this web page. Facebook logo in the footer of this web page. Discord logo in the footer of this web page. YouTube logo in the footer of this web page. GitHub logo in the footer of this web page.

Copyright © 2024 WorkAdventure - All Rights Reserved