Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The game I'm creating is a bullet hell game, so there can be quite a few objects on the screen at any given time. It probably maxes out at about 40 enemies and 200 or so bullets. That being said, I'm splitting up the playing field into a grid for my collision checking. Right now, it's only 8 cells. How many would be optimal? I'm worried that if I use too many, I'll be wasting CPU power. My main concern is processing power, to make the game run smoothly. RAM is not a big concern for me.

share|improve this question
You are seriously underestimating the power of the hardware. Ask again if you are talking about 500 enemies and 20000 bullets. – API-Beast Aug 29 '12 at 11:53
Extending on what Mr. Beast says, unless you have a problem, you're currently wasting your time. For collision between 240 objects, you don't need any kinda of partitioning on average computers. – William Mariager Aug 29 '12 at 12:34
up vote 2 down vote accepted

you could use an algorithm to determine the number of cells based upon the number of items contained within a given cell. dynamically increasing or decreasing the number of cells dependant on the content start for example with 4 areas if one of the 4 become congested, split this up into 4 new areas. (cant for the life of me remember the name)

share|improve this answer
It's called Quadtree. – API-Beast Aug 29 '12 at 13:41
thats the one Thanks :) – RoughPlace Aug 29 '12 at 13:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.