What it does is it opens the bitmap for reading, reads in all of the pixel values, checks which ones are white and saves those into an array so the player can collide on the lines you drew.
You will have to change a few things. The first is here:
rem get level image and save it
if file exist("level.bmp")=1 then delete file "level.bmp"
create bitmap 1,6400,480
for t=100 to 109
if image exist(t)=1 then paste image t,(t-100)*640,0
next t
save bitmap "level.bmp",1
delete bitmap 1
This code saves the level to a bitmap. You can remove it actually.
Open to read 1,"level.bmp": Rem Colour Image
Just change the name of the image you want to cut away the black. Remember, it has to be a 24-bit bitmap.
Rem Read in the pixel data into the array
create bitmap 1,ImageWidth,ImageHeight
For By = ImageHeight-1 to 0 step-1
For Bx=0 to ImageWidth-1
read byte 1,Blue
read byte 1,Green
read byte 1,Red
if blue>253 and green<8 and red<8 then blue=0:green=0:red=0
set current bitmap 1
ink rgb(red,green,blue),0
dot Bx,By
Next Bx
h#=imageheight-1
p#=by
per#=100/h#*p#
pos=160-(per#/100*160)-2
ink rgb(255,255,255),0
text 240,210,"Loading..."
box 240,230,400,250
ink 0,0
box 241,231,399,249
ink rgb(255,255,255),0
box 242,232,pos+242,248
sync
Next By
Just replace the bottom part with this. What it does is it opens a bitmap 1, checks which ones are blue and changes those to black, and writes the read values as color pixels to the bitmap.
You will have to add a save bitmap at the very end of the file.
TheComet
Make the paths of your enemies easier with WaypointPro!