[crossfire] Re: Map Protocol Question

Alex Schultz AlDragon at gmail.com
Fri Jul 8 23:23:23 CDT 2005


Mark Wedel <
     
     mwedel at ...
     
     > writes:
>
     
        One problem right now is that inter map exits all basically appear the same, 
     
     >
     
      that is, of type exit.  So within the server code itself, it can't easily
     
     >
     
      detect correct behaviour (other than have a list of names to look at).
     
     >
     
     
     >
     
        Now in some cases, even teleporter type exits should be treated differently. 
     
     >
     
      Think of all the shop mats - in those cases, we actually want to suppress the 
     
     >
     
      newmap command - I'd have to think about the way to properly deal with it, but 
     
     >
     
      if you look at the scorn shops, where the map is visible from the shop and
     
     >
     
      vice versa, it is arguably wasteful to resent the entire map when most seems
     
     >
     
      to be the same.  But probably no easy way to handle that, so don't worry
     
     >
     
      about.
     
     >
     
     
     >
     
        But the other point is that there are some maps where for style reasons, you 
     
     >
     
      may want to hide the locations a bit - I'm think of some maps where there are 
     
     >
     
      multiple levels on the same logical map (to deal with things like levers and 
     
     >
     
      buttons ) - while each level is perhaps non secretive, showing the relation to 
     
     >
     
      each other might be ugly.
     
     
Yes, based upon the issues you're talking about in the three above paragraphs, I
think I've thought of a system that should work well:
-Give exits and teleporters a new attribute which for the purpose of this
explaination will be rerfered to as 'secrettype'
-the 'secrettype' would be any value from 0 to 255, as well as -1
-a 'secrettype' of -1 means that the client receives no data about it's coord,
for what has been rerfered to as 'secret maps' in this conversation
-for values of 0 to 255, all coord data is send and the client.
-values of 0 to 255 are an id of sorts that is sent to the client, the client
then appends this to the mapname for storing purposes which fixes asthetics in
non-secret areas. To make it look nicer the client considers it a seperate map
for caching purposes even though it knows the coords on the real map.
-a exits and teleporters which do not have a 'secrettype' defined default to 0

And maps that need secrettype set would need (either for plot, cheating, or
asthetics) to be set manually, possibly with the assistance of a script to
detect possible potential spots (i.e. maps with lots of teleporters to itself
would be good things for a script to look for).
This method would take significant effort to adjust old maps where applicable,
however I feel that it would provide the best end-user experience and would at
the same time be not too much harder to modify maps for than something like the
regions was.

>
     
        OTOH, maybe we jsut live with that.
     
     
That's also an option, though I consider that an undesireable one.

>
     
        Other consideration is how to deal with world maps - I guess teh client
     
     >
     
      could be smart enough to figure it out.
     
     
If the map name was sent with the newmap command, as well as tiling data (names
of the maps that it tiles to), then it could deal with tiled maps easily and
properly.

>
     
        One other thought - with the newmap command, for non secretive maps,
     
     >
     
      probably want to include the mapsize with it.  That way the client could be
     
     >
     
      more clever about storing away the data after the player leaves and/or
     
     >
     
      figuring out where on the fogmap it could place this map and not destroy
     
     >
     
      existing data (the idea here being if you come back to the map, you could get
     
     >
     
      your old fog data back)
     
     IMHO sending that data for non-secret maps would be a Good Thing (tm).

Alex Schultz


    
    


More information about the crossfire mailing list