GameTools material.xml
The file 'material.xml' (in the 'data' directory) lists the names of texture maps - which when they appear in the game are treated somehow specially. Ideally, this kind of information would come from whatever 3D modeller program you use - but in reality there is somewhat patchy support for the kinds of additional data the game needs.
For example - the game needs to know that water polygons are special because some objects such as boats can float on water and others cannot. There is no clear way to know what's water and what isn't from the data we get from the modeller so we look up the name of the texture map in this 'material.xml' file and see if it's marked as being special.
Texture maps that are not listed here are treated as plain, ordinary surfaces with no special properties - so you only have to list the special stuff.
Example
Here is an example of a 'material.xml' file:
<?xml version="1.0" ?> <matlist> <material name="leaves" collide="false" /> <material name="ocean" collide="false" texture_velocity="0 0.24 0" water_surface="true" /> </matlist>
Structure
Since this is an XML 'material' file, the first three lines must always be:
<?xml version="1.0" ?> <matlist>
...and the last line is always:
</matlist>
Between those tags are a number of material setup commands:
<material name="XXX" ... />
XXX is the name of the texture map - without its path-name and without a file extension. Any polygons with a texture that matches that name will take on whatever properties are listed in this record:
- collide="boolean"
- Can this object pose an obstacle to things moving through it. Leaves, smoke, water do not and should be set to "false" - the default is "true".
- texture_velocity="u v w"
- If this attribute is set, the texture will move across the surface at the specified rate in meters per second in the U, V and W directions (W should currently always be zero because we only have 2D textures.
- water_surface="boolean"
- Set "true" if these polygons represent a water surface. Since these will generally have collide="false" set, objects will only collide with them if the object is floating.
Wikiid Pages relating to gameTools (edit) |
gameTools - Main page |
gameTools - Support Tools : |
gameTools - File Formats : |
gameTools - Source Code :
|
Wikiid Pages relating to Lemur of Lima (edit) |
Lemur of Lima - Main page |
Lemur of Lima - Controls |
Lemur of Lima - Levels : |
Lemur of Lima - Java Plugins : |
Lemur of Lima - Source Code Documentation : |