Whoops, my bad
Changing that. I got a little excited.
Ok i got a little out of bounds error at first which i managed to fix. It does now compile but doesnt show. I shoved a Sync in there but to no avail.
Sync On
Sync Rate 40
Data 53, 1, 1, 1, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 53, 1, 1, 1, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 11, 4, 4
Data 53, 1, 1, 54, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 53, 54, 54, 54, 55, 31, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 53, 54, 54, 54, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 53, 54, 54, 54, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 53, 54, 54, 54, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 53, 54, 54, 54, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9, 10, 4, 4, 4, 4, 4
Data 53, 54, 54, 54, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 17, 18, 4, 4, 4, 4, 4
Data 61, 62, 62, 62, 63, 31, 4, 4, 4, 35, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 38, 38, 38, 38, 38, 39, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 4
Data 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Dim Map(22,12)
Load Image "Tileset.bmp", 100
a = 1
For y = 1 To 8
For x = 1 To 8
Get Image a, X * 32, Y * 32, X * 32 + 32, Y * 32 + 32 ` Left, Top, Right, Bottom
Inc a
Next y
Next x
For y = 1 To 12
For x = 1 To 22
Read Map(x,y)
Next x
Next y
Do
DisplayMap()
Sync
Loop
function DisplayMap()
For lpy = 1 to 12
For lpx = 1 to 22
If lpx > -1 AND lpx < 22 AND lpy > -1 AND lpy < 12
Img = Map(lpx,lpy)
x = lpx*32
y = lpy*32
Paste Image Img,x,y
EndIf
Next lpx
Next lpy
endfunction
Throwing in your little trick to show whats what and where on the map is showing it to be working, its just not displaying the tiles.
Sync On
Sync Rate 40
Data 53, 1, 1, 1, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 53, 1, 1, 1, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 11, 4, 4
Data 53, 1, 1, 54, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 53, 54, 54, 54, 55, 31, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 53, 54, 54, 54, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 53, 54, 54, 54, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 53, 54, 54, 54, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 53, 54, 54, 54, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9, 10, 4, 4, 4, 4, 4
Data 53, 54, 54, 54, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 17, 18, 4, 4, 4, 4, 4
Data 61, 62, 62, 62, 63, 31, 4, 4, 4, 35, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 38, 38, 38, 38, 38, 39, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 4
Data 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Dim Map(22,12)
Load Image "Tilset.bmp", 100
a = 1
For y = 1 To 8
For x = 1 To 8
Get Image a, X * 32, Y * 32, X * 32 + 32, Y * 32 + 32 ` Left, Top, Right, Bottom
Inc a
Next y
Next x
For y = 1 To 12
For x = 1 To 22
Read Map(x,y)
Next x
Next y
Do
DisplayMap()
Sync
Loop
function DisplayMap()
For lpy = 1 to 12
For lpx = 1 to 22
If lpx > -1 AND lpx < 23 AND lpy > -1 AND lpy < 13
Img = Map(lpx,lpy)
x = lpx*32
y = lpy*32
Paste Image Img,x,y
text x,y,str$(Img)
EndIf
Next lpx
Next lpy
endfunction
Something else i spotted was it was trying to load "Tilset" not "Tileset", now i wonder why that didnt crash i as i dont have a file called that in my project folder and i thought it would have crashed with that statement if it couldnt find the pic, it always does. Anyway, regardless it still isnt working but i added a paste image 1, 0, 0 to see what it thinks image 1 should be (it should paste some water at the top left corner) and it doesnt paste it, so the code is wrong there i think but im not so sure.
15th Edit:
I am using this:
Load Image "Tileset.bmp", 100
a = 1
For y = 0 To 8
For x = 0 To 8
Get Image a, X * 32, Y * 32, X * 32 + 32, Y * 32 + 32 ` Left, Top, Right, Bottom
Inc a
Next y
Next x
Paste Image 1, 0, 0
Wait Key
To check which image it thinks 1 is. Now i also changed the for loop to start from 0 to 8 as i dont understand how that for loop could work as it needs to start from 0, 0.
32 * 1 is not 0, so it must start with 0 so it can be X(0) * 32 (which will equal 0) Surely this is the right way to do it? Or did it work better when it was 1 To 8?
Either way its still not working so ill keep looking at it.
254th Edit:
Ok i now changed it to this as i was sure the For loop wasnt working and this shouldnt be right, i was silly to leave it that way so here is the revised code......althoughitstilldoesntwork.
Load Image "Tileset.bmp", 100
Cls
a = 1
For y = 0 To 8
For x = 0 To 8
Get Image a, X * 32, Y * 32, X * 32 + 32, Y * 32 + 32 ` Left, Top, Right, Bottom
Inc a
Next x
Next y
Paste Image 8, 0, 0
Wait Key
603rd Edit:
Ok now i take back everything good i said about Mappy. I wondered why the data statements didnt feel right. All in the top left corner should be water surrounded by a crappy embankment tile i made, but instead its all made up of 50's and 60's and so on. This isnt right. It got the grass right but other things its gone nuts on. Maybe this can be fine tuned somehow but i havent got a clue how to do it so now i have no way of exporting all those numbers into a pretty little data statement, so large maps will be a very painstaking process, very painstaking indeed.
Further more at least i figured out how to make the thing work. After all i hadnt pasted the image (the main tileset) then cls'd it when i gathered the info. So at least it now works.
Right who wants to help me with getting a character on there !
8 Millionth to the power of 5 Edit:
Mmmmm it seems that mappy is ok after all. It is doing as requested. The image numbers are getting mixed up but only some of them. I am not sure how this could be happening as if you cock one up you cock them all up is what i say. You cant get the grass tile right and not the rest, and thats the only one thats right. So i am wondering if its something to do with the garbbing image part. I am going to experiment a while (cause i have tons of time and dont want to get moving on to something interesting at all!), i will figure it out and post up the full working version on here. Then will someone help me with the moving character
Infinity Edit:
Yes i got it working. Take a look at this. My apologies to the creators of Mappy i will remove the voodoo curse from your families immediately, i hope not many folks died.
Sync On
Sync Rate 40
Data 53, 1, 1, 1, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 53, 1, 1, 1, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 11, 4, 4
Data 53, 1, 1, 1, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 53, 1, 1, 1, 55, 31, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 53, 1, 1, 1, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 53, 1, 1, 1, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 53, 1, 1, 1, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 53, 1, 1, 1, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9, 10, 4, 4, 4, 4, 4
Data 53, 1, 1, 1, 55, 31, 4, 4, 4, 4, 4, 4, 4, 4, 4, 17, 18, 4, 4, 4, 4, 4
Data 61, 62, 62, 62, 63, 31, 4, 4, 4, 35, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Data 38, 38, 38, 38, 38, 39, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 4
Data 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Dim Map(22,12)
Load Image "Tileset.bmp", 100
Paste Image 100, 0, 0
a = 1
For y = 0 To 7
For x = 0 To 7
Get Image a, x * 32, y * 32, x * 32 + 32, y * 32 + 32 ` Left, Top, Right, Bottom
Inc a
Next x
Next y
For y = 1 To 12
For x = 1 To 22
Read Map(x,y)
Next x
Next y
Do
DisplayMap()
Sync
Loop
Function DisplayMap()
For lpy = 1 to 12
For lpx = 1 to 22
If lpx > -1 AND lpx < 23 AND lpy > -1 AND lpy < 13
Img = Map(lpx,lpy)
x = lpx*32
y = lpy*32
Paste Image Img,x,y
text x,y,str$(Img)
EndIf
Next lpx
Next lpy
EndFunction
Screeny Attached!
Now onto the character