View difference between Paste ID: uULdyh5n and 63ceydnh
SHOW: | | - or go back to the newest paste.
1
#A-Engine @ http://www.a-superlab.com/category/a-engine/
2-
  BG_MUSIC_ID = 1
2+
3-
  STAGE_LENGTH = 1000
3+
# {info} {/info} header of stage files
4-
  STAGE_WIDTH = 1000
4+
# 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
5-
  STAGE_HEIGHT = 1000
5+
# StAGE_LENGTH = is the length of the area for the stage
6-
  BACKGROUND_COLOR = 0, 0, 0 #black
6+
# STAGE_WIDTH= is the width of the area for the stage
7
# STAGE_HEIGHT= is the height of the area for the stage
8
# CLEAR_COLOR = the color shown where there is no entity rendered in red, green, blue format 
9
10
# in between [img][/img] are sprites and textures loaded which can be rendered for an entity via the "img=" tag
11
# in between [mdl][/mdl] are 3D models loaded which can be rendered for an entity via the "mdl=" tag
12
# 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
13
 
14
{info}
15-
    obj[dir = "bg1/objects/tree_model.obj" scale = 2]
15+
  BG_MUSIC_ID = 1;
16
  STAGE_LENGTH = 1000;
17
  STAGE_WIDTH = 1000;
18-
  [camera]
18+
  STAGE_HEIGHT = 1000;
19-
   cam[
19+
  CLEAR_COLOR = 128, 128, 255; # sky blue
20-
   # id for objects to access the camera 
20+
21
  [img]
22
    tile[dir = "bg1/tiles/ground.png"] #0
23-
   # initial camera settings
23+
24-
    init_position = 30, 30, 30
24+
25
  [/img]
26
27
  [mdl]
28
    obj[dir = "bg1/objects/tree_model.obj" scale = 200]
29-
    x_acc = 10
29+
30-
    y_acc = 10
30+
31-
    z_acc = 10
31+
  [cam]
32-
    r_acc = 10
32+
   cam[ |PERSPECTIVE| # perspective projection switch
33
   # id for objects to access the camera
34-
    max_x_vel = 30
34+
35-
    max_y_vel = 30
35+
36-
    max_z_vel = 30
36+
   # initial camera orientation
37-
    max_r_vel = 30
37+
    eye_position = 30, 30, 30
38
    look_at = 30, 30, 100
39-
    max_x_position = 1000
39+
40-
    min_x_position = -20
40+
41-
    max_y_position = 1000
41+
   # other settings
42-
    min_y_position = -20
42+
    min_target_range = 100 # distance to keep from the target position 
43-
    max_z_position = 1000
43+
    x_fov = 60 # field of view 
44-
    min_z_position = -20
44+
    near = 10
45
    far = 1000
46
47-
   # camera rotation in space
47+
48-
    max_x_angle = 30
48+
    eye_weight = 20 # how 'heavy' the eye is. the more this is, the slower the camera will follow
49-
    max_y_angle = 30
49+
    lookat_weight = 15 # the more this is, the slower the lookat vector will change
50-
    max_r_angle = 30
50+
51
  [/cam]
52-
    rotation_x_vel = 10
52+
53-
    rotation_y_vel = 10
53+
54-
    rotation_r_vel = 10
54+
55
56-
    angular_x_acc = 1
56+
# a light source which is responsible for lighting and the position of shadows
57-
    angular_y_acc = 1
57+
# will be explained later in detail
58-
    angular_r_acc = 1
58+
59-
    max_x_angular_vel = 2
59+
60-
    max_y_angular_vel = 2
60+
61-
    max_r_angular_vel = 2
61+
62
# "x_repeat=no." and "y_repeat=no." are tags only available for use when "img=" points to a "tile"
63-
   # camera zooming settings
63+
# it repeats the tile by a no. of times in the x and the y axes respectively
64-
    init_zoom_scale = 1
64+
65-
    zoom_acc = 0.05
65+
  img = 0 position = -10,0,-20  x_repeat = 50 y_repeat = 50 
66-
    max_zoom_vel = 0.2 
66+
  # there is actually no need to rotate this, because 'tiles' are oriented 90 degs by default
67-
    max_zoom_scale = 2
67+
68-
    min_zoom_scale = 0.5  
68+
69
[entity] # sky
70
  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
71-
  [/camera]
71+
  set_transformation[rotate_angle=-90 rotate_vector=1,0,0] # rotate to have the sky tiles face the screen
72
[/entity]
73
74
# x,y,z_recreation_range will cause an object to be created every x, y or z unit length interval
75
# a new tree will be spawned every 500 unit length in the x-axis
76
# max_entities= limits the amount of entities that can be created by x,y,z_recreation_range
77
# 10 trees which appears in random positions in the stage
78
[entity] # trees
79
  mdl = 0 position = 10, 0, -200  z_offset = &random{-50, 50} x_offset = &random{-50, 50} x_recreation_range = 500 max_entities = 10
80
  set_transformation[rotate_angle=&random{0, 360} rotate_vector=0,1,0]
81-
  img = 0 position = -10,0,-20  x_repeat = 50 y_repeat = 50
81+
82-
  set_transformation[rotate_angle=90 rotate_vector=1,0,0] # rotate on the x-axis; in the z-axis
82+
83
# 3 clouds at a time, once they pass the screen, a new one comes from teh side
84
[entity] # clouds
85
  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
86
  x_recreation_interval=400  max_entities = 3 x_vel=10 restart_x_position_distance=1200
87
[/entity]