VBGamer |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RE: Free-Form vs Tile-by-tile Walking... Jay Wheeler (5 replies, 0 views) (2000-Jul-4) Free-form is certainly makes for a better game, but what you have to remember is that if you have "n" objects, your collision detection grows to O(n^2). That's because you have to check each object against each other object, and it grows out of control rather quickly!
What you might want to consider is making your map editor tile based, but still have your characters moving freeform. Then, you check which tile each character is in and your collision detection will be much, much faster. You'll still have O(n^2) running time for all the characters, but at least the buildings and stuff that don't move will be easily handled.
You can optimize this further by storing which general "area" your character is in and only checking against the other freeform objects in the same "area", but that might get tricky.
|