Hi, guys. I know some people had asked a lot about draw maps WITHDATA. If you want to do that, well, YOU are in the right place! Let's get started!
First, you'll need to put some arrays. Think like this.
DIM BGTABLE'Depending on the number of tiles you want, you will need to put the exact number as the number of tiles you have, but you will need to jump 1 number, otherwise will cause a type mismatch.
And we'll need the MAP$ variable. Why? Here is shown.
DIM MAP$'You will want to put this, because it stores the number of DATA arrays you want.
Then, the AMAZING part is coming out.
FOR I=0 TO LEN(BGTABLE)
For what use is this? It reads the tiles you have asignned to your map.
FOR I=0 TO LEN(MAP$)
And this is for reading the complete map.
The complex part is coming out. Get ready! Finally...
To render the map, we will use this code:
FOR I#=0 TO LEN(MAP$)-1
FOR J#=0 TO LEN(MAP$[I#])-1
This is used to recompile the ASCII map and translate them to BG tiles.
And, as the (pre-)final step, we will write the custom functions after we made the scripts.
MAPREAD [number of the map to read]
Now, you will want to make your ASCII map, now, how the format is used?
@MAP_0X'Label of the map to read and translate. NOTE: the “X” shown is a number of the map to use.
DATA X'The ”X” is for the BG definition number to use. EXAMPLE: DATA 9'1
DATA "XXXXXXXXXXXXXXX"'Same as the DATA number to use. Read example above.
I actually don’t know if you (the reader) understood what I wanted to mean on the example above.
Credit to rando!