RolePlayGateway / rpg

RPG's official game.
https://www.roleplaygateway.com/
4 stars 3 forks source link

Landmarks #8

Open shentino opened 4 years ago

shentino commented 4 years ago

Apologies if this isn't in the correct location, but I just thought of a nifty idea.

Landmarks.

Tired of pesky paths causing your poor players to run in circles?

No more!

With this feature, you can designate a location as a landmark, and the code will leave breadcrumbs of a sort by spidering out a bit, perhaps djikstra style, to leave hints in nearby rooms on how to actually get to the landmark.

Perhaps some sort of primitive flood fill algorithm that steps out one node at a time, to a configurable maximum distance, and leaves little notes on the nodes as to which exit to take to get to the landmark.

Kudos to the original authors of the SIMud mudlib for implementing this on an X-Y geography grid with compass directions. It's less straigthforward than some taxicab geometry given the non-cartesian nature of the world used in RPGW, but it seems doable.

Caveats:

Make sure that the node you get going forward has a proper reverse exit leading back to where you came from so that one-way exits don't accidentally cause dead ends

Make sure that consistency is maintained. You wanna keep track of "hop count" to make sure that following the gingerbread crumbs actually does get you closer to the goal

inspirations:

RIP for routers.

shentino commented 4 years ago

In a nutshell the mudlib version marks an outdoor location as a landmark, and any characters in the containing area are given the compass direction and a rough distance to travel to bring their character to said landmark. That's the cartesian version, my fancy is that RPG would have to do some sort of node-based method with distance metrics