It took forever to find a program to rip graphics from but I got it.
This creates a random map and scrolls around. Generally you'll want to load a map from a file instead. Think of it as a piece of graph paper. Each square in the graph paper represents a graphic. Piece them together and you get the whole map. This map is 500x500.
Use the arrow keys to move Zelda around (there isn't any animation) and ESC to end.
Written for Darkbasic Classic:
set display mode 640,480,32
sync rate 0
sync on
hide mouse
dim Map(500,500)
dim Tex$(12)
load bitmap "zelda.bmp",1
` Get Zelda
x=1:y=18
for t=50 to 54
get image t,x,y,x+21,y+23,1
inc x,22
next t
` Get Map Graphics
x=1:y=1
for t=1 to 20
get image t,x,y,x+16,y+16,1
inc x,17
next t
set current bitmap 0
` Make a random map
x=0:y=0
for t1=0 to 500
for t2=0 to 500
a=rnd(9)+1
b=rnd(60)
if b=60
a=rnd(9)+11
endif
Map(t1,t2)=a
inc x,16
next t1
x=0
inc y,16
next t2
` Add something to the map :-)
x=30:y=30
Tex$(0)="01 01 08 01 01 01 01 01 03 01 01 01 01 01 03 01 01 08 09 "
Tex$(1)="01 15 15 15 15 15 01 01 01 01 01 08 01 01 01 01 04 03 04 "
Tex$(2)="01 15 01 01 01 01 01 09 01 01 03 01 01 01 01 05 01 03 01 "
Tex$(3)="08 15 01 01 01 09 01 01 01 01 01 01 08 01 01 01 01 01 01 "
Tex$(4)="01 15 01 01 01 01 01 01 01 08 01 01 01 01 01 01 01 01 01 "
Tex$(5)="01 15 01 15 15 15 01 15 15 15 01 15 15 15 01 15 15 15 01 "
Tex$(6)="01 15 01 01 01 15 08 15 09 15 01 15 01 15 01 15 01 15 01 "
Tex$(7)="01 15 01 01 01 15 01 15 01 01 01 15 01 15 01 15 01 15 01 "
Tex$(8)="08 15 15 15 15 15 01 15 09 01 01 15 15 15 01 15 15 15 02 "
Tex$(9)="01 01 03 01 01 01 01 01 01 01 01 01 01 09 01 01 01 15 01 "
Tex$(10)="01 01 02 01 01 01 01 03 01 01 01 01 01 01 01 01 01 15 01 "
Tex$(11)="02 01 01 01 01 03 01 01 01 01 01 01 02 09 01 15 15 15 01 "
Tex$(12)="01 01 01 01 01 01 01 02 01 01 01 01 01 01 01 01 01 01 01 "
for t1=0 to 12
a$=""
for t2=1 to len(Tex$(t1))
a$=a$+mid$(Tex$(t1),t2)
if len(a$)=3
Map(x,y)=val(a$)
a$=""
inc x
endif
next t2
x=30:inc y
next t1
` Main Loop
x=0:y=0
sprite 1,320,232,53
ShowMap(x,y)
sync
do
if upkey()>0
if y-1>0
dec y
sprite 1,320,232,52
ShowMap(x,y)
endif
endif
if downkey()>0
if y+1<501-29
inc y
sprite 1,320,232,53
ShowMap(x,y)
endif
endif
if leftkey()>0
if x-1>0
dec x
sprite 1,320,232,50
ShowMap(x,y)
endif
endif
if rightkey()>0
if x+1<501-39
inc x
sprite 1,320,232,51
ShowMap(x,y)
endif
endif
if escapekey()>0
end
endif
loop
` Show map
function ShowMap(mx,my)
x=0:y=0
for t1=my to my+29
for t2=mx to mx+39
paste image Map(t2,t1),x,y
inc x,16
next t2
x=0
inc y,16
next t1
sync
endfunction
I'll answer any questions you have of course.