Use the aswd or arrow keys to move the character.
To use the widget, first define the source for the module:
Now we define several configuration properties. The property contentBox tells the widget where to render the new map. In the property dimensions we define how big a single tile is with height and width, and then we define how many tiles there are in x and y direction. Optional you can also define how many z layers there will be.
Now comes the most important part of the map. We define a blueprint for the map and define the file to get the graphics. We use this floor tileset. We already set the tileset size to 32x32 px, so Javascript is gonna use a 32x32 grid to read the tileset. In the blueprint we tell the widget at what position the tile to display is. For example, x:3, y:2 says that the 4th tile in the 3rd row will be used (x:0, y:0 is the first tile in the top left corner). The coordinates in pixel would be 96px,64px.
The map property is an array so you can define several layers of maps with differents tileset files. In the example on this page you can see two fileset, one with the stone path from the code above and one with gras.
2001-2010 R.&L. Pranschke, Tertrack Portal.