explain more in details
create buffer1 and buffer2 for example:
buffer1=createimage(graphicswidth(),graphicsheight())
buffer2=createimage(graphicswidth(),graphicsheight())
(note that you MUST use the transparent color of your tileset as background color of the buffer2)
the you draw your map layers in these buffers
layer 0 and 1 in buffer1
layer 2 and 3 in buffer2
so your main loop can look like this
repeat
drawblock buffer1,0,0
*** draw the player ***
drawimage buffer2,0,0
flip
until keydown(1)
so no need to redraw the map from the data each frame :)
create buffer1 and buffer2 for example:
buffer1=createimage(graphicswidth(),graphicsheight())
buffer2=createimage(graphicswidth(),graphicsheight())
(note that you MUST use the transparent color of your tileset as background color of the buffer2)
the you draw your map layers in these buffers
layer 0 and 1 in buffer1
layer 2 and 3 in buffer2
so your main loop can look like this
repeat
drawblock buffer1,0,0
*** draw the player ***
drawimage buffer2,0,0
flip
until keydown(1)
so no need to redraw the map from the data each frame :)