CREATES A SCENE2D AND GIVES IT NUMBER N AS REFERENCE
ACTION
The command SCENE2D N creates a SCENE2D to display a 2D universe, and gives it a number N. The number N will be used to designate the SCENE2D.
A SCENE2D can display a picture in background and can receive SPRITES. A SCENE2D and SPRITES are the basis of 2D video games. The SPRITES can be moved, hidden, displayed without disturbing the background picture of the SCENE2D, they own a "transparent" color, not displayed.
The SCENE2D is created at position (0,0) : that is TOP = 0 pixel and LEFT = 0 pixel, with dimensions WIDTH = 200 pixels and HEIGHT = 200 pixels.
A SCENE2D can generate the event : ON_CLICK.
Remark: by default, the SCENE2D is created on the FORM number 0, but another FORM can be used. For that, create a FORM by FORM N, and send it all the commands by COMMAND_TARGET_IS N before creating the SCENE2D.
SYNTAX:
SCENE2D N
USE ERROR EXAMPLE
rem create a SCENE2D with default position and dimensions
scene2D 1
rem load a background picture
file_load 1,"My 2D world.bmp"
rem change the dimensions of SCENE2D
width 1,600
height 1,400
SCENE2D
SCENE2D N
SEE ALSO
FILE_DIALOG