Advertisement

2d collision detection

Started by March 31, 2002 08:48 PM
5 comments, last by tHiSiSbOb 22 years, 10 months ago
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.
why doesnt it work?
Advertisement
why doesnt it work?
It will not stop the char from walking on the wrong tiles.
----------------------------------------------------"Plant a tree. Remove a Bush" -A bumper sticker I saw.
then u''ve done something wrong. fix it.

thanks,
shurcool
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.
Advertisement
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.
______________________________Pretty guy for a white fly.

This topic is closed to new replies.

Advertisement