Category: Data Structures

Action Lists Part 2

Action lists by themselves are very powerful. As I hopefully showed in part 1, they provide an easy way to chain multiple actions together to form more complex and interesting behavior. But, there are often types of actions that execute in similar ways. If we have an action that scales an object over time, as well as an action that changes an object’s color over time, we have two actions that are repeating the same kind of timing logic. If the time-based logic is abstracted and shared among all actions of that type, it makes things a lot simpler to



Action Lists

Action lists are one of my favorite data structures for games. But from what I’ve found, they don’t seem to be very well known outside of the small community of students at DigiPen Institute of Technology. An action list is simply a list of actions which updates sequentially. An action can block the action behind it, preventing others to run until it’s finished, or can run concurrently. This provides a simple yet powerful interface that can be used for AI, animation, UI, and many other things. Here is a quick demo using the Unity3D Web Player to give you an idea