Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Just a general question: What do you think about the ranvier co-ordinate system automatically attaching all adjacent rooms? #1

Closed
ratacat opened this issue Dec 17, 2018 · 2 comments

Comments

@ratacat
Copy link

ratacat commented Dec 17, 2018

I love not having to explicitly define all exits. And the coordinate system seems to have a lot of benefits in the long run, but I'd really love to be able to define a wall between rooms and remove some of the automatically linked exits. I think you could just do this in the room metadata, but Shawn seems to think that's a hacky way to do it, and it would make pathing for mobs more complicated. I imagine it would, but also, it's really nice not to have to add tons of extra rooms in between all your rooms in an area just to enforce the exits.

I was just wondering if thats something you've thought about at all?

@azigler
Copy link
Owner

azigler commented Dec 26, 2018

I also love the concept of not having to explicitly define exits. I believe that both building and navigating an area should be intuitive and appropriately scaled so the player has context for their movement. Issue #98 in Ranvier dives into Ravier's coordinate-based system, and Pinwheel is currently still using that same approach out of the box.

I'm not crazy about how every adjacent room is automatically connected in the coordinate system, but I think it will just take some mental rewiring (on my end) from how I typically think about MUD environments. Shawn seems to argue for a system where walls take up space on the map, and you could consider all hallways to have "dead wall space" on either side of them. When many people think of MUD maps, they imagine a web of nodes that all interconnect to create a game world. In that approach, a room has to have explicitly defined exits to other nodes, which then (usually) reciprocate that connection, creating an illusion of shared space. However, Ranvier's approach seems to envision the game world as a grid, and the immovable tiles, walls, and "dead space" are all colored in black, leaving nothing but the remaining blocks in white (all of which connect). With the right mindset, I don't think the coordinate-based system that automatically creates exits would cause issues for you as you build, and in exchange you gain many benefits (below).

I also agree with Shawn that you shouldn't try to define walls or block exits in the metadata, because that would be tricky when you try to implement something like NPC pathfinding.

Check out the comments at the top of Nodiverse to get an idea of how difficult it is to render a readable, compact 2D map in text.

And while it's tempting to want to treat each area as their own "island" completely distinct from one another except for where some nodes might happen to connect, I think there's a lot to be gained from combining areas at origin points. Then you can stitch together area maps and create realistic Euclidean geometry without overlaps for the entire playing area. Once you have a functional world map like this, you can render it and create actual map images, make in-game ASCII maps, and path NPCs to and from different areas with heuristics. In order for an approach like this to work, the origin points have to be stitched together in ways that prevent overlap, and the best way to achieve that is with a strict coordinate-based system that uses "dead wall space" to express the lack of a room, instead of trying to represent an area as in as compressed of a layout or as few rooms as possible.

Scale will always be a problem. Maybe a room is a massive canyon in one area but then a tiny closet in another. But with a Euclidean layout, you can use heuristics to "weight" these rooms so pathfinding NPCs can understand that a particular room is a not a major road or may incur a movement delay or any number of things.

Hope that sheds some light on this very tricky subject!

@ratacat
Copy link
Author

ratacat commented Dec 27, 2018

Thank you for the awesome in depth reply Andrew! And the great context about the whole subject. That was really helpful for me to go look into everything. I am thinking it maybe makes sense to just hunker down and accept slightly "bulkier" areas, the benefits seem like they're worth it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants