Welcome to the Builder Academy

Question Mapping - asciimap.c

More
03 Aug 2020 09:24 - 05 Aug 2020 03:01 #8825 by doogie
Mapping - asciimap.c was created by doogie
Hi tbaMUD community,

** I edited this and uploaded a fix for diagonals -- apologies for the oversight **

Attached is a revision to asciimap.c that maps from the inside out resulting in more accurate maps, at least from close range. I didn't find a contrib folder, so I'm posting it here.

I moved the up/down indicators to beside the north/south ones because there is more room (think automap/compact) and added a cross indicator for diagonals. I added MXP while I was at it, along with a few other features like noting which rooms are in-zone versus out-of-zone. The resulting maps are clickable for immortals (goto room #) and color coded. Priority is given to in-zone rooms, and exits are more reliable in that the map will show with greater accuracy whether or not exits are connected, are one-way, or depict two rooms that have exits facing each other that do not connect. Because this mapping system is proportional, but often MUD zones are not, 100% accuracy is not possible, but I believe this mapping system is more representative, at least within those bounds.

Cons:
1.) Tracking connections is much more complex, so memory and performance is slightly less efficient than the original.
2.) Diagonals still don't show whether or not they are connected, just that the exits exist. I would like to make this like the cardinal exits, if I can figure out how to indicate it on the map.
3.) I only allow immortals to use it, so maybe it's overkill for mortals?

I believe this system is better because it provides a more accurate representation of what's in the immediate area and adds MXP support. It starts at the center and works its way outward by room, instead of the default which moves in one direction until it can't anymore and then spirals back slowly inward. It's an easy drop-in replacement -- just copy over asciimap.c.

Oh, I also changed the syntax - instead of map ## <world> it is map <world> <##> where either are optional.

I'd love your feedback.

-Doogie
Attachments:
Last edit: 05 Aug 2020 03:01 by doogie. Reason: Uploaded corrected attachment and changed description.

Please Log in or Create an account to join the conversation.

More
14 Mar 2021 16:03 #9787 by doogie
Replied by doogie on topic Mapping - asciimap.c
Anyone try this out? Any comments/feedback?

Please Log in or Create an account to join the conversation.

Time to create page: 0.211 seconds