Dangerous Dave/Modding Tips
Graphics
VGA player sprites
The player sprite is full colour with a transparency mask. To avoid having to edit the sprite and the mask as separate images, Camoto Online combines them into one image with transparency. For the CGA and EGA sprites this is no problem as adding an extra colour for transparent pixels means the 4-colour CGA sprite will have 5 colours, and the 16-colour EGA sprite will have 17 colours. However this is a problem for the VGA sprite, as it already has the maximum possible 256 colours and cannot have any more added. To work around this, Camoto assigns colour 230 for transparency as it is not used in any of the original images. This means that if you change the game palette, remember not to use colour 230 in the VGA player sprite.
Only the VGA player sprite is affected by this issue as it is the only sprite in the game with a transparency mask. All other VGA graphics can use colour 230 as normal.
'Data is too big' when saving
The 'data is too big' error refers to the available space inside the .exe file. The tiles are compressed and there is only a limited amount of space available. If the images are too complex, they won't compress into the available space. If you receive this error, adding more horizontal runs of the same colour pixels will compress better and reduce the file size.
Note that the image you last modified does not have to be the one you remove detail from. All images in the same block share the same storage space, so you can remove detail from another image in the same block, e.g. one that you are not using. There are five blocks in the game:
- CGA tiles/monsters/status bar elements
- VGA tiles/monsters/status bar elements
- CGA menu graphics (press F2 in the game to access the menu)
- EGA menu graphics
- VGA menu graphics
Note that the EGA graphics are in a separate file so they have no size restriction.
The title screen animation has a lot of vertical stripes which do not compress well, so if you are looking to make more space available in the CGA or VGA tiles block, simplifying that animation to have more continuous horizontal runs of the same colour should free up plenty of space.
Monsters are funny colours
The game draws the monster and bullet images with an XOR operation, so they are combined with the background colour. This is why they briefly change colour if they move over a non-black tile. If the first tile in the map tileset (the completely black one) isn't completely made up of only palette entry 0, it will interfere with the XOR operation and will make the monsters and bullets change colour.
Note that it doesn't matter what colour palette entry 0 is (you can freely change it), it is only important that palette entry 0 itself is used for all pixels in this tile.
Duplicate CGA/EGA sprites
Because of the way the CGA and EGA hardware store graphics (each byte of memory contains more than one pixel), Dangerous Dave needs two (CGA) and four (EGA) copies of each frame of each sprite. Each copy is offset horizontally by a couple of pixels. This is a clever trick to make drawing smooth animations fast even on slow computers. If you change the CGA or EGA graphics, be sure to keep the horizontal offsets the same, otherwise the animations will appear jerky or uneven. Since 256-colour VGA graphics have each pixel take up a whole byte, it does not require extra offset frames.
Testing
Level warp
Using the trainer on the Dangerous Dave/Cheats page will let you skip levels by pressing F10 to quickly access a level under development. Unfortunately this only provides access to normal levels though, not warp zones.