A person in IRC channel suggested instead of using an array which is 4 bytes use bitmap which is 1 bit and I can get the color(x,y) to detect collision and so on and I can have lots of layers using colors instead of array.
Can I do that in AMOS? If yes, how does that work exactly? What modification I need to do on my source code for that?
Yes you could do it like that, but you would be restricted in the number of values you could use. For example, for a 16 colour (4 bitplane) screen you could only use values 0 to 15 for each location. Set the values by using
Plot X,Y,COLOUR for each individual pixel. There are also instructions for drawing lines too, which will be much quicker for drawing wall locations
Use
PIXEL_COLOUR=Point(X,Y) to get the value of a particular pixel.
You don't to change a huge amount to your code. Just code a routine that converts your level data into an image (a nested FOR...NEXT loop should be sufficient), and alter your detection routine so that you check the pixel value on the hidden screen instead of the dimensioned array.