| |

NAVIGATION
|
|
|
A Guide to Zot's Major Functions
|
Under the Commands section, you'll notice some long entries generally called "blocks". Image-lists, sprite definitions, tile blocks, and tilemaps are all what I like to call the major functions of Zot. The building blocks (no pun intended) of Zot are these, well, blocks.
Note, because sprite blocks are covered comprehensively in the Animation section, they aren't listed here! |
|
|
|
An image-list is a block in the preconfig (or first thing in the config) that archives all of the artwork you'll later use. It's like an art gallery for the engine to refer to later when you tell it to use art for animations and tiles.
Here's your basic image-list block:
image-list wall wall.pcx floor floor.pcx tree tree.tga image-list end
In essence, all this is, is the name you'll use to refer to the art as (so you won't be typing artwork.pcx all the time) and the actual filename it looks for in your gamelet folder. Simple, eh? |
|
|
|
Tile blocks take an artwork reference from the image-list and combine it with a tile's unique name and text character for use in a tile map. Again, this isn't a difficult concept. Observe:
tile / name wall image wall option impassable tile end
tile @ name starttile image floor option starthere tile end
That's all. Just the text character, name, image, and if you want an option or two. Remember to always make a player start point, which is "option starthere". |
|
|
|
Font blocks are basically made the same way as a sprite block, but is used by Zot later to display a custom character map. There are some font-specific commands here too, so check out this syntax example:
| font |
myfont |
Starts the block and names your font |
| offset_x |
1 |
Start of the image (from top-left) |
| offset_y |
1 |
Start of the image, y axis for rows |
| char_offset_x |
10 |
Width of a character image in pixels |
| kern_offset_x |
8 |
Spacing in pixels between characters on the screen |
| kern_offset_y |
8 |
Spacing in pixels between lines on the screen |
| image |
myfont |
Name of the image-list entry for the artwork |
| charmap |
"ABCD123!@#..." |
Character map, list the text characters in the order they appear on the artwork file. |
| font |
end |
| |
|
|
|
A tile map is just that: a map made of tiles. This is where tile blocks are used, and basically all you're doing is typing out a layout in text for the engine to render with the tile images you specify. However it is a bit more complicated than the first two blocks.
tilemap level1 width 10 height 5 row ////////// row /......../ row /......../ row /......../ row ////////// tilemap end
Here, you have a map that is 10 tiles wide and 5 tiles tall, consisting of the wall tile I used as an example earlier and a floor tile, the periods. Be careful when making tilemaps because width and height must match in both the script lines and your map, and the game won't even start up if they do not! Another warning, if you don't have a player start tile (normally @) it also will not run. |
|
|
|
Right now sound support in Zot is sparse and mainly for sound effect use. There is no support for background music (ie MIDI) nor is there support for compressed formats. The only supported format is *.WAV, and sound playback does not work on the Windows runtime, though it works just fine on the Zodiac.
Sound playback is simple, trigger-based, and not at all hard to accomplish.
All you need to do for a sound is include two parts: an audio-list and a trigger to play the sound. You may have already noticed there is an image-list block type, there is also an audio-list type, and it works the exact same way!
audio-list fire1 fire1.wav explode boom.wav ouch ugh.wav death die.wav audio-list end
Then a trigger to activate the sound!
trigger * when-dies enemy1 action play-sound death trigger end
You can of course combine actions into this, such as adding to a score, playing the sound, and ending the level when all enemies of a type are dead, for example. |
|
|
|
Though this is seemingly a simple "option" argument, it's far from it. Autotile is a function in itself, and though I do provide an explaination of it in the Commands section, I'll detail it here and give some tilemap examples for you.
Autotile is probably the most useful function Skeezix included in Zot's tilemap process. It takes a large artwork file (anything bigger than 16x16 pixels is large enough to autotile) and chops it up into 16x16 pixel tiles to use in the tilemap. This way, you don't need to do it yourself and have hundreds of little 16 square pixel images laying around!
Here's how it works:
First, define a tile block for your tile,
tile h name road image road #using road.pcx, 160 wide by 80 tall option autotile tile end
Now, make a tilemap, but use < and ^.
tilemap level1 width 10 height 5 row h<<<<<<<<< row ^^^^^^^^^^ row ^^^^^^^^^^ row ^^^^^^^^^^ row ^^^^^^^^^^ tilemap end
Using this method, your 50-tile map is now one image that Zot tiles up FOR you! Note that only < and ^ are valid, < tiles right, and ^ tiles down.
Other examples: h<<<h<<< would repeat a 16x64 pixel image twice. |
|
Zot is © Jeff Mitchell
Create a
free website at Webs.com
|  |
|