Good point, i can use getPixel to retrieve the color value and based on that 'know' if it is walkable.

Cheers.

Jiri

Hans Wichman wrote:
Hi,

why not use an image? Eg use an image that represents your area, lookup the
pixel values, AND them and decide what you can or cannot do in that area.

greetz JC

On Mon, Mar 30, 2009 at 12:41 PM, Jiri <jiriheitla...@googlemail.com> wrote:

I have a byte question.
I have to store a walkable area so a character 'knows' where it can walk or
not. Currently I am using a multi-dim array based on the x and y pos of the
tiles .

so [[1],[0],[1]..etc]

where pos(0,0) => array[0][0] => 1 (walkable)

I was wondering if I could store this using a bytearray, for storing and
possibly faster lookup using bitwise operators. I am very knew to this, so I
am ot sure where to begin and how to deal with it.
The range of int is sufficient to store all the data, because a full
walkarea would take 370560 (772*480) elements in the previous mentioned
multi array.

I could be completely wrong, but would like some advice.

Jiri


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to