If an announcement is made to an empty room, does it mean anything?
What is a “ChronoActions,” and is it tasty?
Well to start with, ChronoActions is a plug-in I’m writing, documenting, and supporting for Godot 4.x.x with the intent to support it through 5.x.x if anyone uses it.
ChronoActions is an implementation of an Action List structure (something I learned at DigiPen), which itself is a less formal version of the Command Software Pattern. Actions get added to an ChronoList, and every frame the ChronoList executes (runs, not French Revolution) those Actions until they finish.
So to answer the other question: No, ChronoActions are not, in all likelihood, tasty.
But if you think this sounds cool already, you can check it out on my GitHub:
https://github.com/Pandahjs/ChronoActions
If you want to know more, read on and I’ll try to answer some other common questions.
What’s an Action? Why do I care?
An Action is anything you’d perform over time.
This could be as simple as “Move a Sprite from Position A to Position B” to as complex as “My whole game’s UI fades in as it spins around like a vortex from off screen into their positions, sliding into their positions with a soft bounce at the end before causing the start button to slowly pulse.”
You could write an Action to change scenes, change states, animate objects, send read or write commands to a file/database, or even to generate other Actions. The point is to provide a simple, flexible framework for interpolating a behavior over time.
Additionally, the use of a ChronoList gives you immediate access to tinker with the time-scale for any or all of the Actions. Want your game or simulation to support a “fast forward” mode where everything runs twice as fast? Tell the ChronoList to pass in double the frame time. Want a cool Bullet Time effect? Tell the ChronoList to run at whatever fraction of the frame time feels like an appropriate slow down. Want to run the whole set of actions in reverse? Tell the ChronoList to pass in a negative frame time and watch as the Actions begin rewinding.
Is this going to fit into my game’s behavior schema?
Yes! (Probably).
Let’s consider the elements of a game behavior:
1. Get input from the game’s state.
2. Make a decision on what to do based on that state.
3. Act on that decision.
ChronoActions is designed to make that third step super easy. Instead of writing a bunch of individualized instructions to make the actor move, you run or write a few simple Actions and let the ChronoList manage their execution in a fire and forget manner.
This means that it doesn’t mean if your decision maker is a Hierarchical State Machine, a Behavior Tree, or even some more exotic system like F.E.A.R.’s planning system, so long as your decision system in step 2 can add Actions to a ChronoList the system can execute.
You mentioned Documentation and Support! Where can I learn more?
For the moment, you can learn more in the GitHub, mostly just in the comments in the code.
In the not too distant future, I plan to add more formal written documentation to describe how to use it as well as how to make your own Actions. I also will be writing the whole plug-in for both GDScript and C# so that regardless of your language choice for Godot you can use it.