April 18th, 2009
One of the technologies we've been focusing on recently is game scripting. As part of this effort, I've been working on hotspots. Hotspots allow us to assign a physical location to scripts. We will be using them to initiate dialogues, trigger special effects, incite AI reactions, and much more. And, of course, they will be fully moddable. Here's how they work:
Press the triangle button for captions (download transcript)
Hotspots aren't the only entities that can call scripts. At the start of each level, a "level script" is executed. The level script serves to setup parameters, and it's a convenient place to define functions for later use. Here's the code for the level script in the video:
With this level script in place, the first hotspot was just linked to a script that calls woozy.start() and the second was linked to woozy.stop().
Right now, the scripts can access various camera, graphics, and network controls. Soon we will expose much more (e.g. object creation, movement and transformation controls, rabbot spawning, etc). Hopefully it will be flexible enough that people can make all sorts of random mini-games.
Do you guys have any suggestions for how hotspots and scripting should be handled?