Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/presentation/data/levels/pong.oxw @ 9359

Last change on this file since 9359 was 8642, checked in by landauf, 13 years ago

fixed warnings in some level files

  • Property svn:eol-style set to native
File size: 11.0 KB
Line 
1<LevelInfo
2 name = "Pong"
3 description = "Pong in space!"
4 tags = ""
5/>
6
7<?lua
8  include("HUDTemplates3.oxo")
9  include("stats.oxo")
10  include("pongHUD.oxo")
11  include("templates/lodInformation.oxt")
12?>
13
14<Template name=pongbatcameras defaults=0>
15  <PongBat>
16    <camerapositions>
17      <CameraPosition position="0,150,0" pitch=-90 absolute=true />
18      <CameraPosition position="0,50,160" drag=true mouselook=true />
19      <CameraPosition position="0,40,125" drag=true mouselook=true />
20      <CameraPosition position="0,30, 90" drag=true mouselook=true />
21    </camerapositions>
22  </PongBat>
23</Template>
24
25<Template name=pongbat>
26  <PongBat camerapositiontemplate=pongbatcameras>
27    <attached>
28      <Model position="0,0,3" mesh="cube.mesh" scale3D="14,2,2" />
29      <!--Model roll=180 mesh="pongbat.mesh" scale=0.045 /-->
30    </attached>
31  </PongBat>
32</Template>
33
34<Template name=pongball>
35  <PongBall>
36    <attached>
37      <Model mesh="sphere.mesh" scale=2 />
38      <!--Billboard scale=0.2 colour="1.0, 1.0, 0.5" material="Examples/Flare" /-->
39      <Backlight scale=0.2 colour="1.0, 1.0, 0.5" width=7 length=500 lifetime=0.3 elements=20 trailmaterial="Trail/backlighttrail" material="Examples/Flare" />
40      <Light type=point diffuse="1.0, 1.0, 0.5" specular="1.0, 1.0, 0.5" attenuation="1200, 1.0, 0.0035, 0.00005" />
41      <ParticleSpawner name=hiteffect position="0,0,0" source="Orxonox/sparks2" lifetime=0.01 autostart=0 mainstate=spawn />
42    </attached>
43    <eventlisteners>
44      <EventTarget target=hiteffect />
45    </eventlisteners>
46  </PongBall>
47</Template>
48
49
50<Level
51 name         = "Presentation"
52 description  = "A simple testlevel"
53 gametype     = Pong
54>
55  <templates>
56    <Template link=lodtemplate_default />
57  </templates>
58  <?lua include("includes/notifications.oxi") ?>
59
60  <WorldAmbientSound source="Ganymede.ogg" playOnLoad=true looping=true />
61
62  <PongBot />
63
64  <Scene
65   ambientlight = "0.5, 0.5, 0.5"
66   skybox       = "Orxonox/skypanoramagen1"
67  >
68    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
69
70    <SpawnPoint position="991.729, -110.11, 435.404" orientation="0.534038, 0.563456, 0.212168, 0.593553" />
71
72    <MovableEntity rotationrate=5 rotationaxis="0,0,1">
73      <attached>
74        <PongCenterpoint name=pongcenter dimension="200,120" balltemplate=pongball battemplate=pongbat ballspeed=200 ballaccfactor=1.0 batspeed=130 batlength=0.25>
75          <attached>
76            <Model position="0,0,60" mesh="cube.mesh" scale3D="105,1,1" />
77            <Model position="0,0,-60" mesh="cube.mesh" scale3D="105,1,1" />
78
79            <ParticleSpawner name=scoreeffect_right position="120,0, 45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
80            <ParticleSpawner name=scoreeffect_right position="120,0, 30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
81            <ParticleSpawner name=scoreeffect_right position="120,0, 15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
82            <ParticleSpawner name=scoreeffect_right position="120,0,  0" source="Orxonox/BigExplosion1part2" lifetime=0.1 autostart=0 />
83            <ParticleSpawner name=scoreeffect_right position="120,0,-15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
84            <ParticleSpawner name=scoreeffect_right position="120,0,-30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
85            <ParticleSpawner name=scoreeffect_right position="120,0,-45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
86
87            <ParticleSpawner name=scoreeffect_left position="-120,0, 45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
88            <ParticleSpawner name=scoreeffect_left position="-120,0, 30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
89            <ParticleSpawner name=scoreeffect_left position="-120,0, 15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
90            <ParticleSpawner name=scoreeffect_left position="-120,0,  0" source="Orxonox/BigExplosion1part2" lifetime=0.1 autostart=0 />
91            <ParticleSpawner name=scoreeffect_left position="-120,0,-15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
92            <ParticleSpawner name=scoreeffect_left position="-120,0,-30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
93            <ParticleSpawner name=scoreeffect_left position="-120,0,-45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
94
95            <WorldSound name="scoreSound" position="0,0,0" source="sounds/pong_score.wav" >
96              <events>
97                <play>
98                  <EventListener event=pongcenter />
99                </play>
100              </events>
101            </WorldSound>
102
103            <?lua
104              for i = 1, 15, 1 do
105            ?>
106              <ParticleSpawner name=scoreeffect_center position="<?lua print(math.random() * 200 - 100) ?>,0,<?lua print(math.random() * 120 - 60) ?>" source="Orxonox/sparks2" lifetime=0.02 autostart=0 startdelay=<?lua print(math.random() * 0.7) ?> />
107            <?lua end ?>
108
109          </attached>
110        </PongCenterpoint>
111      </attached>
112    </MovableEntity>
113
114    <EventDispatcher>
115      <targets>
116        <EventTarget target=scoreeffect_right />
117        <EventTarget target=scoreeffect_center />
118      </targets>
119      <events>
120        <spawn>
121          <EventFilter>
122            <names>
123              <EventName name=right />
124            </names>
125            <EventListener event=pongcenter />
126          </EventFilter>
127        </spawn>
128      </events>
129    </EventDispatcher>
130    <EventDispatcher>
131      <targets>
132        <EventTarget target=scoreeffect_left />
133        <EventTarget target=scoreeffect_center />
134      </targets>
135      <events>
136        <spawn>
137          <EventFilter>
138            <names>
139              <EventName name=left />
140            </names>
141            <EventListener event=pongcenter />
142          </EventFilter>
143        </spawn>
144      </events>
145    </EventDispatcher>
146
147    <?lua
148      dofile("includes/CuboidSpaceStation.lua")
149    ?>
150
151    <StaticEntity pitch=15>
152      <attached>
153        <MovableEntity rotationrate="-4.15786" rotationaxis="0,0,1">
154          <attached>
155            <StaticEntity position="-2500,0,0" yaw=90 pitch=90>
156              <attached>
157                <?lua
158                  createSpaceStationPar(0,2,1,2,1,4,1,50)
159                ?>
160              </attached>
161            </StaticEntity>
162          </attached>
163        </MovableEntity>
164      </attached>
165    </StaticEntity>
166
167    <StaticEntity position="0,1200,-200" yaw=50 pitch=60 roll=45>
168      <attached>
169        <Model scale=10 mesh="Carrier.mesh" />
170        <Model position="0,30,20" scale=10 mesh="pirate.mesh" roll="180" />
171        <Model position="-80,-30,20" scale=10 mesh="pirate.mesh" roll="180" />
172      </attached>
173    </StaticEntity>
174
175    <StaticEntity pitch=70>
176      <attached>
177        <MovableEntity rotationaxis="0,0,1" rotationrate=8.5974>
178          <attached>
179            <StaticEntity yaw=-90 pitch=0 roll=90 position="800,0,0">
180              <attached>
181                <Model position="0,0,0" scale=10 mesh="satellite.mesh" />
182                <MovableEntity position="-4,0,20" velocity="0,0,0" rotationaxis="0,0,1" rotationrate=50>
183                  <attached>
184                    <Model position="0,0,0" scale=10 mesh="satellitedish.mesh"/>
185                  </attached>
186                </MovableEntity>
187                <ParticleEmitter pitch=-135 roll=30 position="-14, 3.5,-2.5" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
188                <ParticleEmitter pitch=135 roll=30 position="-14, 3.5,-9" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
189                <ParticleEmitter pitch=-45 roll=30 position="-14,-3.5,-2.5" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
190                <ParticleEmitter pitch=45 roll=30 position="-14,-3.5,-9" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
191              </attached>
192            </StaticEntity>
193          </attached>
194        </MovableEntity>
195      </attached>
196    </StaticEntity>
197
198    <?lua
199      for i = 1, 10, 1 do
200    ?>
201      <MovableEntity position="<?lua print(math.random() * 600 - 300)?>, <?lua print(math.random() * 600 - 300) ?>, <?lua print(math.random() * 100 + 300) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
202        <attached>
203          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
204        </attached>
205      </MovableEntity>
206      <MovableEntity position="<?lua print(math.random() * 600 - 300)?>, <?lua print(math.random() * 600 - 300) ?>, <?lua print(math.random() * -100 - 300) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
207        <attached>
208          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
209        </attached>
210      </MovableEntity>
211
212      <MovableEntity position="<?lua print(math.random() * 600 - 300)?>, <?lua print(math.random() * 100 + 300) ?>, <?lua print(math.random() * 600 - 300) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
213        <attached>
214          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
215        </attached>
216      </MovableEntity>
217      <MovableEntity position="<?lua print(math.random() * 600 - 300)?>, <?lua print(math.random() * -100 - 300) ?>, <?lua print(math.random() * 600 - 300) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
218        <attached>
219          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
220        </attached>
221      </MovableEntity>
222
223      <MovableEntity position="<?lua print(math.random() * 100 + 300)?>, <?lua print(math.random() * 600 - 300) ?>, <?lua print(math.random() * 600 - 300) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
224        <attached>
225          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
226        </attached>
227      </MovableEntity>
228      <MovableEntity position="<?lua print(math.random() * -100 - 300)?>, <?lua print(math.random() * 600 - 300) ?>, <?lua print(math.random() * 600 - 300) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
229        <attached>
230          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
231        </attached>
232      </MovableEntity>
233    <?lua end ?>
234
235  </Scene>
236</Level>
Note: See TracBrowser for help on using the repository browser.