Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 9302 was 9092, checked in by jo, 13 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
Line 
1<LevelInfo
2 name = "Tetris"
3 description = "Tetris in space!"
4 tags = "minigame"
5 screenshot = "tetris.png"
6/>
7
8<?lua
9  include("HUDTemplates3.oxo")
10  include("stats.oxo")
11  include("tetrisHUD.oxo")
12  include("templates/lodInformation.oxt")
13?>
14
15<Template name=tetrisstonecameras defaults=0>
16  <TetrisStone>
17    <camerapositions>
18      <CameraPosition position="55,75,200" absolute=true />
19    </camerapositions>
20  </TetrisStone>
21</Template>
22
23<Template name=tetrisstone>
24  <TetrisStone camerapositiontemplate=tetrisstonecameras>
25    <attached>
26      <Model position="0,0,0" mesh="crate.mesh" scale=0.9 />
27    </attached>
28  </TetrisStone>
29</Template>
30
31
32
33<Template name=tetrisbrickcameras defaults=0>
34  <TetrisBrick>
35    <camerapositions>
36      <CameraPosition position="55,75,200" absolute=true />
37      <CameraPosition position="0,50,160" drag=true mouselook=true />
38      <CameraPosition position="0,50,0" pitch=-90 drag=true mouselook=true />
39    </camerapositions>
40  </TetrisBrick>
41</Template>
42
43<Template name=tetrisbrick>
44  <TetrisBrick camerapositiontemplate=tetrisbrickcameras>
45  </TetrisBrick>
46</Template>
47
48
49<Level
50 gametype = "Tetris"
51>
52  <templates>
53    <Template link=lodtemplate_default />
54  </templates>
55  <?lua include("includes/notifications.oxi") ?>
56
57  <Scene
58   ambientlight = "0.5, 0.5, 0.5"
59   skybox       = "Orxonox/skypanoramagen1"
60  >
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
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
70
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
77    <TetrisCenterpoint name=tetriscenter width=11 height=15 stoneSize=10 stoneTemplate=tetrisstone brickTemplate=tetrisbrick stoneSpeed=10 position="-55,-75,0">
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>
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-->
88    </TetrisCenterpoint>
89
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
101  </Scene>
102</Level>
Note: See TracBrowser for help on using the repository browser.