Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/pCuts/data/levels/tetris.oxw @ 9092

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

Tetris on the way to get completed. I fixed some bugs concerning rotation, false brick placement on brick-brick collisions, clearing multiple rows and added a preview brick feature and a basic hud.

  • Property svn:eol-style set to native
File size: 3.0 KB
RevLine 
[8246]1<LevelInfo
2 name = "Tetris"
3 description = "Tetris in space!"
[9016]4 tags = "minigame"
5 screenshot = "tetris.png"
[8246]6/>
7
8<?lua
9  include("HUDTemplates3.oxo")
10  include("stats.oxo")
[9092]11  include("tetrisHUD.oxo")
[8246]12  include("templates/lodInformation.oxt")
13?>
14
[9083]15<Template name=tetrisstonecameras defaults=0>
16  <TetrisStone>
[8246]17    <camerapositions>
18      <CameraPosition position="55,75,200" absolute=true />
19    </camerapositions>
[9083]20  </TetrisStone>
[8246]21</Template>
22
23<Template name=tetrisstone>
[9083]24  <TetrisStone camerapositiontemplate=tetrisstonecameras>
[8246]25    <attached>
[9092]26      <Model position="0,0,0" mesh="crate.mesh" scale=0.9 />
[8246]27    </attached>
28  </TetrisStone>
29</Template>
30
[9083]31
32
33<Template name=tetrisbrickcameras defaults=0>
34  <TetrisBrick>
35    <camerapositions>
36      <CameraPosition position="55,75,200" absolute=true />
[9089]37      <CameraPosition position="0,50,160" drag=true mouselook=true />
38      <CameraPosition position="0,50,0" pitch=-90 drag=true mouselook=true />
[9083]39    </camerapositions>
40  </TetrisBrick>
41</Template>
42
[9082]43<Template name=tetrisbrick>
44  <TetrisBrick camerapositiontemplate=tetrisbrickcameras>
45  </TetrisBrick>
46</Template>
47
48
[8246]49<Level
[9016]50 gametype = "Tetris"
[8246]51>
52  <templates>
53    <Template link=lodtemplate_default />
54  </templates>
[8637]55  <?lua include("includes/notifications.oxi") ?>
[8246]56
57  <Scene
58   ambientlight = "0.5, 0.5, 0.5"
59   skybox       = "Orxonox/skypanoramagen1"
60  >
[9092]61<!--luke_grey_-_hypermode.ogg allgorythm-lift_up.ogg Fight1.ogg -->
62    <WorldAmbientSound
63      source="Ganymede.ogg"
64      looping="true"
65      playOnLoad="true"
66    />
67
[8246]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
[9092]70
[8246]71    <?lua
72      for i = 1, 10, 1 do
73    ?>
74      <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" />
75    <?lua end ?>
76
[9082]77    <TetrisCenterpoint name=tetriscenter width=11 height=15 stoneSize=10 stoneTemplate=tetrisstone brickTemplate=tetrisbrick stoneSpeed=10 position="-55,-75,0">
[8246]78        <attached>
79            <Model position="55,-1,0" mesh="cube.mesh" scale3D="57,1,11" />
80            <Model position="-1,76,0" mesh="cube.mesh" scale3D="1,76,1" />
81            <Model position="111,76,0" mesh="cube.mesh" scale3D="1,76,1" />
82        </attached>
[9084]83        <!--collisionShapes>
84            <BoxCollisionShape position="55,-1,0"  halfExtents="57,1,11" />
85            <BoxCollisionShape position="-1,76,0"  halfExtents="1,76,1" />
86            <BoxCollisionShape position="111,76,0" halfExtents="1,76,1" />
87        </collisionShapes-->
[8246]88    </TetrisCenterpoint>
89
[9092]90<!-- ------------ insert eye candy here  ---------------- -->
91
92<!-- asteroidBelt(centerX, centerY, centerZ, yaw, pitch, segments, minSize, maxSize, radius0, radius1, count, fog) -->
93<!-- DONT DARE TO TURN THE FOG ON, whithout finding a better belt position -->
94    <?lua
95        dofile("includes/asteroidField.lua")
96        asteroidBelt(10000, 0, 0, -40, -90, 70, 100, 200, 24000, 20000, 500, 0)
97
98    ?>
99
100
[8246]101  </Scene>
102</Level>
Note: See TracBrowser for help on using the repository browser.