Previous: Audio, Up: API Reference [Contents][Index]
Game logic is a web of asynchronous events that are carefully
coordinated to bring the game world to life. In order to make an
enemy follow and attack the player, or move an NPC back and forth in
front of the item shop, or do both at the same time, a scripting
system is a necessity. Chickadee comes with an asynchronous
programming system in the (chickadee scripting)
module.
Lightweight, cooperative threads known as “scripts” allow the
programmer to write asynchronous code as if it were synchronous, and
allow many such “threads” to run concurrently.
But before we dig deeper into scripts, let’s discuss the simple act of scheduling tasks.
• Agendas | Scheduling tasks. | |
• Scripts | Cooperative multitasking. | |
• Tweening | Animations. | |
• Channels | Publish data to listeners. |