im having to load the bitmaps to make the sprites and my tiles are being made using 'load image'. the bitmaps are no bigger than 70*80. have 386 mb ram i can hardly see a few small bitmaps killing it. me video card is only 8mb. im using delete bitmap/image codes. ill stick the source on.
`¬¬¬¬¬¬¬¬¬¬Area Changing¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬
sync on
sync rate 30
set display mode 1024,768,16
backdrop on
color backdrop rgb(0,0,0)
load image "grass08.bmp",1
load image "ash01.bmp",2
load image "medium04.bmp",6
Rem dim worlds
dim world1(10,10)
for y=0 to 9
for x=0 to 9
if world1data < 1 then restore world1data
read world1data
world1(x,y)=world1data
next x
next y
dim world2(8,8)
for y=0 to 7
for x=0 to 7
if world2data < 1 then restore world2data
read world2data
world2(x,y)=world2data
next x
next y
Rem make world 1
objnum=0
for y=0 to 9
for x=0 to 9
objnum = objnum + 1
make object plain objnum,10,10
position object objnum,x*10,y*10,75
if world1(x,y)> 0 then texture object objnum,world1(x,y) else color object objnum,0
next x
next y
Rem make world 2
objnum=100
for y=0 to 7
for x=0 to 7
objnum = objnum + 1
make object plain objnum,8,8
position object objnum,x*8,y*8,75
if world2(x,y)> 0 then texture object objnum,world2(x,y) else color object objnum,0
hide object objnum
next x
next y
delete image 1
delete image 2
delete image 6
Rem world 1
world1:
sync on
load bitmap "idle.bmp",3
get image 3,0,0,29,68
sprite 1,100,100,3
scale sprite 1,75
load bitmap "shop.bmp",4
get image 4,0,0,77,77
sprite 2,736,383,4
load bitmap "shopdoor.bmp",5
get image 5,0,0,29,28
sprite 3,765,432,5
load bitmap "liz.bmp",9
get image 9,0,0,31,70
sprite 6,400,400,9
scale sprite 6,85
delete bitmap 3
delete bitmap 4
delete bitmap 5
delete bitmap 9
x=600
y=600
do
oldx=x
oldy=y
if x<150 then x=150
if x>850 then x=859
if y<0 then y=0
if y>700 then y=700
rem Control position with cursors
if upkey()=1 then y=y-13
if downkey()=1 then y=y+13
if leftkey()=1 then x=x-13
if rightkey()=1 then x=x+13
sprite 1,x,y,3
if sprite collision(1,2)>0
x=oldx
y=oldy
sprite 1,x,y,3
endif
if sprite collision(1,6)>0
x=oldx
y=oldy
sprite 1,x,y,3
endif
if sprite collision(1,3)>0
x=oldx
y=oldy
sprite 1,x,y,1
for x = 1 to 100
hide object x
next x
for x = 101 to 164
show object x
next x
delete sprite 2
delete sprite 3
delete sprite 6
goto world2
endif
` X,Y,ZOOM
position camera 45,45,-10
xrotate camera 0.0
yrotate camera angle#
zrotate camera 0.0
sync
loop
Rem world 2
world2:
sync
cls
load bitmap "itemcounter.bmp",7
get image 7,0,0,170,79
sprite 4,550,300,7
delete bitmap 7
x=600
y=500
do
oldx=x
oldy=y
if x<310 then x=310
if x>745 then x=745
if y<175 then y=175
if y>550 then y=550
if upkey()=1 then y=y-13
if downkey()=1 then y=y+13
if leftkey()=1 then x=x-13
if rightkey()=1 then x=x+13
sprite 1,x,y,3
position camera 25,30,-10
xrotate camera 0.0
yrotate camera angle#
zrotate camera 0.0
sync
loop
world1data:
data 1,1,1,1,1,1,2,1,1,1
data 1,1,1,1,1,1,2,1,1,1
data 1,1,2,2,2,2,2,2,2,1
data 1,1,1,1,2,1,1,1,2,1
data 1,1,1,1,2,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1,1
world2data:
data 6,6,6,6,6,6,6,6
data 6,6,6,6,6,6,6,6
data 6,6,6,6,6,6,6,6
data 6,6,6,6,6,6,6,6
data 6,6,6,6,6,6,6,6
data 6,6,6,6,6,6,6,6
data 6,6,6,6,6,6,6,6
data 6,6,6,6,6,6,6,6
Daedalus