ID:273361
 
would it be best to use a matrix system you created, for every pixel. have every turf/obj on a map come with blocked matrices of where you can't go. make movement, not utilizing byonds engine except for graphical display goes. Or would that be laggy/impractical. This idea makes me happy, feedback?
That would be impractical.
Could be practical, but you'd need to be clever about it. Make sure you're not checking the full pix-matrix on pix-matrix collision with everything all the time. The trick with collision detection is to eliminate as much as possible. Start off by using the BYOND tile system to your advantage - keep everything's centre in the square that matches up to where they are, and loop through everything in range(maximum distance things can collide) rather than looping through world. Then do simple axis-aligned bounding-box collision tests to determine if you should check further. If things AABB collide, then you might need to go into the matrix.

EDIT: I should note that pix-matrix collisions are actually used in real games and things. Usually old ones. On some hardware, it's very easy to test if two sprites are overlapping. But it's not usually how modern games work. You'd probably be better off just having a series of axis-aligned bounding boxes or spheres (One or the other) for things and testing against those. You lose fidelity, you gain much better speed, both in-game and in-development.
In response to Garthor
only checking for collisions with turfs and mobs in close proximity?
In response to Jp
Ah, then that answers my question to garthor.

Developing time ^_^

tommorow's goal: pixel based movement.

next goal: Creating cool lighting effects on byond... you'll see questions tommorow.