Hi, as proposed
here it's now possible to change the color of the background. The background basically persists out of a tile frame that's drawn over and over again. Unfortunately it's a bit less simple, as there are some special cases due to elevated coast lines. As a result you have to provide 3 frames to override the background:
- image.png (1.62 KiB) Viewed 6140 times
Frames b and c are used to draw the background above water at the edges. This is crucial as ocean is drawn everywhere and has to be overdrawn at the correct positions.
Starting with game version 1.11.08 you should also provide a fourth frame that will be used for more optimized drawing:
- image.png (1.15 KiB) Viewed 6140 times
It should represent a 4x4 tile grid of frame a.
The original frames look like:
- frames_orig.png (369 Bytes) Viewed 6140 times
This sample replaces the background with a black one:
- frames.png (361 Bytes) Viewed 6140 times
- frames_tiled.png (1.14 KiB) Viewed 6140 times
For your own background, just recolor these images
The code to override the background looks like:
Code: Select all
[
{
"override":true,
"id":"$anim_blank00",
"type":"animation",
"frames":[
{"bmp":"frames.png","w":32,"h":16,"handle y":8},
{"bmp":"frames.png","x":32,"w":16,"h":16,"handle y":8},
{"bmp":"frames.png","x":48,"w":16,"h":16,"handle x":-16,"handle y":8},
{"bmp":"frames_tiled.png","handle y":32}
]
}
]
As you are responsible for setting the frame handles properly I recommend to just reuse this code instead of writing it on your own.