Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/tutoriallevel3/data/levels/pong.oxw @ 8738

Last change on this file since 8738 was 8636, checked in by dafrick, 14 years ago

Making NotificationQueue XML-loadable. Adding notifications to all levels.

  • Property svn:eol-style set to native
File size: 11.1 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,200,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="mainmenu.ogg" playOnLoad=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    <?lua
71      for i = 1, 10, 1 do
72    ?>
73      <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" />
74    <?lua end ?>
75
76    <MovableEntity rotationrate=5 rotationaxis="0,0,1">
77      <attached>
78        <PongCenterpoint name=pongcenter dimension="200,120" balltemplate=pongball battemplate=pongbat ballspeed=200 ballaccfactor=1.0 batspeed=130 batlength=0.25>
79          <attached>
80            <Model position="0,0,60" mesh="cube.mesh" scale3D="105,1,1" />
81            <Model position="0,0,-60" mesh="cube.mesh" scale3D="105,1,1" />
82
83            <ParticleSpawner name=scoreeffect_right position="120,0, 45" 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, 15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
86            <ParticleSpawner name=scoreeffect_right position="120,0,  0" source="Orxonox/BigExplosion1part2" lifetime=0.1 autostart=0 />
87            <ParticleSpawner name=scoreeffect_right position="120,0,-15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
88            <ParticleSpawner name=scoreeffect_right position="120,0,-30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
89            <ParticleSpawner name=scoreeffect_right position="120,0,-45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
90
91            <ParticleSpawner name=scoreeffect_left position="-120,0, 45" 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, 15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
94            <ParticleSpawner name=scoreeffect_left position="-120,0,  0" source="Orxonox/BigExplosion1part2" lifetime=0.1 autostart=0 />
95            <ParticleSpawner name=scoreeffect_left position="-120,0,-15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
96            <ParticleSpawner name=scoreeffect_left position="-120,0,-30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
97            <ParticleSpawner name=scoreeffect_left position="-120,0,-45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
98
99            <WorldSound name="scoreSound" position="0,0,0" source="sounds/pong_score.wav" >
100              <events>
101                <play>
102                  <EventListener event=pongcenter />
103                </play>
104              </events>
105            </WorldSound>
106
107            <?lua
108              for i = 1, 15, 1 do
109            ?>
110              <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) ?> />
111            <?lua end ?>
112
113          </attached>
114        </PongCenterpoint>
115      </attached>
116    </MovableEntity>
117
118    <EventDispatcher>
119      <targets>
120        <EventTarget target=scoreeffect_right />
121        <EventTarget target=scoreeffect_center />
122      </targets>
123      <events>
124        <spawn>
125          <EventFilter>
126            <names>
127              <EventName name=right />
128            </names>
129            <EventListener event=pongcenter />
130          </EventFilter>
131        </spawn>
132      </events>
133    </EventDispatcher>
134    <EventDispatcher>
135      <targets>
136        <EventTarget target=scoreeffect_left />
137        <EventTarget target=scoreeffect_center />
138      </targets>
139      <events>
140        <spawn>
141          <EventFilter>
142            <names>
143              <EventName name=left />
144            </names>
145            <EventListener event=pongcenter />
146          </EventFilter>
147        </spawn>
148      </events>
149    </EventDispatcher>
150
151    <?lua
152      dofile("includes/CuboidSpaceStation.lua")
153    ?>
154
155    <StaticEntity pitch=15>
156      <attached>
157        <MovableEntity rotationrate="-4.15786" rotationaxis="0,0,1">
158          <attached>
159            <StaticEntity position="-2500,0,0" yaw=90 pitch=90>
160              <attached>
161                <?lua
162                  createSpaceStationPar(0,2,1,2,1,4,1,50)
163                ?>
164              </attached>
165            </StaticEntity>
166          </attached>
167        </MovableEntity>
168      </attached>
169    </StaticEntity>
170
171    <StaticEntity position="0,1200,-200" yaw=50 pitch=60 roll=45>
172      <attached>
173        <Model scale=10 mesh="Carrier.mesh" />
174        <Model position="0,30,20" scale=10 mesh="pirate.mesh" roll="180" />
175        <Model position="-80,-30,20" scale=10 mesh="pirate.mesh" roll="180" />
176      </attached>
177    </StaticEntity>
178
179    <StaticEntity pitch=70>
180      <attached>
181        <MovableEntity rotationaxis="0,0,1" rotationrate=8.5974>
182          <attached>
183            <StaticEntity yaw=-90 pitch=0 roll=90 position="800,0,0">
184              <attached>
185                <Model position="0,0,0" scale=10 mesh="satellite.mesh" />
186                <MovableEntity position="-4,0,20" velocity="0,0,0" rotationaxis="0,0,1" rotationrate=50>
187                  <attached>
188                    <Model position="0,0,0" scale=10 mesh="satellitedish.mesh"/>
189                  </attached>
190                </MovableEntity>
191                <ParticleEmitter pitch=-135 roll=30 position="-14, 3.5,-2.5" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
192                <ParticleEmitter pitch=135 roll=30 position="-14, 3.5,-9" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
193                <ParticleEmitter pitch=-45 roll=30 position="-14,-3.5,-2.5" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
194                <ParticleEmitter pitch=45 roll=30 position="-14,-3.5,-9" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
195              </attached>
196            </StaticEntity>
197          </attached>
198        </MovableEntity>
199      </attached>
200    </StaticEntity>
201
202    <?lua
203      for i = 1, 10, 1 do
204    ?>
205      <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) ?>">
206        <attached>
207          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
208        </attached>
209      </MovableEntity>
210      <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) ?>">
211        <attached>
212          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
213        </attached>
214      </MovableEntity>
215
216      <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) ?>">
217        <attached>
218          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
219        </attached>
220      </MovableEntity>
221      <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) ?>">
222        <attached>
223          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
224        </attached>
225      </MovableEntity>
226
227      <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) ?>">
228        <attached>
229          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
230        </attached>
231      </MovableEntity>
232      <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) ?>">
233        <attached>
234          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
235        </attached>
236      </MovableEntity>
237    <?lua end ?>
238
239  </Scene>
240</Level>
Note: See TracBrowser for help on using the repository browser.