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

I had a thought while ago. I read about bitBoard and I was curious, could be the concept be applied in 3D?

What I mean is to use a 3D matrix of boolean value, which correspond to the voxels. So that one could use the and, or, not, ecc bit operations to calculate if a position for example is occupied or not.

for example let's consider the two objects (represented by 1's):

 object1              object2            result: no collison
 0000000000           0000000000         0000000000
 0001110000           0000000000         0000000000
 0001110000     &     0000000000    =    0000000000
 0001110000           0000000011         0000000000
 0000000000           0000000011         0000000000
 0000000000           0000000000         0000000000

would it be useful? Are there already games that uses this trick?

share|improve this question
up vote 1 down vote accepted

It could be useful under the right circumstances, a CPU can do operations like that really fast, and a GPU can blaze through them.

However, you must realize the limitations of this method, when you say 3D I don't think it's applicable to your situation. 3D matrices grow awfully large for relatively little side length, straining memory and requiring so many of those fast operations that the end result is pretty slow. Apart from that, there is no efficient way of rotating such matrices.

In total, I can't think of anything more complicated than a Mario style game which would be suitable for such a method.

share|improve this answer
have you considered the fact that if one use voxels, one already has a very large matrix? it would be to simply add one parameter... the 0,1 index if the matrix is occupied... – Pella86 Dec 24 '11 at 14:22
If you use a voxel rendering engine (and I really wouldn't recommend that in any case) the voxel information needs to be compressed, you can't toy around with the raw matrices for serious voxel rendering. You can't have that much memory, and even if you could you wouldn't have the processing power to handle uncompressed voxel data. – aaaaaaaaaaaa Dec 24 '11 at 15:29

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.