I just found this and had a solution for your Platoon thing. To mimic this specific effect, you don't need 768 tiles. Here's my example using 1 sprite and 23 clones. Image I used is attached.
setVirtualResolution(640,480)
// background image is 640 x 480
// 24 rows of blocks gives us rows 20px high (480/24=20)
Type obj_Platoon
s as integer
clipWidth as integer
EndType
// array to hold all the rows of tiles
dim z[24] as obj_Platoon
// load image into a sprite and set up animation data.
// In this case, there are 24 animation frames at 640 x 20
z[1].s = createSprite(loadImage("platoon.jpg"))
setSpriteAnimation(z[1].s, 640, 20, 24)
setSpriteScissor(z[1].s, -1,-1,0,0)
// Clone the sprite for the remaining rows
// Position the rows and set the animation frame
for i = 2 to 24
z[i].s = cloneSprite(z[1].s)
setSpritePosition(z[i].s, 0, i*20-20)
setSpriteFrame(z[i].s, i)
next i
setClearColor(255,255,255)
// start with first row
showRow = 1
// some timing variables
timestamp = getMilliseconds()
delay = 50
Do
m = getMilliseconds()
if m >= timestamp + delay
timestamp = m
// If entire row hasn't been displayed yet
if z[showRow].clipWidth < 640
// show row in increments of 32px wide blocks
inc z[showRow].clipWidth, 32
// get Y-coord for this row
y = (showRow-1)*20
// Clip the sprite
setSpriteScissor(z[showRow].s, 0, y, z[showRow].clipWidth, y+20)
else
// Entire row is uncovered, move on to the next row
if showRow < 24 then inc showRow
endif
endif
sync()
Loop
While writing the above, I got an idea for a different approach. This only uses two sprites. Instead of using the animation command and repositioning it for each row, you could use just the scissor command. It depends on which has less overhead, a full screen sprite but with parts hidden or an animation object with frames. Actually, the first sounds like it might use less memory. As for impact on frame rates it depends on how scissor clips the sprite. If those areas are removed from the drawing routine completely then that would be the best way to go I think.
setVirtualResolution(640,480)
// background image is 640 x 480
// 24 rows of blocks gives us rows 20px high (480/24=20)
// load image into a sprite and set up animation data.
// In this case, there are 24 animation frames at 640 x 20
s1 = createSprite(loadImage("platoon.jpg"))
setSpriteScissor(s1, -1,-1,0,0)
s2 = cloneSprite(s1)
setSpriteAnimation(s2, 640, 20, 24)
setClearColor(255,255,255)
// start with first row
showRow = 1
// some timing variables
timestamp = getMilliseconds()
delay = 50
Do
m = getMilliseconds()
if m >= timestamp + delay
timestamp = m
// If entire row hasn't been displayed yet
if clipWidth < 640
inc clipWidth, 32
// get Y-coord for this row
y = (showRow-1)*20
// Clip the sprite
setSpriteScissor(s2, 0, y, clipWidth, y+20)
setSpritePosition(s2, 0, y)
else
// Entire row is uncovered, move on to the next row
if showRow < 24
setSpriteScissor(s1, 0, 0, 640, showRow*20)
inc showRow
setSpriteScissor(s2, -1,-1,0,0)
setSpriteFrame(s2, showRow)
clipWidth = 0
endif
endif
endif
sync()
Loop
"I like offending people, because I think people who get offended should be offended." - Linus Torvalds