[CF-Devel] object movers

Peter Mardahl peterm at alfven.EECS.Berkeley.EDU
Sat Apr 7 13:34:21 CDT 2001


>
     
     
     >
     
      Is there really any fundamental difference between a mover and a teleporter?
     
     >
     
     
     >
     
      I could probably make a good argument for a teleporter with all the same
     
     >
     
      options for selecting what gets teleported.  Is there really any reason to
     
     >
     
      have a separate object?
     
     
Well, movers are very easy to set up in chains because they're directed.
I suppose you could do the same thing with a teleporter--but when I
first implemented it I considered it enough of a difference in
action not to add all this stuff to a teleporter but rather simply
create a new object, which would have all these extra properties
that a generic teleporter doesn't really need:

1)  A habit of moving something 1 square instead of arbitrary,
the direction of motion being easily determined by where the mover points

2)  the ability to FORCE whatever-it-is to move in that track by paralyzing
him

3)  an ability to define the speed of movement

If you muck around and break the existing implementation, I expect you
to fix all the maps!

I think it's sensible to have a separate object rather than
some sort of monstrous, do-all teleporter....

I mean, why don't we get rid of "teleporters" and simply put all
mover and teleporter functionality into an exit????

PeterM

>
     
      I guess I would argue that the best way to decide if you should have one
     
     >
     
      object type or several is to figure out which way leaves you with better
     
     >
     
      code.  If you're reusing most of the same code for two different objects,
     
     >
     
      it's probably better to have a single object.  If you're having too many
     
     >
     
      conditionals, then it might be time to split it into multiple objects.
     
     >
     
     
     >
     
      Of course, that's rather subjective.
     
     
Well, I'm definitely on the side of a separate object for
exits, movers, and teleporters.  I think they're all different "enough".

PeterM

    
    


More information about the crossfire mailing list