Re: LZ-Adv: Centipede


[Prev][Next][Index][Thread]

Re: LZ-Adv: Centipede



> What is the best(fastest, most memory efficient) way to keep track of the
> conditions of the mushrooms and the centipede?  example- a matrix with each
> element having a mushroom, a centipede, player, or nothing, or mem locations
> for every mushroom and centipede, holding the X and Y positions.

  Well, using a list of each object would be more mem-efficient (unless
you have an object in every possible location), and faster for "does
anything of this type exist" searching, but on the other hand slower for
"what is the object in this spot" searching - you could make it faster by
keeping them in order, but it's probably not worth it to do that - try it
& see how slow it is - what I'm getting at is: you decide.


                     /***********************************
                     *           Daniel Knapp           *
                     *       FeatherWate Software       *
                     *     email: dankna@bergen.org     *
                     *                                  *
                     *      Whose account this is,      *
                     *         I think I know.          *
                     * The sysop is in Berkely, though. *
                     * She will not see me typing here, *
                     *        To watch this Mac         *
                     *          Refuse to go.           *
                     ***********************************/



Follow-Ups: References: