Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/menue/data/levels/pong.oxw @ 8927

Last change on this file since 8927 was 8927, checked in by baermatt, 13 years ago

Changed some level tags.

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