Ok here's my zelda entry. I think it's much easier with media but ohh well.
REM ************************** Testing ********************************
Set display mode 640,480,32
sync on
sync rate 0
create bitmap 1,640,480
gosub Setup
State$ = "GamePlay"
REM *********************************************************************
REM Main Loop
REM *********************************************************************
do
if State$ = "GamePlay" then gosub GamePlay
ink rgb(255,255,255),0
text 0,0,"FPS: "+str$(screen fps())
copy bitmap 1,0
sync : cls
loop
REM *********************************************************************
REM Setup
REM *********************************************************************
Setup:
REM Player Start Position
pX = 100
pY = 100
REM Images
cls rgb(0,200,200)
REM Pic1 Up
gosub DrawBody
get image 101,0,0,32,32
REM Pic2 Left
gosub DrawBody
fillcircle(16-4,16-6,2,rgb(255,0,0))
get image 102,0,0,32,32
REM Pic3 Right
gosub DrawBody
fillcircle(16+4,16-6,2,rgb(255,0,0))
get image 103,0,0,32,32
REM Pic4 Down
gosub DrawBody
fillcircle(16-4,16-6,2,rgb(255,0,0))
fillcircle(16+4,16-6,2,rgb(255,0,0))
get image 104,0,0,32,32
Frame = 2
DrawBox2(0,0,32,32,150,150,150)
get image 500,0,0,32,32
DrawBox2(0,0,32,32,200,200,200)
get image 501,0,0,32,32
REM Map
dim map(13,13)
for lp = 1 to 10
map(rnd(13),rnd(13)) = 1
next lp
return
DrawBody:
ink 0,0
box 0,0,32,32
REM Feet
fillcircle(16,16+8,4,rgb(10,10,10))
fillcircle(16,16+8,3,rgb(255,255,255))
REM Body
fillcircle(16,16,7,rgb(10,10,10))
fillcircle(16,16,6,rgb(255,255,255))
REM Face
fillcircle(16,16-6,8,rgb(10,10,10))
fillcircle(16,16-6,7,rgb(255,255,255))
return
REM *********************************************************************
REM GamePlay
REM *********************************************************************
GamePlay:
gosub DrawMap
gosub PlayerUpdate
return
REM ---------------------------------------------------------------------
REM Draw Map
REM ---------------------------------------------------------------------
DrawMap:
for lpy = 0 to 13
for lpx = 0 to 13
i = 500+map(lpx,lpy)
if image exist(i) then paste image i,lpx*32,lpy*32
next lpx
next lpy
return
REM ---------------------------------------------------------------------
REM Player Update
REM ---------------------------------------------------------------------
PlayerUpdate:
Move = 0
U = 0
L = 0
R = 0
D = 0
if upkey() then U = 1 : Move = 1
if leftkey() then L = 2 : Move = 1
if rightkey() then R = 4 : Move = 1
if downkey() then D = 8 : Move = 1
if Move > 0
dr = U+L+R+D
if dr = 1 then pY = pY - 1 : Frame = 1
if dr = 2 then pX = pX - 1 : Frame = 2
if dr = 4 then pX = pX + 1 : Frame = 3
if dr = 8 then pY = pY + 1 : Frame = 4
if dr = 3 then pY = pY - 1 : pX = pX - 1 : Frame = 1
if dr = 5 then pY = pY - 1 : pX = pX + 1 : Frame = 1
if dr = 10 then pY = pY + 1 : pX = pX - 1 : Frame = 4
if dr = 12 then pY = pY + 1 : pX = pX + 1 : Frame = 4
endif
paste image 100+Frame,pX-16,pY-16,1
return
REM --------------------------------------------------------------------
REM Function - FillCircle
REM --------------------------------------------------------------------
Function FillCircle(cx,cy,r,c)
ink c,0
sr = r*r
for i = 1 to r
h = sqrt( sr - i*i )
box cx - i, cy - h, cx + i, cy + h
next i
EndFunction
REM ----------------------------------------------------------------
REM Function - DrawBox2
REM ----------------------------------------------------------------
Function DrawBox2(x1,y1,x2,y2,r,g,b)
ink rgb(10,10,10),0
box x1,y1,x2,y2
cr = r / 1.5
cg = g / 1.5
cb = b / 1.5
ink rgb(cr,cg,cb),0
box x2-1,y1+2,x2-1,y2-1
box x1+2,y2-1,x2-1,y2-1
cr = r + (255-r) / 1.5
cg = g + (255-g) / 1.5
cb = b + (255-b) / 1.5
ink rgb(cr,cg,cb),0
box x1+1,y1+1,x2-1,y1+1
box x1+1,y1+1,x1+1,y2-1
ink rgb(r,g,b),0
box x1+2,y1+2,x2-2,y2-2
EndFunction