Reading this post from tokumaru: http://nesdev.com/bbs/viewtopic.php?p=4617#4617
I've started to think about my collision system for backgrounds. I'd like to apply the idea of the collision points for every object.
But 1 bit for every tile seems too much, I'm thinking about doing a 16x16 collision map where each bit represents a 2x2 tile zone.
Then translate the object to up to 2 bytes per tile row (no object should be greater than 64pixels wide) and mask BG with the object via AND, if some of the results are not zero, you have collisions. Then drop object velocity (in x if collision was x or in y if collision was in y) and correct its position.
Using this schema, how could I add map zones that can be jumped in from the bottom (more bits)?
How do you do your background collisions?
I've started to think about my collision system for backgrounds. I'd like to apply the idea of the collision points for every object.
But 1 bit for every tile seems too much, I'm thinking about doing a 16x16 collision map where each bit represents a 2x2 tile zone.
Then translate the object to up to 2 bytes per tile row (no object should be greater than 64pixels wide) and mask BG with the object via AND, if some of the results are not zero, you have collisions. Then drop object velocity (in x if collision was x or in y if collision was in y) and correct its position.
Using this schema, how could I add map zones that can be jumped in from the bottom (more bits)?
How do you do your background collisions?