Archived

This topic is now archived and is closed to further replies.

computer_guy

tile collision

Recommended Posts

Hi, I''m trying to make a 2d side-scroller and am wondering how I would do tile collision. Could someone tell me or direct me to a good resource. Thanks in advance.

Share this post


Link to post
Share on other sites
It''s depends how you move your character, how your character is presented (a circle, a rect)...
how you move your character? 1 pixel at time or one tile at time?

Share this post


Link to post
Share on other sites
Each tile should have a "Walkable" property. If the character is on tile 2,3 (x,y) and the player is trying to move him to the right (3,3) then test that tile for walkability. If it''s walkable move the character, otherwise don''t.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
how would this be done if your moving one pixel at a time?

Share this post


Link to post
Share on other sites