Verse, the new unreal scripting language

As someone who codes in C++ and C# daily, I can tell you there are numerous reasons to prefer a scripting language, but the biggest is probably the ability to quickly write queued code. Take this pseudo-code:

Wait(3.0)
DisplayMessage("Done!")

Ideally, we’d want the program to wait three seconds, then display a message. But in C++, Blueprints*, or C# Unity**, this function will immediately display the message. To get the desired result, your best bet is to use coroutines, which would be difficult-to-impossible using C++ (I’ve tried). It is for this reason that we use Lua in our C++ engine. It supports coroutines with nested yielding.

Based on what we’ve seen, it looks like Unreal Verse will natively support this feature, so that’s reason enough to use it.

*Blueprints have a delay function, but that is the extent of its current capabilities as far as I’m aware. You can’t, for example, make it wait until an object reaches a destination.
**Unity supports coroutines, but it requires special function calls to work correctly, and doesn’t support nested yielding.

1 Like