Idea to skew vehicle tiles and vehicle-local coordinate system

What if as vehicles rotate and their tile locations get skewed, the sprites were also skewed to match?

Ignore the fact that I skewed every tile for this screenshot, that was just the easiest way to code it. Pretend it’s just the vehicle tiles that are skewed. Everything is actually still arranged on a square grid. At a 45 degree angle, this looks pretty darn good, I think.


22.5 degrees gets trickier. Now the tiles are laid out in a 2:1 (or 3:1 at the midline) pattern, so the skewed sprites don’t line up. However, it would be possible to draw the sprites shifted left/right by about 1/4 of a tile to make this look just as good as the 45 degree version. Shifting the tile draw locations by 1/4 of a tile shouldn’t confuse the player too much. They can still get in and out by aiming for the mostly-right location of the tile outside.

Now for a crazier part of this idea… What if movement inside a skewed vehicle was also skewed? Right now, when a vehicle is skewed certain tiles move together and apart. Some things that were 2 moves apart are now 1, and vice versa. I would change that. When inside a vehicle, I would change the movement metric, so that moving in a compass direction moves along the axes of the vehicle rather than on the world compass, and moving diagonally moves to the same tile that you’d end up with the same move in an unskewed vehicle. I think this would actually make for a lot smoother gameplay than we have now with skewed vehicles.

To explain the movement idea:

    Vehicle: Skewed:

      ABC     ABC
      DEF      DEF
     xGHI      xGHI

Currently, moving north from E goes to B in the normal vehicle and C in the skewed vehicle. I would make a “north” move from E go to B in both cases.

Currently, skewing the vehicle brings D/C and G/F closer together, and A/E/I farther apart. I would keep their movement/combat distance the same throughout the skew.

Currently, parking the vehicle in the skewed configuration allows a zombie at x to step into E, which would normally be surrounded by walls. My proposed warping of the local coordinate system would prevent that from happening.

How would that work?

Say, in your example, you’d like to move from F to B. This is possible in unskewed. What about skewed?
Would that result in teleporting over a tile?
How would it be handled from controls? Would pressing ‘7’ (north-west) do the redirect? What about ‘8’ (north)? Would it move the player north or north-west?
What would happen on movement into the vehicle in cases where it isn’t ambiguous? Like from x to E in skewed. How would player be informed of that?

This sounds hard to implement and confusing, especially in curses mode.

The tile idea sounds solid, but I don’t really see how could the mechanics part be sensibly implemented.

It sounds like your semi-unsticking the vehicle from the tile grid and then moveing it around off of the grid. This sounds ok, but I can see some issues. when you try moving from the vehicle to the terrain, how will that work? For instance, if I park my car 1 and 1/4 tiles from my loot stash, do I have to move my loot stash one tile over and then into the tile? Is the car’s cargo area occupying the 3/4 of a tile it just barely gets over onto, or the other 1/4 and then the rest of the car taking the other 3/4 part? It makes sense for driving I think, but it might cause problems when moving items/players from the car to the world.

[quote=“Coolthulhu, post:2, topic:11050”][quote=“sparr, post:1, topic:11050”]What if movement inside a skewed vehicle was also skewed?[/quote]How would that work?

Say, in your example, you’d like to move from F to B. This is possible in unskewed. What about skewed?
Would that result in teleporting over a tile?
How would it be handled from controls? Would pressing ‘7’ (north-west) do the redirect? What about ‘8’ (north)? Would it move the player north or north-west?
What would happen on movement into the vehicle in cases where it isn’t ambiguous? Like from x to E in skewed. How would player be informed of that?

This sounds hard to implement and confusing, especially in curses mode.

The tile idea sounds solid, but I don’t really see how could the mechanics part be sensibly implemented.[/quote]
Moving from F to B would be a single press of ‘7’ in both situations. Movement would take you to the same vehicle part in a skewed vehicle as in an unskewed vehicle aligned on the same major axis. Yes, this would result in you teleporting past a tile on the main grid, but that would be entirely transparent to you, since the vehicle would be visibly skewed as well.

Off the top of my head, ambiguous diagonal movement into a vehicle would be handled internally by simulating a move “into” the vehicle first along an orthogonal direction, then a move along the vehicle axis. So in the skewed example, moving north from x would go to D, and moving northeast would also go to D because it would be processed as east (into the vehicle at G) then north (along the vehicle axis, which points northwest). I think this would end up feeling pretty intuitive. It may make sense to highlight/outline the player’s movement neighborhood.

I really only intend for this to happen in tiles mode. Think of it like the Realistic Distance option, in terms of changing how movement works only for some players.

[quote=“Jokehats, post:3, topic:11050”]It sounds like your semi-unsticking the vehicle from the tile grid and then moveing it around off of the grid. This sounds ok, but I can see some issues. when you try moving from the vehicle to the terrain, how will that work? For instance, if I park my car 1 and 1/4 tiles from my loot stash, do I have to move my loot stash one tile over and then into the tile? Is the car’s cargo area occupying the 3/4 of a tile it just barely gets over onto, or the other 1/4 and then the rest of the car taking the other 3/4 part? It makes sense for driving I think, but it might cause problems when moving items/players from the car to the world.[/quote]The vehicle tiles will still actually be stuck to the world tile grid, they will just be drawn up to 1/4 of a tile off center for the world tile they occupy. It shouldn’t ever be visually ambiguous which vehicle tile occupies which world tile, except perhaps for vehicle part sprites that are very small (like outboard mirrors) and already only occupy a small part of a tile. Moving in and out of the vehicle in ambiguous circumstances will both work as I described for Coolthulu just above, unless a better solution presents itself.

Ah, I see. That seems a bit confusing, but vehicles already are, so no problem there. At least my car won’t crack in half when it goes around a corner. I aprove!

This is a showstopper, I’m not merging tiles-only game logic changes. Either it works in a pure grid-based system, or it doesn’t work.

The same logic could be applied in ascii mode, but it would be a lot less visually intuitive. I mentioned the option to highlight the movement neighborhood… that would be mandatory in ascii mode for this to work.

I think the problem is that in ASCII you can’t get charachters to not be on the grid. You can’t slant or otherwise manipulate text, so it really won’t work. Perhaps as a addon or switch for graphical, like experimental z-levels and circular distances, but not being ASCII compatible basically makes this impossible.

[quote=“Jokehats, post:8, topic:11050”]I think the problem is that in ASCII you can’t get charachters to not be on the grid.[/quote]Remember, nothing is actually “off” the grid here. Every vehicle tile is still attached to exactly one world tile, and the middle of the vehicle tile will still be drawn well within the bounds of that world tile.