2d collision detection
I am making a 2d rpg and i am having trouble with the collision detection. So far i have tried to load up a map into an array with 0''s and 1''s. 0 for land you can walk on and 1 for land you cannot walk on. When i hit the left key for example it checkes to see if the tile to the left is walkabble. This is the inly thing i have tried but it did not work. Can n e 1 give me some suggestions
----------------------------------------------------"Plant a tree. Remove a Bush" -A bumper sticker I saw.
It will not stop the char from walking on the wrong tiles.
----------------------------------------------------"Plant a tree. Remove a Bush" -A bumper sticker I saw.
Post some code...you can''t expect anyone to be able to help you with your problem with the information you gave in your first post.
Posting some code would be nice... with a routine so simple we can''t really tell what''s wrong without it.
(For the rest I am assuming it is in C)
Common problem? check your "if" statements and loops
(always ==, not =, in an if statement, etc.)
______________________________
To make sure teen mothers don''t just dump their babies in trash cans-
We''re going to let them kill them instead.
(For the rest I am assuming it is in C)
Common problem? check your "if" statements and loops
(always ==, not =, in an if statement, etc.)
______________________________
To make sure teen mothers don''t just dump their babies in trash cans-
We''re going to let them kill them instead.
______________________________Pretty guy for a white fly.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement