New engine features

Top  Previous  Next

snd_create(STRING* filename)

 

Creates a sound at runtime, using an existing file or the built-in 440Hz sine wave.

 

function siren_startup()

{

       var siren_handle;

       // create a 440Hz sine wave sound with a duration of 1 second

       SOUND* sine_wav = snd_create("#1");

       siren_handle = snd_play(sine_wav, 60, 0); // now play the sound

       while (snd_playing(siren_handle)) {wait (1);} // wait until the sound stops

       snd_tune(siren_handle, 0, 200, 0); // double its frequency

       siren_handle = snd_play(sine_wav, 60, 0); // play the sound again

}

 

 

Improved map compiler

 

The new map compiler contains improvements of the lighting algorithms.

 

aum90_beta1

 

 

Improved TEXT objects

 

The LIGHT flag now also works for TEXT objects, allowing us to set the color of the bitmapped fonts.

 

FONT* ethnocentric_font = "ethnocentric18.tga";

 

TEXT* message_txt =

{

       pos_x = 20;

       pos_y = 20;

       red = 200;

       green = 100;

       blue = 50;

       font = ethnocentric_font;

       string("This text has RGB = 200 100 50");

       flags = LIGHT, SHOW;

}

 

aum90_beta2