[MUD-Dev] Re: let's call it a spellcraft
Brandon J. Rickman
ashes at pc4.zennet.com
Thu Sep 24 19:43:07 CEST 1998
On Thu, 24 Sep 1998, Adam J. Thornton wrote:
> On Thu, Sep 24, 1998 at 12:52:59PM -0700, Brandon J. Rickman wrote:
> > You are advocating a very rigid and inhumane programming practice. Some
> > thought should go into how numbers are important to the game, not to the
> > CPU. Player stats ranging into the thousands would be irritating, stats
> > in the millions incomprehensible. A player walking around with 2^31 coins
> > in her pocket is still a bug, even if the code is bulletproof.
>
> I think we're talking about two different things here.
>
> The implementation of coin class shouldn't arbitrarily restrict the number
> of coins to anything less than MAXINT.
MAXINT is pretty big. Sure, it is nothing compared to infinity, but it is
big beyond any useful human scale. I agree with with some of the
original sentiments of this topic: I don't care if a coin class is
arbitrarily restricted (it always will be, by MAXINT), as long as it is
not arbitrarily restricted at a useful scale. At a certain magnitude
the possible integer values are beyond practical use. But since no one is
paying attention to numbers in that range it is open to all kind of abuse.
Plus your "carrying capacity" code or whatever has to be very tightly
coded lest some new code doesn't violate the old constraint.
> However, constraints like
>
> if (player.current_capacity + item.bulk) < player.max_capacity) are both
> useful and necessary. Same with
>
> int add_to_player_strength(player_t player) {
> ... }
>
> If memory is *really* at a premium and stats below 20 are the norm, maybe
> it makes sense to define strength as an unsigned char rather than an int.
> Even so, most compilers are going to align it for you anyway. If Bob The
> Dwarf has a strength of 14, then maybe it does make sense for Godzilla to
> have a strength of 235,933. Why not leave yourself the option?
This sounds like a thread from rgm.admin from long ago. I have a problem
with any kind of universal continuum of character stats:
Does Bob's strength of 14 make him a strong Dwarf?
Is Godzilla with a strength of 235,933 strong for a Godzilla?
When can a very strong Dwarf beat a very weak Godzilla?
Opening these numbers up to near-MAXINT values doesn't contribute anything
helpful. IMHO.
- Brandon
More information about the mud-dev-archive
mailing list