Advertisement
Mr-A

A-Engine stage code design

Oct 7th, 2015
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.70 KB | None | 0 0
  1. {info}
  2.   BG_MUSIC_ID = 1
  3.   STAGE_LENGTH = 1000
  4.   STAGE_WIDTH = 1000
  5.   STAGE_HEIGHT = 1000
  6.   BACKGROUND_COLOR = 0, 0, 0 #black
  7.  
  8.   [img]
  9.     tile[dir = "bg1/tiles/ground.png"] #0
  10.     tile[dir = "bg1/tiles/sky.png"] #1
  11.     sheet[dir="bg1/clouds.png" w=200 h=100 col=2 row=1] #2
  12.   [/img]
  13.  
  14.   [mdl]
  15.     obj[dir = "bg1/objects/tree_model.obj" scale = 2]
  16.   [/mdl]
  17.  
  18.   [camera]
  19.    cam[
  20.    # id for objects to access the camera
  21.     id = 0 # 0 is the default camera which view's rendered to screen
  22.  
  23.    # initial camera settings
  24.     init_position = 30, 30, 30
  25.     look_at = 30, 30, 100
  26.     top_direction = 0, 1, 0
  27.  
  28.    # camera movement in space
  29.     x_acc = 10
  30.     y_acc = 10
  31.     z_acc = 10
  32.     r_acc = 10
  33.  
  34.     max_x_vel = 30
  35.     max_y_vel = 30
  36.     max_z_vel = 30
  37.     max_r_vel = 30
  38.  
  39.     max_x_position = 1000
  40.     min_x_position = -20
  41.     max_y_position = 1000
  42.     min_y_position = -20
  43.     max_z_position = 1000
  44.     min_z_position = -20
  45.    
  46.  
  47.    # camera rotation in space
  48.     max_x_angle = 30
  49.     max_y_angle = 30
  50.     max_r_angle = 30
  51.    
  52.     rotation_x_vel = 10
  53.     rotation_y_vel = 10
  54.     rotation_r_vel = 10
  55.    
  56.     angular_x_acc = 1
  57.     angular_y_acc = 1
  58.     angular_r_acc = 1
  59.     max_x_angular_vel = 2
  60.     max_y_angular_vel = 2
  61.     max_r_angular_vel = 2
  62.  
  63.    # camera zooming settings
  64.     init_zoom_scale = 1
  65.     zoom_acc = 0.05
  66.     max_zoom_vel = 0.2
  67.     max_zoom_scale = 2
  68.     min_zoom_scale = 0.5  
  69.  
  70.    ]
  71.   [/camera]
  72.  
  73.  
  74. {/info}
  75.  
  76. [directional_light] # yellowish sun light
  77.   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
  78. [/directional_light]
  79.  
  80. [entity] # ground
  81.   img = 0 position = -10,0,-20  x_repeat = 50 y_repeat = 50
  82.   set_transformation[rotate_angle=90 rotate_vector=1,0,0] # rotate on the x-axis; in the z-axis
  83. [/entity]
  84.  
  85. [entity] # sky
  86.   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
  87. [/entity]
  88.  
  89. # 10 trees which appears in random positions in the stage
  90. [entity] # trees
  91.   mdl = 0 position = 10, 0, -200  z_offset = &random{-50, 50} x_offset = &random{-50, 50} x_recreation_interval = 500 max_entities = 10
  92.   set_transformation[rotate_angle=&random{0, 360} rotate_vector=0,1,0]
  93. [/entity]
  94.  
  95. # 3 clouds at a time, once they pass the screen, a new one comes from teh side
  96. [entity] # clouds
  97.   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
  98.   x_recreation_interval=400  max_entities = 3 x_vel=10 restart_x_position_distance=1200
  99. [/entity]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement