LoginLogin
Might make SBS readonly: thread

Build a background, tile by tile.

Root / FAQs / [.]

📌
JustGreatCreated:
I'm almost confident that something similar to
 GPUTCHR 
exists for sprites, but I have no clue what that command is.

It's called BGPUT and BGFILL. http://imgur.com/YSCyQJi I recommend using this chart to refer to a tile's HEX ID instead of using decimal ID for a good reason. This is how to read the chart: the pawn is 0004, the lava is 007F, and the unopened treasure box is 0360. BGPUT lets you put one tile at a time. Try this
 BGPUT 0,12,7,"0360"
'BGPUT layer,X,Y,"tile hex id" 
This code puts a treasure box smack-dab in the middle of the top screen, since BG's X ranges from 0 to 24, and Y from 0 to 14 by default. The quotes tell SB that it should check the HEX ID of the tile. Now let's learn BGFILL. We can fill the entire screen with lava. Bowser should like this.
 BGFILL 0,0,0,25,15,"0360"
'BGPUT layer,startX,startY,endX,endY,"tile hex id" 
We can "chain" tiles together like this:
BGFILL 0,0,0,25,15,"032703280329032A032B032C032D032E032F"+"034703480349034A034B034C034D034E034F"
Yeah! It's a... weird looking desert! It's because our desert tiles are 9 by 2, and that's not a multiple of 25 by 15. We'll have to get creative and do this:
BGFILL 0,0,0,25,15,"032703280329032A032B032C032D032E032F"*2+"032703280329032A032B032C032D"+ "034703480349034A034B034C034D034E034F"*2+"034703480349034A034B034C034D"
Much better. BGFILL will repeat the string if it's not enough. But it can be even better, let's fill the bottom with sandy tile 021F:
BGFILL 0,0,0,25,15,"032703280329032A032B032C032D032E032F"*2+"032703280329032A032B032C032D"+ "034703480349034A034B034C034D034E034F"*2+"034703480349034A034B034C034D"+"021F"*25*13
Perfect desert!

Thank you so much for your explanation. I started working on a clone of the original Legend of Zelda's interesting grid-like movement engine a while back, and over time the learning project became a Bomberman clone that I'm determined to finish. This feature was one of the hang-ups of the project, but now I can finally move along.