Hi Yskonyn,
Your best bet is to create a multidimensional array that is the size of the world you wish to create. Then you can populate it with something like this:
....T...T.
..T.......
....T..WWW
.T....WWWW
......WWWW
.....WWWWW
.....WWWWW
Where a . is grass, T is a tree and W is water.
Then, you can place sprites on the screen according to the contents of the array! Something like this:
`Create arrays
DIM Temp$(10)
DIM WORLD$(10, 10)
`Populate world array
Temp$(01) = "..T.,..T.."
Temp$(02) = "....,....."
Temp$(03) = ".T..,.T..."
Temp$(04) = "....,....T"
Temp$(05) = ",,,,,....."
Temp$(06) = ".......TWW"
Temp$(07) = "...T..WWWW"
Temp$(08) = "....WWWWWW"
Temp$(09) = "T..WWWWWWW"
Temp$(10) = "....WWWWWW"
FOR Y = 1 to 10
FOR X = 1 to 10
WORLD$(X, Y) = MID$(Temp$(Y), X)
NEXT
NEXT
`Remove temp array
UNDIM Temp$()
`Main loop
SYNC ON
DO
GOSUB Draw_Map
SYNC
LOOP
`Subroutine to go through multidimensional array and draw appropriate graphics in appropriate spots
Draw_Map:
FOR Y = 1 to 10
FOR X = 1 to 10
SELECT WORLD$(X, Y)
CASE ".":
INK RGB(0, 150, 0), 0
BOX (X*10), (Y*10), ((X*10)+10), ((Y*10)+10)
ENDCASE
CASE ",":
INK RGB(90, 90, 90), 0
BOX (X*10), (Y*10), ((X*10)+10), ((Y*10)+10)
ENDCASE
CASE "W":
INK RGB(0, 0, 150), 0
BOX (X*10), (Y*10), ((X*10)+10), ((Y*10)+10)
ENDCASE
CASE "T":
INK RGB(255, 0, 0), 0
BOX (X*10), (Y*10), ((X*10)+10), ((Y*10)+10)
ENDCASE
ENDSELECT
NEXT
NEXT
RETURN
When the player moves, you just check the contents of the grid square that they're moving into. If it's an impassable object, don't let them move!
Hope this helps you out!
Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame