ID:2535465
 
Applies to:Dream Seeker
Status: Open

Issue hasn't been assigned a status value.
Background, for use case: I'm working on an (almost/effectively) infinite map scrolling set-up for a survival crafting game with a mutable world, like a top-down Minecraft or Terraria. My current solution for visually joining the map chunks together involves using vis_contents - each chunk is held in the center of a z level that is surrounded by a buffer zone which uses vis_contents to show the turfs and their contents of the corresponding tile the next map over. Anything that tries to move into the buffer zone has its movement redirected to the tile being so mirrored.

The problem is that when an object moves across the boundary from "properly in the same map chunk" to "in a different map chunk but still visible", there's no gliding visible for that first step across the boundary, even though on screen it is apparently just moving from one tile to the next.

I would propose to fix this by having the client animate movement if a movable object goes from being drawn in one tile to being drawn in an adjacent tile, whether it's in contents or vis_contents.

I would hazard that for most use cases, this would be the desired behavior, and it could perhaps be controlled using an appearance flag for the corner cases where it would not be.

I'm sure there are workarounds but all the ones I can think of involve ditching vis_contents in favor of essentially faking vis_contents by creating objs to reflect any atom that exists in the buffer zone, which is exactly the kind of cumbersome solution that vis_contents seems designed to obviate?

Apologies if this has been requested before. I know I've seen discussion of other vis_contents gliding improvements be met with the response "not feasible" but I couldn't find one dealing with this, so I'm prepared for that to be the response here. On the other hand I know that vis_contents allows for gliding when moving between turfs in the same vis_contents and I'm hoping this case is more like that.
This might be too difficult but I'll give it some serious thought. The work here would be client-side of course because the client controls gliding, which is actually good because for the server this would be much harder. The trick is, on any non-glidable jump, the client would have to check the old turf (and possibly its neighbors) to determine if the new turf was visually adjacent and if so at what position. This could be a really sticky problem.

Your concept actually sounds like it'd be a perfect fit for my dream project, which is Z-level joining. I've wanted to do that for so long but I don't think it'd be as widely used as I've always hoped.

I can think of one workaround currently, which is to use step offsets and get rid of gliding entirely. With pixel/step movement this is baked right in; gliding isn't in play unless world.fps and client.fps don't match.

Anyway I'm gonna keep this on the docket and make sure to give it the proper attention once 513.1506 is released to see what our options are.
Oh, I would use the heck out of Z-level joining and it would obviate a lot of the work I'm doing. It would make my game faster, it would up the number of map chunks that can be loaded (because I could eliminate the buffer zone of mirrored turfs around the edges of each z-level chunk) and thus the theoretical maximum number of players roaming free in the world, it would make loading and swapping chunks faster (because no need to mirror tiles).

I think it's one of those things where no one's doing the sorts of things it would be good for because it's not there to use and the ways to approximate/simulate it are a lot of work that would ultimately be redundant if it's ever added as a native feature. I think people will go hog wild for it if you do it.

Just as an example: I've actually put off working on this game in the hopes that z-level joining would be put in and make a lot of the most finicky groundwork for it redundant.

Step offsets... hmm, there are aspects of this project (a lot of top-down grid-based building) that make whole-tile movement a better fit, but it's early enough that I can rethink a few things.

My main obstacle to allowing pixel steps is that I need every directional tool-use or tile-place to target exactly one square.

But I guess if I switch the visual indicator from being centered to being off-center based on handedness then I have a visually intuitive way to resolve "ties" between two tiles that could each be receiving the use.

Okay. I'll switch to steps for this project but please consider this an enthusiastic endorsement of z-level joining as a feature and allowing gliding from literal turfs to visual contents downgraded to a "might be nice if".