How do you manage concurrency in Godot ?

ecstaticcoderecstaticcoder Posts: 1Member
edited November 2017 in Programming

I'm considering using Godot instead of Unreal Engine for my next project.

In SkookumScript, the concurrency is managed using the sync and race commands

sync
  [
  _do_this
  _do_that
  ]
// Runs after both _do_this and _do_that complete
_do_next

race
  [
  _do_this
  _do_that
  ]
// Runs after either _do_this or _do_that completes
_do_next

In the past I used state machines to manage this kind of activity synchronization, but when your entity main activities trigger several sub-activities, which also require several sub-activities etc, you may end up managing dozens of sub-states.

While being able to use concurrent routines which simply calls other concurrent routines leads to much simple and concise code, so I would like to know if there is an easy way to achieve the same result in one of Godot scripting languages ?

Sign In or Register to comment.