I wouldn't load each tile up as a separate object, you will eat all the bandwidth with the ObjectProcessor processing the list.
The best way would be a single image (object) that you use as the screen, and draw into it. - Or even better just have a character map in ram that you check against, but use a full 16 bit image for the entire screen, eg, store each screen as a static bitmap 320x200 and work out where you are in your character table (which isn't draw)
OK - so if i understand correctly, draw the whole cavern as an image and then calculate where the player sprite is against the x and y's of the platform on the image ??
I can see that working but how would I handle interactive platforms - E.G the ones where they crumble away ? would these be laid over the top ?
As an aside to this though this is what I came up with earlier but doesn't do as expected - just dumps all the blocks in the bottom left hand corner of the screen
sub display_cavern
local LVAR_brick_id%, LVAR_platform_id%, LVAR_y%, LVAR_x%
dim x as short
LVAR_brick_id = ID_bricks
LVAR_platform_id = ID_platform
LVAR_x = 20
LVAR_y = 20
for x = 0 to 199
if DATA$[x] = "1" THEN
rsetobj(LVAR_brick_id, R_sprite_x, (LVAR_x<<16)) ' set x-position'
rsetobj(LVAR_brick_id, R_sprite_y, (LVAR_y<<16)) ' set y-position'
LVAR_x = LVAR_x + 16
LVAR_brick_id = LVAR_brick_id + 1
elseif DATA[x] = "2" THEN
rsetobj(LVAR_platform_id, R_sprite_x, (LVAR_x<<16)) ' set x-position'
rsetobj(LVAR_platform_id, R_sprite_y, (LVAR_y<<16)) ' set y-position'
LVAR_x = LVAR_x + 16
LVAR_platform_id = LVAR_platform_id + 1
elseif DATA[x] = "x" THEN ' its the end of the line so advance y and reset x'
LVAR_y = LVAR_y + 16
LVAR_x = 20
elseif DATA[x] = "0" THEN ' its a blank block so advance the x position'
LVAR_x = LVAR_x + 16
endif
loop
'1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0'
data 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,x '1'
data 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,x '2'
data 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,x '3'
data 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,x '4'
data 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,x '5'
data 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,x '6'
data 1,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,2,2,1,x '7'
data 1,0,0,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,1,x '8'
data 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,x '9'
data 1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,x '0'
end sub
Cheers for all the help and advice.
Edited by saboteur, Tue Mar 21, 2017 4:35 AM.