Creation/Dev/Tileset

From Graal Bible

Tileset

A tileset is simply a set of tiles, standardly held in a large png. Scripters can tell the Graal Client to use a given tileset - either replacing or editing the default pics1.png - through use of the addtiledef and addtiledef2 commands.

With the addition of the addtiledef and addtiledef2 commands, new worlds on GraalOnline have used tilesets to create worlds that are different from the original GraalOnline.

Developers whether in graphics, levels, or scripting can create their own tilesets to make a unique world, depending on which world someone wishes to created.

Of course, creating custom tilesets from the default tileset of pics1.png can be quite difficult. There's a number of questions on how the tiles work and where to place the tiles. A few examples and templates have been created to help new developers create tilesets.

Tileset Scripts

GS1 Version for use with offline Graal Editor

//#CLIENTSIDE
if (created) { 
  removetiledefs; 
  addtiledef pics1.png,,0; 
}

GS2 Version for use with online servers

//#CLIENTSIDE
function onCreated() { 
  addtiledef("pics1.png", "", 0); 
}

Tile Type

The following image is a legend composed of colors to tell how each tiles work and where those tiles can be placed.

Titletype.png











Tile Templates

The following image is for the tileset TYPE 0, which is the TYPE that pics1.png uses. This is quite a complicated tileset, because the tiles are all over the place. Developers who wish to use this tileset template are advised to use the pics1.png tileset with modification to fit their needs, either editting the image or using addtiledef2.

Tiles template.png






The following image is for the tileset TYPE 1, which is a new tileset template that was created. Worlds such as Era use this template for their tilesets. This tileset is recommended for new themes worlds, which aren't similiar to the classic themed works such as N-Pulse. This tileset makes more logical sense and organized with tiles being in sections, such as blocking tiles and non blocking tiles.

Type1.png






The following tileset was generated via code. It was composed by DusyPorViva and was released onto the Graal Forums into a graphics template thread. Here they are. The graphics template for help using the tileset is also attached.

Pics1format.png
Dusty guide.png






NOTE: THE TEMPLATE'S COLORS ALL MATCH THE LEGEND PROVIDED, FOR BOTH TILE TYPES 0 AND 1.

Malinko once created an example tileset for those who wish to learn the TYPE 1 tileset. He themed it according to an edit of pics1.png he created because he wanted to give an example on how both classic and new worlds can create tilesets using TYPE 1. This tileset template can be used for whatever world wished, as long as edits are made and it looks nice. Note, this tileset was not finished, but was provided as an example.

Malinko pics1-type1.png