View Single Post
  #6  
Old 01-30-2010, 05:43 AM
12171217 12171217 is offline
Banned
Join Date: Jan 2009
Posts: 453
12171217 has a spectacular aura about
Quote:
Originally Posted by coreys View Post
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.
Reply With Quote