I've been reading many posts on the subject today and have plenty of good ideas. I completely understand the concept of creating essentially a grid of (16x16) metatiles and dividing by 16 to determine an object's position relative to that grid (or dividing by 32, for instance, to get the object's position relative to each tile)...this is essentially how I've done collision detection in several environments, so I get the core concept just fine). Most posts seem to suggest that a new attribute table is generated...sort of a collision map... to handle each of the four tiles' type and 'solidity', and then reading from that table and comparing it to an object's position to determine the result.
Originally, my concept was to assign each tile number an attribute (or maybe rows of tiles an attribute ... $0-$0F= walkable, $10-$4F = solid, etc...) then use the grid position to determine what 'tile' was in the player's position to handle the result.
I am not sure what the most efficient way to handle this data would be. I know that the former would allow for more diversity while the latter seems might be easier to implement? But aside from that - I'm not completely sure the best way to store this data (something similar to loading nametable, perhaps?) or the best way to actually find the character's grid position (I can do this easily with multiplication and division in other environments, but trying to figure out the most efficient way to do it in ASM).
I have found a few methods. Are there any you guys would suggest? (for right now, simple top down engine, no screen scrolling).
Thanks!
Originally, my concept was to assign each tile number an attribute (or maybe rows of tiles an attribute ... $0-$0F= walkable, $10-$4F = solid, etc...) then use the grid position to determine what 'tile' was in the player's position to handle the result.
I am not sure what the most efficient way to handle this data would be. I know that the former would allow for more diversity while the latter seems might be easier to implement? But aside from that - I'm not completely sure the best way to store this data (something similar to loading nametable, perhaps?) or the best way to actually find the character's grid position (I can do this easily with multiplication and division in other environments, but trying to figure out the most efficient way to do it in ASM).
I have found a few methods. Are there any you guys would suggest? (for right now, simple top down engine, no screen scrolling).
Thanks!