function main()
{
vec_set(screen_size,vector(800,400,0));
vec_set(screen_color,vector(50,1,1)); // dark blue
vec_set(sky_color,vector(50,1,1)); // dark blue
video_window(NULL,NULL,0,"My New Game");
d3d_antialias = 1;
shadow_stencil = 3;
/////////////////////////////
// Video section
var vid_handle=0; // create a local var to hold the media handle
vid_handle=media_play("testvid.wmv",NULL, 75); //play media and set var
// loop only while var is valid
while(vid_handle)
{
if(key_any) // check if any key was pressed
media_stop(vid_handle); // stop vid
wait(1); // required wait avoids endless looping
}
///////////////////////////////////
camera.ambient = 100;
camera.arc = 90; // set camera.arc to a proper value for shooter games
fps_max = 75; // limit the frame rate to 75 fps (not really needed)
video_screen = 1; // start the game in full screen mode
video_mode = 8; // run at a 1024x768 pixels resolution on monitors with a 4/3 aspect ratio
level_load ("shooter.wmb");
wait (3);
media_loop("action.mp3", NULL, 70); // start the soundtrack
}