Raven didn't explain it.
Say you had a mario game with 10 different sprites (Mario, Koopa, Goomba, Item, etc.)
You wouldn't want to say "Sprite 112,12,14,13" hundreds of times.
You could write your level like this, where 5 = Mario, 3 = box, and 1 = Ground:
Data 0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0
Data 0,3,0,0,3,0,0,0,0
Data 0,0,0,0,0,0,0,3,0
Data 5,0,0,0,0,0,0,0,0
Data 1,1,1,1,1,0,1,1,0
This shows the positions of each tile.
Then use read:
For x = 1 To 9
For y = 1 To 6
Read a
If a = 1 Then sprite s,x*10,y*10,1: s=s+1
If a = 3 Then sprite s,x*10,y*10,1: s=s+1
If a = 5 Then sprite s,x*10,y*10,1: s=s+1
Rem and so on....
Next y
Next x
The x and y have nothing to do with read, but it makes it easier to map out the level.
Hope this helps
"All programmers are playwrights and all computers are lousy actors." -Anon.
<--- Just.. changed.. my. avatar... Ouch, my head!
