[CODE] Bits in general

From: Josh Anderson (joshua18@home.com)
Date: 03/20/00


I have literally spent the entire day reading the list archives
(approximately 300 posts on the subject) to determine the best course of
action for adding flags past the first 32 of a type one way or another to my
mud code.  I have come across three solutions.

1.  Use the AFF2 method, for which I can find think of fairly few problems
other than trying to remember whether a flag was an AFF or an AFF2, etc, and
would probably be a fairly easy (relatively) project for a newbie coder such
as myself, but would mean writing up new code to take advantage of them
every time I run out of flag room again.

2.  Use the 128 bit patch on the ftp site.  From what I've read, there
are(were) quite a few problems with patching this in to get it to work, I
read install times of anywhere from 6 to 40+ hours to get it fully working,
especially in conjunction with OasisOLC, which is what I use. (2.0)  Also,
this is quite a bit more difficult to code in in general for someone of my
level of experience and I'd more than likely meet with not much more than
frustration should I try to patch it into a version of code that is far
newer and heavily modded than the code it was designed for (I'm using bpl16
and it was made for bpl11(?)).

3.  Use bitfields, as so proudly proclaimed by Mr. Edward Glamkowski on at
least three or four dozen different emails.  I've looked at the patch code
for adding 128 bits, and would love to look at the code for the bitfields,
but unfortunately I can't find the newer version of the patch anywhere on
the ftp site (I read about one created for bpl15) and can only find one
created for bpl8, which again really doesn't help me much 8 patch levels
later.  If Mr. Glamkowski ever did make a patch for this as he mentioned he
would on at least half those emails, I can't find it.  If anyone out there
has any newer code for bitfields, I'd love to see it, especially if it would
work with Oasis.

After examining my options, I find myself leaning more towards bitfields if
only because once I got them in I wouldn't have to worry about adding new
code to handle extra flags pretty much ever again, not that I think I'd use
up 128 flags per type any time soon.  However, if coding bitfields in would
be harder than the 128 bit patch (doubtful in my case) then I will probably
end up using the AFF2 method if only because I think there's a chance in
hell that I'll actually be able to do it successfully.

When answering/making suggestions about this, please keep one thing in mind.
I really am not worried about portability in this case, as I don't plan to
be jumping the code around from server to server very much.  Unless there
would be big problems (caused by the bit code) moving the code from a
windows machine to a linux/unix server, I'm not too terribly worried about
it.  Also please no flames about windows, I've honestly had better luck with
that so far than unix ; )  *is a *nix newbie too*     Thanks.

Josh Anderson
joshua18@home.com


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT