Essentially, it is that technique, but in quadtree form to optimize searching. Hopefully, it won't cost O(n?) in the worst case scenario, like the AABB array technique, but rather, by my half-assed guessing, O(n log n).
Screw circles, they should learn to be squares like the rest of us :3
Would you mind showing me/us your code? I can review it for you and tell you what you should and shouldn't do (it's nice to have some sort of structure rather than just a hodge-podge of things all glued together with paste, and, the fact you're using globals makes me lean towards the latter).
Also, a moderator should split this thread so we stop intruding on Wriggle :V
Well here's what my game looks like:
I have a main class that created for my by XNA, it does all the drawing and processes, it has the usual framework much similar to Danmakufu, I start by making some classes, like: Bullet, Player, Frame, etc. I create instances of these classes in the main game class:
Player GamePlayer;
Frame GameFrame;
and with bullets:
static int MaxBullets;
Bullet[] BulletArray = new Bullet[MaxBullets]
and then in initialize I do a for statement to really create them all, so basically every bullet has a variable I can call to in other methods, as their part of a big array, and I can draw and update all of them, the bullets have a method that looks kinda like this:
public void Shoot(Texture2D texture, float speed, float angle)
{
Active = true;
Speed = speed;
etc...
}
That method makes the bullet active and gives it what it needs, but because the array used to access each instance is in the main class, classes like Player and Boss can't access it and thus can't create bullets...D=