Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

a new idea for data storage - bit boards

This topic is 6541 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i was reading that article about chess programming, and it got me thinking about bit boards. so i tried to figure out how to do an array of true bools. cuz the reg. bool is just an int, i think. i have an idea that it would be really useful, but im not sure. tell me what you think about having access to an array that comes in dimensions of 8''s, i.e. 8, 16, 24, 32, etc, and uses real bools, not ints... it would use an array of bytes, or ints, etc, to hold all the bits, thats why it would have to be in sizes of 8''s. but you could access them like an array, i.e. if (ChessBoard[8][3] == true) { do something... } whatever... do you think it would be cool? or is it just a waste of time? i already know how to do this, i just haven''t tested it out yet, and i''m in the business of other stuff right now, so i haven''t really given it much time. Just tell me what you think and if you''d like to know more... farmersckn Sometimes even chickens need to eat... Don't bang your head against a wall just to enjoy the good feeling when you stop.

Share this post


Link to post
Share on other sites
Advertisement
I would save space at the expense of clock ticks...
Would be a good thing for the seive of... of... ''that guy who figured out how to find prime numbers fast'' if you wanted to find LOTS of primes

Bad for chess, cause there''s a ''named & numbered'' amount of squares

Might be good for saving game states to disk... course you''d need one for each type of piece for each player...

Share this post


Link to post
Share on other sites
not really as slow as one might think, really, only as slow as plotting pixels in vga mode 13h, cuz you could use bit shifts to access the different bits.
farmersckn

Sometimes even chickens need to eat... Don't bang your head against a wall just to enjoy the good feeling when you stop.

Share this post


Link to post
Share on other sites
yes exactly, you have to bit shift for each number instead of just using it...

course there will be less data to move around... hum, hard to say what would be faster...
Ask MindScape

Edited by - Magmai Kai Holmlor on June 25, 2000 1:45:41 AM

Share this post


Link to post
Share on other sites
Magmai, I think the sieve you''re referring to is the sieve of "Aristophne" (and I''m pretty sure I totally butchered the spelling of that name, because I''ve never actually seen it written down.

My programming teacher suggested we use that last year in a program that was designed to test a prime number equation, and it was VERY fast.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!