summaryrefslogtreecommitdiff
path: root/dat
blob: 5c63d53c3e10be4ba2f9bdba0beb047037213bbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
# Example glgrav data file
#
# Note that when using object names, case is important.  Case in commands and
# arguments is not.
#
# $Id: dat,v 1.2 2007-05-22 23:27:20 ianc Exp $
#


# Define position of observer
#
#	camera x,y,z,yaw
#
camera 0.0, 200.0, -1000.0, 0.0;


# If supported by the environment defines the window size.  Illegal window
# sizes should be silently ignored.  Default is 640x480.
#
window_size 500,500;


# Enable/disable flags.  All flags are disabled by default, but can be
# explicitly disabled with disable.  Flags are:
#
#	solid		- Draw objects as solid, not wireframe
#	lighting	- Enable lighting
#	texture		- Enable texturing
#
enable solid;
enable lighting;
enable texture;


# collide allows the values:
#
#	none		- Masses simply pass through each other
#	shatter		- Masses explode into various parts.  See shatter
#			  command for extra details.
#	merge		- The larger mass swallows the smaller mass.
#	delta_merge	- The larger mass swallows the smaller mass, gaining
#			  some of the smaller masses delta in proportion to
#			  the size of the masses.
#
collide delta_merge;

# Define how shatter collisions should behave
#
#   shatter num,dx,dy,min,max,sheild;
#
#	num		- Each mass will split into this many equal massed
#			  objects.
#	delta		- Each new mass will have a pseudo random number
#			  between -delta and +delta added to the parents 
#			  mass's delta.
#	min		- Objects below this mass will not shatter and will
#			  simply be merged into a larger mass (even below the
#			  max control below) on collision.
#	max		- Objects above this mass can only be shattered by
#			  other masses above this max mass.  Objects below the
#			  max limit will simply be merged on collision.
#	shield		- The number of 'ticks' that the newly generated
#			  objects created by a collision are safe from 
#			  collisions with other shatter particles.
#
# Note that when masses shatter they inherit the parent objects colour and
# texture.  The default is:
#
#   shatter 10,5.0,10.0,1000.0,100;
#
shatter	10,5.0,10.0,1000.0,100;


# Defines the maximum number of masses.  This is solely to stop runaway
# shatter collisions crippling your machine.  If left defined the default
# is 1,000,000.
#
max_mass 1000;

# Define gravitational constant
#
const 0.00001;


# By default the radius of the calcualted for each mass as if the sphere has a
# volume equivalent to it's mass.  This allows that to be scaled and defaults
# to 1.0 if undefined.
#
scale 2.5;


# Body definition is:
#
#   body name,mass,x,y,z,dx,dy,dz,r,g,b,rot
#
#	name 		- Name of object
#	mass 		- Mass of object (0 for massless)
#	x,y,z 		- Position of object
#	dx,dy,dz 	- Initial velocity of object
#	r,g,b		- Colour of object [0.0 - 1.0]
#	rot		- Number of degrees to rotate per 'tick'.
#
# Note on 'massless' objects:
#
#	Objects defined with a mass of zero indicate 'massless' objects.
#	They are attracted by other bodies, but have no effect themselves.
#	Also they are not involved with collisions.  Note that so they are
#	attracted 'massless' objects actually have a mass of 0.0001.
#
body 	Sun,
	200.0,
	0.0,0.0,-1500.0,
	0.0,0.0,0.0,
	1.0,1.0,0.0,
	0.0;


# Set the plane for radial and multiple radial objects.  Note that this
# command can appear multiple times to the set the plane for objects defined
# from the point on.  The default plane is 'xy'.
#
# Valid planes are:
#
#	xy		- Create object with a Z co-ord that matches the parent
#	xz		- Create object with a Y co-ord that matches the parent
#	yz		- Create object with a Z co-ord that matches the parent
#
plane xz;


# Radial definition is:
#
#   radial name,mass,parent,distance,angle,speed,r,g,b,rot
#
#	name 		- Name of object
#	mass 		- Mass of object.  Zero indicates body is attracted,
#			  but appears massless to other objects.
#	parent		- Name of object this one orbits.
#	distance	- Distance from parent.
#	angle		- Angle around parent in X-Y plane [0.0 - 360.0]
#	speed		- Speed of object.
#	r,g,b		- Colour of object [0.0 - 1.0]
#	rot		- Number of degrees to rotate per 'tick'.
#
# Note that the vector calculated from the distance, angle and speed will have
# the parent's vector added to it.
#
radial 	Earth,
	30.0,
	Sun,
	400.0,180.0,0.3,
	1.0,1.0,1.0,
	0.5;

radial 	Moon,
	10.0,
	Earth,
	50.0,180.0,0.15,
	1.0,1.0,1.0,
	0.1;


# A multiple radial definition is:
#
#   multiple name,num,mass,mass_inc,parent,distance,distance_inc,
#		angle,ang_inc,speed,speed_inc,r,g,b,rot
#
#	name 		- Name of object.  A number is added to the end of
#			  the name for each object, ie. name 1, name 2, ...
#	num 		- The number of masses to create.
#	mass 		- Mass of objects.  Zero indicates body is attracted,
#			  but appears massless to other objects.
#	mass_inc 	- Amount to change from initial mass per object.
#	parent		- Name of object this one orbits.
#	distance	- Distance from parent.
#	distance_inc	- Amount to change distance per object.
#	angle		- Angle around parent in X-Y plane [0.0 - 360.0]
#	angle_inc	- Amount to change angle per object.
#	speed		- Speed of object.
#	speed_inc	- Amount to change speed per object.
#	r,g,b		- Colour of object [0.0 - 1.0]
#	rot		- Number of degrees to rotate per 'tick'.
#
multiple 	Belt,
		10,
		4.0,
		0.0,
		Sun,
		150.0,
		0.0,
		0.0,
		30.0,
		0.5,
		0.0,
		1.0,1.0,1.0,
		0.0;


# Defines the object which will be a light source:
#
#   light name,r,g,b
#
#	name 		- Name of object
#	r,g,b		- Colour of light [0.0 - 1.0]
#
light Sun,1.0,1.0,1.0;


# Provide a list of the objects you wish to look from and at
#
#   look name;
#   mlook name,num;			(Mutiple look for multiple objects)
#
look Sun;
look Earth;
look Moon;
mlook Belt,10;


# Initial objects to look at and travel as.  Must be after any look commands
#
look_at Sun;
#travel_as Belt 1;


# Define textures for objects.  Textures have to be in raw RGB format.
#
#   num_texture number			(Define no. of textures)
#
#	number		- Number of textures to allocate.  Note this also
#			  includes ring textures.
#
#
#   texture name,file,width,height	(Bind a texture to a body)
#
#	name		- Name of object
#	file		- File holding texture image
#	width,height	- Size of texture
#
#   reuse name,other			(Reuse a previously bound texture)
#
#	name		- Name of object
#	other		- Object name to which the texture is associated
#			  Note that ring textures can be reused too.
#
#   mreuse name,num,other		(Mutliply reuse a texture)
#
#	name		- Name of object
#	num		- Number of objects.  name 1, name 2, etc will be
#			  derived from this to get the real object name.
#	other		- Object name to which the texture is associated
#			  Note that ring textures can be reused too.
#

# eg.
num_texture 3;
texture Moon,moon.raw,256,256;
texture Earth,earth.raw,512,256;
mreuse Belt,10,Moon;


# Define rings 
#
#
#   ring name,from,to,r,g,b,alpha,rot,angle 	(Define a ring)
#
#	name		- Name of object
#	from,to		- The inner and outer radius of the ring in terms
#			  of the radius of the body.
#	r,g,b		- Colour of the ring [0.0 - 1.0]
#	alpha		- Transparency of the ring [0.0 - 1.0]
#	rot		- Number of degrees to rotate per 'tick'.
#	angle		- Tilt from 'north' pole.
#
#   mring name,num,from,to,r,g,b,alpha 	(Multiply define rings)
#
#	name		- Name of object
#	num		- Number of objects.  name 1, name 2, etc will be
#			  derived from this to get the real object name.
#	from,to		- The inner and outer radius of the ring in terms
#			  of the radius of the body.
#	r,g,b		- Colour of the ring [0.0 - 1.0]
#	alpha		- Transparency of the ring [0.0 - 1.0]
#			  *NOT YET IMPLEMENTED*
#
#   ring_texture name,file,width,height	(Texture a ring)
#
#	name		- Name of object
#	file		- Filename to use for ring texture
#	width,height	- Size of texture
#
#   ring_reuse name,other		(Reuse a previously bound ring texture)
#
#	name		- Name of object
#	other		- Object name to which the texture is associated
#			  Note that normal textures can be reused too.
#
#   ring_mreuse name,num,other		(Mutliply reuse a ring texture)
#
#	name		- Name of object
#	num		- Number of objects.  name 1, name 2, etc will be
#			  derived from this to get the real object name.
#	other		- Object name to which the texture is associated
#			  Note that normal textures can be reused too.
#
ring Earth,2.0,2.1,1.0,1.0,1.0,0.6,0.5,45;

# eg.
ring_texture Earth,ring.raw,256,256;


# Define trails.  If enabled objects leave behind a point as they travel.
# Each point lives for a time defined by it's alpha decay.
#
#   particles life,max,size;
#
#	decay		- The amount to decrease the alpha per tick.
#	min		- The minimum alpha.  Once this is reached, the particle
#			  is destoryed.
#	size		- Size of each point (currently ignored)
#
particles 0.001,0.0,1.0;


# Define sparks from collisions
#
#   sparks num,max,life,length,delta;
#
#	num		- The number of sparks per collision.
#	decay		- The amount to decrease the alpha per tick.
#	min		- The minimum alpha.  Once this is reached, the particle
#			  is destoryed.
#	length		- The length of a spark.  The actual length will be
#			  (length * delta).
#	delta		- Each spark will have a pseudo random number
#			  between -delta and +delta set for it's speed.
#
sparks 50,0.01,0.0,5,2.0;


# Define a 'fog' to increase depth perception
#
#   fog dist,r,g,b,light;
#
#	dist		- The max distance you can see into the fog
#	r,g,b		- The colour of the fog
#	light		- Whether the light source is effected by fog (yes/no)
#
fog 1000.0,0.2,0.0,0.0,no;