Re: Object Stacking

From: Del (
Date: 09/05/01

George Greer wrote:
> >As such, is there a need to keep all the items in the game if they're all
> >identical?  Or, could a new function be added to have one item in the
> >game for that character, followed by two variables such as the IDNum of
> >the player, and the number of the item a player has?
> I suppose you could.  You'd just be changing the view from "the player has
> objects" to "the objects have players."  Whether or not that's a better
> view I couldn't tell you.  Not all objects are going to stack, such as:
> bags, wands, drink containers, staves, etc.

Please correct me if I am wrong. If a player, mob or room has an object,
does it not have an actual copy of the prototype? The question Caniffe asked
seems to be a good one. Why have a copy of the object? Why not have a single
variable or small struct to point to the prototype for every copy of that
object? All references to that object should just get the information from
the prototype. If there is an object that get's changed, a new prototype
can be made? Effectively the player just has a list of vnum's of the objects
that they have vice a copy of the object. Or is this what you are planning
with this new stacking idea? Would this idea not cut down on memory usage

   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 12/06/01 PST