Advertisement

Q about collision detection

Started by December 10, 2002 04:55 PM
0 comments, last by Heza64 21 years, 11 months ago
Hiya. I''m wanting to know if this is a good way to do collision detection with multiple objects...for wall, key, health, or montser. I have if this way when the user moves(code changes depending on direction, but this doesn''t): Is there no wall touchin'' player if moved? WTD = 1 Is there a key touchin'' player if moved? WTD = 2 Is there a health touchin'' player if moved? WTD = 3 Is there a wall touchin'' player if moved? WTD = 0 Is there a monster touchin'' player if moved? WTD = -1 Then, is does a select case using WTD and does the approriate thing. There is only one monster, key, and health in each room and this will only check for things in current room. None of those fellas are ever overlappin'' each other. Is this the best way to do it? It does work, i''ve tested it, but it just looks like there should be a more efficient way, ya know? Thanks
::Thinks to himself: console, console, console...:: -Heza
From what I gather, movement in your game is simply done in eight or four directions and not based on the angle of the player/monster. If this is the case your method is good for this type of movement and I don't think there's anything more efficient.

digital radiation

[edited by - directrix on December 10, 2002 6:48:09 PM]

This topic is closed to new replies.

Advertisement