Override background
Posted: 30 Nov 2017, 21:55
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:
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: It should represent a 4x4 tile grid of frame a.
The original frames look like:
This sample replaces the background with a black one: For your own background, just recolor these images
The code to override the background looks like:
As you are responsible for setting the frame handles properly I recommend to just reuse this code instead of writing it on your own.
Hi, as proposed Starting with game version 1.11.08 you should also provide a fourth frame that will be used for more optimized drawing: It should represent a 4x4 tile grid of frame a.
The original frames look like:
This sample replaces the background with a black one: 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}
]
}
]