Scrolling Game Development Kit UI Help |
This dialog allows you to define how map tiles animate. Because the map is completely redrawn for every frame anyway, you should be able to animate every visible tile without visibly reducing the speed at which GameDev plays or edits a map.
The process of defining a new tile animation generally follows these steps:
You can also drag and re-arrange the tiles within the Animation Frames box. If you do not hold the shift key while dragging within the Animation Frames box, the tile will be copied to the new location (indicated by the "+" on the drag pointer). Hold shift to move a tile to a new location in the animation sequence. To remove a frame from the animation frames sequence, drag it back into the tileset tiles box. Multiple tiles can be dragged at once by first selecting them while holding the Ctrl key. If you hold shift when clicking the tiles, you can select ranges of tiles with few clicks. Tile images can also be dragged into external applications, but only one at a time.
The "Preview" box displays a rough estimate of how the tile will look when it shows up on the map. The actual speed of the animation is hard to estimate, but the preview should get the relative delays of the frames correct. If you have troubles making the preview animate, check that the Sprites and Paths dialog is not up. The sprites and paths dialog also has an animated preview, and because of the way the previews are handled, only one preview can animate at a time.
To edit an existing animation, bring this dialog up, select the map and layer in which it is defined, and then select the name of the tile animation. The appropriate tiles will automatically be loaded and the animated preview will be started. You can then manipulate the delays and/or the tiles in the "Animation Frames" list immediately, or specify a new base tile.
Tile animation is accomplished by remapping one tile value to another. The BMDXCtls graphics engine on which GameDev is based keeps a list of 255 mappings (one for each tile value). This mapping indicates when another tile should be drawn instead of the tile index associated with the byte at a particular position in the map. For every tile it draws on the map, it looks in this mapping array at the appropriate position. Instead of directly drawing the tile associated with the byte index, it uses the mapping to get a tile index for the byte value. All GameDev has to do then is manipulate this mapping array, cycling the mappings according to the animation definition; it does not have to iterate through each tile and change its appearance. This results in an insignificant amount of work to animate a single tile or a whole screen full of tiles based on a single animation definition.
All tile animation information (except, of course, the tile graphics themselves) is stored in the GDP project file.