Like Jack said, your'e using cls, youv'e gotta refresh it every loop, here i made an example
`make sure you add your character stuff
sync on
Dim Tiles(1) as integer
Dim MAP(-1,-1) as integer
Width as integer
Height as integer
`make a grass tile so that this is medialess, change to your load image
MakeRectIm(1000, 32,32, RGB(0,255,0))
MakeRectIm(1001, 32,32, RGB(0,0,0))
`the tiles are hard coded, you should probably
Tiles(0) = 1001
Tiles(1) = 1000
`tell it to start reading at the label MapData
restore MapData
`read the width and height
read width
read height
`decrease it cause were starting at zero at all our loops
dec width
dec height
undim MAP()
`redim with the width and height
dim MAP(Width,Height) as integer
`loop through and read the data
for y = 0 to height
for x = 0 to width
read MAP(x,y)
next x
next y
do
cls
`loop through and paste the images, you should probable put this in a function
for y = 0 to height
for x = 0 to width
paste image Tiles(MAP(x,y)), x * 32, y * 32
next x
next y
` do your sprite here
sync
loop
`this makes a image of a rectangle so that we dont need media for this example
Function MakeRectIm(ImNum as integer, IWidth as integer, IHeight as integer, Color as Dword)
create bitmap 32, IWidth, IHeight
ink Color, 0
box 0,0,IWidth, IHeight
get image ImNum, 0,0, IWidth, IHeight, 3
delete bitmap 32
endfunction
`all the map data
MapData:
`width and height are now here
data 20,15
DATA 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DATA 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DATA 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DATA 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DATA 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DATA 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DATA 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DATA 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DATA 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DATA 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0
DATA 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DATA 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0
DATA 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DATA 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DATA 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
return
hope i helped.