First off, have some videos: http://www.youtube.com/watch?v=2-aEbAYI4lE http://www.youtube.com/watch?v=GC8dGIxt0ZU
The language has been designed specifically with shmups in mind, and some of its features include:
- emitters can have several states, which they can move between. Each state can be used to represent a particular pattern.
- emitters can be grouped together by a controller and animated, turned on and off, etc, to model complex boss patterns easily.
- controllers can handle events passed to them by game code. This allows communication from the game to the bullet system.
- you can emit anything, it doesn't have to be bullets. Sound effects, beam weapons, enemies can all be emitted just as easily.
- once emitted, bullets can be controlled in a variety of ways, or you can control them entirely yourself, it's up to you.
Here's an example script:
Code: Select all
emitter Pattern
{
// member variables
totalTime = 0;
// functions, used to control emitted bullets
spin = function(time)
{
$angle += {90, time}; // increase angle by 90 over <time> seconds
wait(time); // wait for <time> seconds
$speed -= {20, time - 1}; // decelerate
wait(time - 1);
// emit two more bullets from this bullet
emitA bullet($angle + 30, $speed);
emitA bullet($angle - 30, $speed);
}
// initial state
stage1 = state
{
i = 0;
while (i < 360) {
emitA bullet(i, 100) : spin(2); // emit bullets using spin() to control
i += 10;
}
wait(0.5);
totalTime += 0.5;
// go to next state after 10 seconds
if (totalTime > 10) {
totaltime = 0;
goto stage2;
}
}
stage2 = state
{
// fire a bullet at the player
emitT bullet(Player_X, Player_Y, 300);
wait(0.25);
totalTime += 0.25;
// go to next state after 10 seconds
if (totalTime > 10) {
totaltime = 0;
goto stage1;
}
}
}