Quote:
Originally Posted by coreys
Hm, that's true. It's always nice to allow for flexibility, though I'm thinking the line collision detection would be slower than normal tile collision detection (some more math involved there), which is why I suggested using normal tile collision for everything else. But if the performance difference isn't particularly noticeable would be best to just do it all as you suggested.
|
If you segment the level into "zones" of lines, you're only tracing against like 10-15 lines max, really. It's not too intense. I've had a test NPC on N-Pulse where you draw lines around players and they have to slash them (And they use the same line intersection algorithm to detect the point where hit, and they dynamically segement at that point, it's cool =3), and it traces up to around 50 lines at once, as there's no optimization on it whatsoever. Myself, nor other players, have complained with it or visibly slowed down when I used it either.