Hello All,
Thanks for the feedback! Although I do prefer the Read/Data/Restore method, Rich's method above is working perfectly.
See the code below for a simple but working method:
level1:
m$[0] = "11111111111111111111111111111111"
m$[1] = "10000000000000111000000000000001"
m$[2] = "10000000000000010000000000000001"
m$[3] = "10000001000000000000000010000001"
m$[4] = "10000011100000000000000111000001"
m$[5] = "10000001000000000000000010000001"
m$[6] = "10000000000000000000000000000001"
m$[7] = "10000000000000000000000000000001"
m$[8] = "10000000000000000000000000000001"
m$[9] = "10000000000000010000000000000001"
m$[10] = "10001100000000111000000000011001"
m$[11] = "10000110000001111100000000110001"
m$[12] = "10000110000000111000000000110001"
m$[13] = "10001100000000010000000000011001"
m$[14] = "10000000000000000000000000000001"
m$[15] = "10000000000000000000000000000001"
m$[16] = "10000000000000000000000000000001"
m$[17] = "10000000000000000000000000000001"
m$[18] = "10000001000000000000000010000001"
m$[19] = "10000011100000000000000111000001"
m$[20] = "10000001000000000000000010000001"
m$[21] = "10000000000000010000000000000001"
m$[22] = "10000000000000111000000000000001"
m$[23] = "11111111111111111111111111111111"
Return
create_level:
wx = 0: wy = 0: loc = 0: wSpr = 999
for row = 0 to 23
for seg = 0 to 31
if mid(m$[loc], seg, 1) = "1"
inc wSpr
CreateSprite(wSpr, walls)
SetSpritePosition(wSpr, wx, wy)
SetSpriteDepth(wSpr, 10)
endif
inc wx, 32
next seg
inc loc
inc wy, 32
wx = 0
next row
Return
This is for a single Wall image at 32x32, but it can be expanded to add different images for doors, items, etc...
The SetSpriteDepth command can be used for moving sprites above and below other sprites too, so I'm loving AppGameKit so far!!
Thanks again!!
JHA