Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 12125 was 10624, checked in by landauf, 9 years ago

merged branch core7 back to trunk

  • Property svn:eol-style set to native
File size: 11.3 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>
[9939]36  <PongBall
37   defScoreSound = "sounds/PlayerWinScore_cut.ogg"
38   defBatSound = "sounds/Button.ogg"
39   defBoundarySound = "sounds/Button.ogg">
[5417]40    <attached>
41      <Model mesh="sphere.mesh" scale=2 />
42      <!--Billboard scale=0.2 colour="1.0, 1.0, 0.5" material="Examples/Flare" /-->
43      <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]44      <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]45      <ParticleSpawner name=hiteffect position="0,0,0" source="Orxonox/sparks2" lifetime=0.01 autostart=0 mainstate=spawn />
[5417]46    </attached>
[5929]47    <eventlisteners>
48      <EventTarget target=hiteffect />
49    </eventlisteners>
[5417]50  </PongBall>
51</Template>
52
53
54<Level
[10624]55 plugins = "pong"
[9016]56 gametype = "Pong"
[5417]57>
[7163]58  <templates>
59    <Template link=lodtemplate_default />
60  </templates>
[8706]61  <?lua include("includes/notifications.oxi") ?>
[5929]62
[9348]63  <WorldAmbientSound source="Ganymede.ogg" looping="true" playOnLoad="true"/>
[7865]64  <PongBot />
65
[5417]66  <Scene
67   ambientlight = "0.5, 0.5, 0.5"
[9348]68   skybox       = "Orxonox/skyBoxBasic"
[5417]69  >
70    <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" />
71
[8706]72    <SpawnPoint position="991.729, -110.11, 435.404" orientation="0.534038, 0.563456, 0.212168, 0.593553" />
[5417]73
[7163]74    <MovableEntity rotationrate=5 rotationaxis="0,0,1">
75      <attached>
76        <PongCenterpoint name=pongcenter dimension="200,120" balltemplate=pongball battemplate=pongbat ballspeed=200 ballaccfactor=1.0 batspeed=130 batlength=0.25>
77          <attached>
78            <Model position="0,0,60" mesh="cube.mesh" scale3D="105,1,1" />
79            <Model position="0,0,-60" mesh="cube.mesh" scale3D="105,1,1" />
[5929]80
[7163]81            <ParticleSpawner name=scoreeffect_right position="120,0, 45" 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, 15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
84            <ParticleSpawner name=scoreeffect_right position="120,0,  0" source="Orxonox/BigExplosion1part2" lifetime=0.1 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,-30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
87            <ParticleSpawner name=scoreeffect_right position="120,0,-45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
[5929]88
[7163]89            <ParticleSpawner name=scoreeffect_left position="-120,0, 45" 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, 15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
92            <ParticleSpawner name=scoreeffect_left position="-120,0,  0" source="Orxonox/BigExplosion1part2" lifetime=0.1 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,-30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
95            <ParticleSpawner name=scoreeffect_left position="-120,0,-45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
[5929]96
[9348]97<!-- TODO: Create a Pong Score Sound and include it here.
98This WorldSound works, but doesn't make sense, since it is played together with ambient/moodDependedDirectory/Ganymede.ogg -->
[9526]99            <!--WorldSound name="scoreSound" position="0,0,0" source="sounds/PongScore_cut.ogg" >
[7163]100              <events>
101                <play>
102                  <EventListener event=pongcenter />
103                </play>
104              </events>
[9348]105            </WorldSound-->
[5929]106
[7163]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 ?>
[5929]112
[7163]113          </attached>
114        </PongCenterpoint>
115      </attached>
116    </MovableEntity>
[5417]117
[7163]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>
[5437]150
[7163]151    <?lua
152      dofile("includes/CuboidSpaceStation.lua")
153    ?>
[5437]154
[7163]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) ?>">
[5437]206        <attached>
[7163]207          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
[5437]208        </attached>
209      </MovableEntity>
[7163]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>
[5437]215
[7163]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>
[5437]226
[7163]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) ?>">
[5437]228        <attached>
[7163]229          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
[5437]230        </attached>
231      </MovableEntity>
[7163]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 ?>
[5437]238
[5417]239  </Scene>
240</Level>
Note: See TracBrowser for help on using the repository browser.