Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/newlevel2012/data/levels/towerDefense.oxw @ 9138

Last change on this file since 9138 was 9138, checked in by mentzerf, 12 years ago

Fixed the oxw file (some more):

  • the playfield now lies in the x,y layer, the camera is at z = 20, as it should be
  • the towers are now longer to be able to see if they fit the playfield marks (they do!)
  • moved the playfield, so that towers x,y can easily be mapped to the playfield coordinates. e.g. adding a tower at 0,4 results in -8,-4, the corners of the playfield are at 8,8 / -8,-8 / -8,8 / 8,-8
  • the centerpoint is marked with a cylinder
File size: 3.6 KB
Line 
1<!-- TODO: Update the level's image-->
2<LevelInfo
3 name = "Tower Defense"
4 description = "Defend your Spacestation from incoming waves."
5 tags = "gametype"
6 screenshot = "emptylevel.png"
7/>
8
9<?lua
10  include("stats.oxo")
11  include("HUDTemplates3.oxo")
12  include("templates/lodInformation.oxt")
13?>
14
15<?lua
16  include("templates/spaceshipAssff.oxt")
17  include("templates/spaceshipPirate.oxt")
18?>
19
20<!--  Hallo erstmal.
21Ich habe das Grundgerüst des Levels mal zum Laufen gebracht.
22Bei mir hat es das Playfield_ME.mesh allerdings nicht angezeigt; deswegen habe ich mit dem crate.mesh als testobjekt gearbeitet.
23Das Level macht genau das was ihr vermutlich erreichen wolltet. Wahrscheinlich wird die Funktionalität der "statischen Kamera" aber
24bloß in einer abgewandelten Art umgesetzt: In Pong und Tetris sind die Kameras nicht an das Spielfeld, sondern an ein ControllableEntity,
25das vom Spieler gesteuert wird gekoppelt.
26-->
27
28<!-- Specify the position of the camera -->
29<Template name=playfieldcameras defaults=0>
30  <Pawn>
31    <camerapositions>
32      <CameraPosition position="0,0,20"/>
33    </camerapositions>
34  </Pawn>
35</Template>
36
37<!-- Loads the playfield mesh -->
38<Template name=playfield>
39  <Pawn camerapositiontemplate=playfieldcameras>
40    <attached>
41      <Model position="0,0,0" mesh="cylinder.mesh" scale3D="1,1,1" /> <!-- the camera is attached to this -->
42    </attached>
43  </Pawn>
44</Template>
45
46
47<!-- Template for a tower -->
48<Template name=towertemplate>
49  <Tower>
50    <attached>
51      <Model position="0,0,0" scale3D="0.5,0.5,2" mesh="cube_green.mesh" />
52    </attached>
53  </Tower>
54</Template>
55
56<Level gametype = "TowerDefense">
57  <templates>
58    <Template link=lodtemplate_default />
59  </templates>
60  <?lua include("includes/notifications.oxi") ?>
61
62
63  <Scene
64    ambientlight = "0.8, 0.8, 0.8"
65    skybox       = "Orxonox/Starbox"
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        <!-- Spawns the camera, attached to a crate -->
72        <SpawnPoint team=0 position="0,0,0" spawnclass=Pawn pawndesign=playfield />
73
74       
75        <!--SpawnPoint team=1 position="0,0,10" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff  /-->
76        <!--SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /-->
77       
78       
79         <!--SpaceShip position="-10,0,20" lookat="0,0,0">
80      <templates>
81        <Template link=spaceshipassff />
82      </templates>
83      <controller>
84        <WaypointController accuracy=3>
85          <waypoints>
86            <Model mesh="cube.mesh" scale=1 position="110,90,20" />
87            <Model mesh="cube.mesh" scale=2 position="290,90,20" />
88            <Model mesh="cube.mesh" scale=3 position="290,-90,20" />
89            <Model mesh="cube.mesh" scale=4 position="110,-90,20" />
90          </waypoints>
91        </WaypointController>
92      </controller>
93    </SpaceShip-->
94   
95
96        <!-- PlayField -->
97        <TowerDefenseCenterpoint
98        name=towerdefensecenter
99        width=16
100        height=16
101        towerTemplate=towertemplate
102        position="0,0,0"
103        direction="0,0,0"
104        collistionType=static
105        mass=100000>
106                 
107                 <attached>
108               
109                        <Model position="-0.5,-0.5,0" mesh="Playfield_ME.mesh" scale=0.8 />
110                       
111                        <!--Model position="-8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
112                        <!--Model position="-8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
113                        <!--Model position="8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
114                        <!--Model position="8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
115                       
116                        <!--Model position="0,0,50" direction="0,0,0"  mesh="rocket.mesh"  scale3D="0.3,0.3,0.3" /-->
117                       
118        </attached>
119    </TowerDefenseCenterpoint>
120
121  </Scene>
122</Level>
123
Note: See TracBrowser for help on using the repository browser.