Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/archive/waypoints/data/levels/pong.oxw @ 10181

Last change on this file since 10181 was 9016, checked in by jo, 13 years ago

Merging presentation2011 branch to trunk. Please check for possible bugs.

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