Hi,
I am just starting to write a Loderunner clone to get a grip on the basic engines BASIC dialect. I have no real basic engine yet, so I use the hosted version.
I drawed a small PCX with my tiles in it and load them as bg0 with the following command:
BG 0 TILES 28,16 SIZE 16,14 WINDOW 0,0,28*16-16,16*14 ON
I use screen 1. My tiles are 16x14 pixels. They are extracted from the PCX without problems. The game levels are 28x16 tiles. So I set the windows width to 28 tiles x 16 pixels
Then draw a sample pattern on it with a PLOT loop. Works fine.
But I see at the end of each line one extra half tile which repeats the first tile in this line. If I reduce window width nothing happens until I reduce by 16 pixels. Then the window becomes one tile smaller, but my last tile is cut in half then.
Here is my complete program:
100 SCREEN 1
105 LOAD PCX "tiles.pcx" AS BG 0
110 BG 0 TILES 28,16 SIZE 16,14 WINDOW 0,0,28*16-16,16*14 ON
120 FOR y=0 TO 15
125 PLOT 0,0,y,6
130 FOR x=1 TO 26
140 PLOT 0,x,y,3
150 NEXT x
155 PLOT 0,27,y,5
160 NEXT y
170 PLOT 0,0,8,7
200 WHILE INKEY$ ="":WEND
210 BG 0 OFF
BTW: is there a way to save a program without line numbers?
I noted a strange behaviour with my hosted basic engine. If I started/stopped my basic program many times suddenly it does not work anymore. The screen becomes blank. I have to restart the basic engine then, to get it working again. Maybe some kind of memory leak.