I'm using Sparky's for collision detection in my project. Due to frequently uneven terrain, I've been using a SphereSlide approach with the sliding collision coordinates (I tried just using a sphere, but corners caused a lot of erratic movements, sometimes propelling the player over tall obstacles). This was working great when it was just the player character. Now, however, I turned on checking for all of the other characters in the world (ie non-buildings and non-world), so that they will fall with gravity and, eventually, be able to move autonomously.
My problem is that running the checks for one or two other objects slows me down considerably. I've tried iterating thing my existing characters, running the movement code (at this point it just handles gravity) for only one character per cycle. Unfortunately, this makes the game very jittery and unplayable.
Does anyone have any suggestions on how to circumvent this? Or is the fact that I'm getting such a slowdown with only a few checks indicative of inefficient coding on my end and I should be looking into things?
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose