using DB Pro
I'm a total NEWBIE at 2D scrolling tiles..TOTAL NEWBIE!!
Here's my uder NEWBIE attempt at making a 5x2 map
(supposed two show map1 if data =0 and,
show map2 if data =1) thats what is supposed to happen anyways..
So my question is how do i do this right!!
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<<< I FIGURED IT OUT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
add your own images
code------------------------------------------------------
sync on:sync rate 60
rem both images are 50x44
load image "media/exp5.bmp",1
load image "media/exp6.bmp",2
width=5 rem width of world
height=2 rem height of world
xcount=0 rem num of tiles across
xcount2=0
offsetx=0 rem width between tiles
offsetx2=0
offsety=10 rem height between tiles
offsety2=65
rem fill world array------------------------------
dim world(width,height)
for x=0 to 5
for y=0 to 2
read blocks
world(x,y)=blocks
next y
next x
rem ---------------------------------------------------
rem game loop
do
rem draw world--------------------------------------------
for x=0 to 5
for y=0 to 2
xcount=xcount+1
xcount2=xcount2+1
if xcount <6 and xcount2 <6
if world(x,y)=0 then paste image 1,offsetx,offsety
if world(x,y)=1 then paste image 2,offsetx,offsety
if world(x,y)=0 then paste image 1,offsetx2,offsety2
if world(x,y)=1 then paste image 2,offsetx2,offsety2
offsetx=offsetx+55
offsetx2=offsetx2+55
endif
next y
next x
rem -------------------------------------------------------
sync
loop
rem world---------------------------
data 0,0,0,0,0
data 1,1,1,1,1
rem ----------------------------------