tile collision
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.
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?
how you move your character? 1 pixel at time or one tile at time?
I move the background one tile at a time. The tiles are 16*16 pixels in size.
By the way i''m using C++ with DirectDraw7
By the way i''m using C++ with DirectDraw7
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement