Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/data/levels/pong.oxw @ 9767

Last change on this file since 9767 was 9526, checked in by jo, 12 years ago

Merging presentationHS12 back to the trunk.

  • Property svn:eol-style set to native
File size: 11.2 KB
RevLine 
[7865]1<LevelInfo
2 name = "Pong"
3 description = "Pong in space!"
[9016]4 tags = "minigame"
5 screenshot = "pong.png"
[7865]6/>
7
[5417]8<?lua
[7679]9  include("HUDTemplates3.oxo")
[5654]10  include("stats.oxo")
[7679]11  include("pongHUD.oxo")
12  include("templates/lodInformation.oxt")
[5417]13?>
14
15<Template name=pongbatcameras defaults=0>
16  <PongBat>
17    <camerapositions>
[8706]18      <CameraPosition position="0,150,0" pitch=-90 absolute=true />
[5417]19      <CameraPosition position="0,50,160" drag=true mouselook=true />
[5418]20      <CameraPosition position="0,40,125" drag=true mouselook=true />
21      <CameraPosition position="0,30, 90" drag=true mouselook=true />
[5417]22    </camerapositions>
23  </PongBat>
24</Template>
25
26<Template name=pongbat>
27  <PongBat camerapositiontemplate=pongbatcameras>
28    <attached>
[5426]29      <Model position="0,0,3" mesh="cube.mesh" scale3D="14,2,2" />
[5437]30      <!--Model roll=180 mesh="pongbat.mesh" scale=0.045 /-->
[5417]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" />
[5426]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" />
[5929]42      <ParticleSpawner name=hiteffect position="0,0,0" source="Orxonox/sparks2" lifetime=0.01 autostart=0 mainstate=spawn />
[5417]43    </attached>
[5929]44    <eventlisteners>
45      <EventTarget target=hiteffect />
46    </eventlisteners>
[5417]47  </PongBall>
48</Template>
49
50
51<Level
[9016]52 gametype = "Pong"
[5417]53>
[7163]54  <templates>
55    <Template link=lodtemplate_default />
56  </templates>
[8706]57  <?lua include("includes/notifications.oxi") ?>
[5929]58
[9348]59  <WorldAmbientSound source="Ganymede.ogg" looping="true" playOnLoad="true"/>
[7865]60  <PongBot />
61
[5417]62  <Scene
63   ambientlight = "0.5, 0.5, 0.5"
[9348]64   skybox       = "Orxonox/skyBoxBasic"
[5417]65  >
66    <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" />
67
[8706]68    <SpawnPoint position="991.729, -110.11, 435.404" orientation="0.534038, 0.563456, 0.212168, 0.593553" />
[5417]69
[7163]70    <MovableEntity rotationrate=5 rotationaxis="0,0,1">
71      <attached>
72        <PongCenterpoint name=pongcenter dimension="200,120" balltemplate=pongball battemplate=pongbat ballspeed=200 ballaccfactor=1.0 batspeed=130 batlength=0.25>
73          <attached>
74            <Model position="0,0,60" mesh="cube.mesh" scale3D="105,1,1" />
75            <Model position="0,0,-60" mesh="cube.mesh" scale3D="105,1,1" />
[5929]76
[7163]77            <ParticleSpawner name=scoreeffect_right position="120,0, 45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
78            <ParticleSpawner name=scoreeffect_right position="120,0, 30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
79            <ParticleSpawner name=scoreeffect_right position="120,0, 15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
80            <ParticleSpawner name=scoreeffect_right position="120,0,  0" source="Orxonox/BigExplosion1part2" lifetime=0.1 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,-30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
83            <ParticleSpawner name=scoreeffect_right position="120,0,-45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
[5929]84
[7163]85            <ParticleSpawner name=scoreeffect_left position="-120,0, 45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
86            <ParticleSpawner name=scoreeffect_left position="-120,0, 30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
87            <ParticleSpawner name=scoreeffect_left position="-120,0, 15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
88            <ParticleSpawner name=scoreeffect_left position="-120,0,  0" source="Orxonox/BigExplosion1part2" lifetime=0.1 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,-30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
91            <ParticleSpawner name=scoreeffect_left position="-120,0,-45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
[5929]92
[9348]93<!-- TODO: Create a Pong Score Sound and include it here.
94This WorldSound works, but doesn't make sense, since it is played together with ambient/moodDependedDirectory/Ganymede.ogg -->
[9526]95            <!--WorldSound name="scoreSound" position="0,0,0" source="sounds/PongScore_cut.ogg" >
[7163]96              <events>
97                <play>
98                  <EventListener event=pongcenter />
99                </play>
100              </events>
[9348]101            </WorldSound-->
[5929]102
[7163]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 ?>
[5929]108
[7163]109          </attached>
110        </PongCenterpoint>
111      </attached>
112    </MovableEntity>
[5417]113
[7163]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>
[5437]146
[7163]147    <?lua
148      dofile("includes/CuboidSpaceStation.lua")
149    ?>
[5437]150
[7163]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) ?>">
[5437]202        <attached>
[7163]203          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
[5437]204        </attached>
205      </MovableEntity>
[7163]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>
[5437]211
[7163]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>
[5437]222
[7163]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) ?>">
[5437]224        <attached>
[7163]225          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
[5437]226        </attached>
227      </MovableEntity>
[7163]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 ?>
[5437]234
[5417]235  </Scene>
236</Level>
Note: See TracBrowser for help on using the repository browser.