Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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
add comment

1 Answer

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
1  
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
1  
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. –  eBusiness Dec 24 '11 at 15:29
add comment

Your Answer

 
discard

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.