Now I'm having trouble with coming up with a formula to get and apply the correct tile attributes.

The wiki has this but I don't know what to make of it. I see the << are bit shifts, but other than that I have no idea what is going on.

Code: Select all

`value = (bottomright << 6) | (bottomleft << 4) | (topright << 2) | (topleft << 0)`

So, what I can't do in a simple formula is, knowing a tile's coordinates:

1 - know which byte to read.

2 - get the attribute for it from that byte.

I've managed to get it done by creating 64 case switches, but needless to say that is incredibly slow.

I'm programming in GML but I guess a solution in any language would be all I need.

edit2: Is a lookup table the answer to problem #1?