Unification Level design

From Wikiid
Revision as of 07:48, 26 February 2008 by SteveBaker (Talk | contribs) (New page: In order to add a level to Unification, you need to do at least three things: * Add an entry into the 'ultimate' file '''data/ultimate.xml''' to name the level. ...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In order to add a level to Unification, you need to do at least three things:

  • Add an entry into the 'ultimate' file data/ultimate.xml to name the level. Add something like this to the list of levels after the closing </main> tag:
 <level name="My level" src="data/mylevel.xml" />
The 'name' field is what will be displayed in the level select menu (which will 'go away' eventually) it should be fairly short - just a few words. The 'src' field names the XML file that describes the level.
  • Add a new XML file into the data directory that lists the parts that make up the level. In the example above, that would be data/mylevel.xml. The format of these files is described in "GameTools level files". Here is an example:
 <?xml version="1.0" ?>
 <game>
   <main>
     <flag name="TuxStart" colour="9" translation="0.0 0.0 0" euler_rotation="180 0 " />
     <flag name="Gravity0" colour="1" translation="0.0 0.0 -12.5" euler_rotation="0 0 " />
     <model euler_rotation="0 0 0" translation="0 0 0" src="models/moon.ac" />
   </main>
 </game>
At a minimum, you need to set up some position flags for Tux's start-point and to say where at least one gravity source is - and provide at least one model file to represent the level. If the level is a 'flat' level, set the gravity flag translation to "0 0 -1000000" which places the gravity source so far below the ground that it appears to produce pure 'vertical' gravitation.
  • Add your new models into the 'models' directory (models/moon.ac in the example above).
  • If those models add new materials, you should list them in the 'material' file data/materials.xml.

For now, that's all you need to do.