Lol, why don't you get the code for a basic world sorted first before you start trying to enter buildings in it.
Just have a sprite offscreen somewhere:
sprite 1,screen width(),screen height(),1
and whenever you need a picture as part of your world do something like this in your main loop:
do
set sprite image 1,IMG
size sprite 1,image width(IMG),image height(IMG)
paste sprite 1,X,Y
sync
loop
But replace IMG with whatever picture number you want, and use those 3 lines multiple times for all the different locations of images you want on the screen.
Here's an example if that's hard to understand:
// LOAD MEDIA
load image "Image1.bmp",1,1
load image "Image2.bmp",2,1
load image "Image3.bmp",3,1
// SETUP APPLICATION
sync on
sync rate 66
// HIDE OUR LITTLE DRAWING SPRITE
sprite 1,screen width(),screen height(),1
// GENERATE A RANDOM MAP
dim MAP(127,127)
for TEMP=0 to 5000
MAP(rnd(127),rnd(127))=1+rnd(2)
next TEMP
// SET THE TILESIZE FOR THE TILEBASED GAME
//(THIS ENGINE STILL WORKS WITH A NON-TILEBASED GAME)
TILESIZE=32
// MAIN LOOP
do
// RUNTHROUGH EACH TILE ON THE MAP
for X=0 to 127
for Y=0 to 127
// CHECK IF EACH TILE HAS AN IMAGE NUMBER ASSIGNED TO IT
if MAP(X,Y)>0
// DISPLAY THAT IMAGE AT THAT TILE NUMBER
set sprite image 1,MAP(X,Y)
size sprite 1,image width(MAP(X,Y)),image height(MAP(X,Y))
paste sprite 1,X*TILESIZE,Y*TILESIZE
endif
next Y
next X
// RENDER
sync
loop
And here's the media to go with it in case you can't be bothered making your own.
EDIT:
Here's a poor attempt at showing you how to do backgrounds and foregrounds using this system (I've slowed it down so you can actually see what it's doing before it randomly generates a new background/foreground):
// LOAD MEDIA
load image "Image1.bmp",1,1
load image "Image2.bmp",2,1
load image "Image3.bmp",3,1
// SETUP APPLICATION
sync on
sync rate 10
// HIDE OUR LITTLE DRAWING SPRITE
sprite 1,screen width(),screen height(),1
// GENERATE A RANDOM MAP
dim MAP(127,127)
for TEMP=0 to 5000
MAP(rnd(127),rnd(127))=1+rnd(2)
next TEMP
// SET THE TILESIZE FOR THE TILEBASED GAME
//(THIS ENGINE STILL WORKS WITH A NON-TILEBASED GAME)
TILESIZE=32
// MAIN LOOP
do
// DRAW THINGS IN THE BACKGROUND
cls
// DRAW SOME RANDOM CIRCLES
for C=0 to 50
circle rnd(screen width()),rnd(screen height()),rnd(64)
next C
// RUNTHROUGH EACH TILE ON THE MAP
for X=0 to 127
for Y=0 to 127
// CHECK IF EACH TILE HAS AN IMAGE NUMBER ASSIGNED TO IT
if MAP(X,Y)>0
// DISPLAY THAT IMAGE AT THAT TILE NUMBER
set sprite image 1,MAP(X,Y)
size sprite 1,image width(MAP(X,Y)),image height(MAP(X,Y))
paste sprite 1,X*TILESIZE,Y*TILESIZE
endif
next Y
next X
// DRAW THINGS INFRONT OF THE SPRITES (LIKE ROOVES FOR BUILDINGS)
// DRAW SOME RANDOM BOXES (ROOVES)
for B=0 to 2
box rnd(screen width()),rnd(screen height()),rnd(screen width()),rnd(screen height())
next B
// RENDER
sync
loop
