Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #A-Engine @ http://www.a-superlab.com/category/a-engine/
- # {info} {/info} header of stage files
- # BG_MUSIC_ID= music id to play in this stage. a value of NONE is used to have no music. a value of -1 is used to let previous music play in the stage
- # StAGE_LENGTH = is the length of the area for the stage
- # STAGE_WIDTH= is the width of the area for the stage
- # STAGE_HEIGHT= is the height of the area for the stage
- # CLEAR_COLOR = the color shown where there is no entity rendered in red, green, blue format
- # in between [img][/img] are sprites and textures loaded which can be rendered for an entity via the "img=" tag
- # in between [mdl][/mdl] are 3D models loaded which can be rendered for an entity via the "mdl=" tag
- # in between [cam][/cam] are camera objects which captures a view in the stage which you can use to render somewhere. by default a camera with id=0 will have what it sees rendered to the screen
- {info}
- BG_MUSIC_ID = 1;
- STAGE_LENGTH = 1000;
- STAGE_WIDTH = 1000;
- STAGE_HEIGHT = 1000;
- CLEAR_COLOR = 128, 128, 255; # sky blue
- [img]
- tile[dir = "bg1/tiles/ground.png"] #0
- tile[dir = "bg1/tiles/sky.png"] #1
- sheet[dir="bg1/clouds.png" w=200 h=100 col=2 row=1] #2
- [/img]
- [mdl]
- obj[dir = "bg1/objects/tree_model.obj" scale = 200]
- [/mdl]
- [cam]
- cam[ |PERSPECTIVE| # perspective projection switch
- # id for objects to access the camera
- id = 0 # 0 is the default camera which view's rendered to screen
- # initial camera orientation
- eye_position = 30, 30, 30
- look_at = 30, 30, 100
- top_direction = 0, 1, 0
- # other settings
- min_target_range = 100 # distance to keep from the target position
- x_fov = 60 # field of view
- near = 10
- far = 1000
- # camera movement in space
- eye_weight = 20 # how 'heavy' the eye is. the more this is, the slower the camera will follow
- lookat_weight = 15 # the more this is, the slower the lookat vector will change
- ]
- [/cam]
- {/info}
- # a light source which is responsible for lighting and the position of shadows
- # will be explained later in detail
- [directional_light] # yellowish sun light
- position = 0, 1000, 0 ambient_color=120,120,120 diffuse_color=180,180,180 specular_color=255,255,255 direction_vector=1,-1,0 #down-right direction
- [/directional_light]
- # "x_repeat=no." and "y_repeat=no." are tags only available for use when "img=" points to a "tile"
- # it repeats the tile by a no. of times in the x and the y axes respectively
- [entity] # ground
- img = 0 position = -10,0,-20 x_repeat = 50 y_repeat = 50
- # there is actually no need to rotate this, because 'tiles' are oriented 90 degs by default
- [/entity]
- [entity] # sky
- img = 1 position = -10,-2000,-50 x_repeat = 50 y_repeat = 50 x_parallax_factor=0 y_parallax_factor=0 z_parallax_factor=0 #won't move with the camera
- set_transformation[rotate_angle=-90 rotate_vector=1,0,0] # rotate to have the sky tiles face the screen
- [/entity]
- # x,y,z_recreation_range will cause an object to be created every x, y or z unit length interval
- # a new tree will be spawned every 500 unit length in the x-axis
- # max_entities= limits the amount of entities that can be created by x,y,z_recreation_range
- # 10 trees which appears in random positions in the stage
- [entity] # trees
- mdl = 0 position = 10, 0, -200 z_offset = &random{-50, 50} x_offset = &random{-50, 50} x_recreation_range = 500 max_entities = 10
- set_transformation[rotate_angle=&random{0, 360} rotate_vector=0,1,0]
- [/entity]
- # 3 clouds at a time, once they pass the screen, a new one comes from teh side
- [entity] # clouds
- img = &random{0,1},2 position = -100,500,-1 y_offset=&random{-60, 60} x_offset=&random{-40, 40} x_parallax_factor=0.2 y_parallax_factor = 0.1 z_parallax_factor=0.07
- x_recreation_interval=400 max_entities = 3 x_vel=10 restart_x_position_distance=1200
- [/entity]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement