Navigation
Community
Configuring
Creating
FAQ - General
Info for Sauerbraten Users
Introduction
Known Issues
Main Page
Notes
Playing
Troubleshooting
 

Textures

Textures can be defined, for maps and for models, using the Cube 2 commands as documented there, but 'translated' into JavaScript. For example, texture n sometex.png would be Map.texture("n", "sometext.png");, and md5skin somemesh sometexture.png would be Map.md5Skin("somemesh", "sometexture.png");. See the existing assets for examples.

Using textures in your maps

There are 2 things you need to do to use textures:
  • First you need to add the texture packs as dependencies to the asset. This is done on the website. Without this, the texture packs won't be downloaded for people that don't have them yet. (But it will work for people that already have them, even if you don't do this, so be careful.)
  • Then you need to define the textures in the map script. The commands generally look like this:

        Library.include('textures/gk/concrete3/');

    You can copy them from an existing map. Or cloning that map (or using the map creation wizard) will get both the dependencies and the map script stuff.

Clarifications to the Cube 2 documentation

Additional Syntensity Functionality


Updated on Oct 26, 2009 by Alon Zakai (Version 9)