New engine features

Top  Previous  Next

Unlimited dynamic lights

 

The maximum number of lights can be set through the max_lights variable (default: 100 for the current beta version). The light manager uses the ABT for calculating which objects lie in the ranges of which lights, and generates lists of close lights for every object. An entity, block, or terrain chunk can receive light from up to 8 different light sources simultaneously.

 

 

str_cursor

 

Returns the current cursor position in a string which is being edited by the inkey function.

 

var cursor_pos;

 

string my_str = "          "; // allow up to 10 characters

 

panel my_pan

{

       pos_x = 0;

       pos_y = 0;

       layer = 10;

       digits (150, 300, 2, *, 1, cursor_pos);

       flags = visible;

}

 

text my_txt

{

       pos_x = 100;

       pos_y = 250;

       layer = 10;

       string (my_str);

       flags = visible;

}

 

function edit_text()

{

       if (inkey_active == on) {return;} // don't react if the player presses the "E" key several times

       my_txt.visible = on; // display the text

       str_cpy (my_str, ""); // reset the string

       while (str_cmpi(my_str, "") == 1) // make sure that the player has typed something in

       {                

               inkey(my_str); // show the cursor -> store the input in my_str

               wait (1);

       }

}

 

starter track_cursor()

{

       while (1)

       {

               cursor_pos = str_cursor(my_str);

               wait (1);

       }

}

 

on_e = edit_text;

 

 

Improved model shaders

 

Model shaders now support several skins per mesh subset. The skin assignments are detected automatically by the engine.

 

aum62_hot