Hexarategy: Movement improvements

Keywords: ship movement, direct line, direct route, yellow line, movement video, demo video, target, select, hex, grid, rough, fix, axis. Powered by TextRank.

on the last movement post I mentioned some of the improvements that I would be making to the ship movements. Here is the demo video of some of these improvements. There are still some rough edges as can be seen (like ships passing through each other) which I will fix later. There are a few options about fixing colliding ships, I’m thinking of elevating the ship in the +Z axis so it will fly over the other ship. Another option would be to select a different route. Current the way of selecting the hex cells to reach the target is done like this:

mi.jpg

the yellow line is a direct line between the source and target cells. In the previous movement videos ship were taking this direct route. To rasterize the this route, I select N+1 equally distanced points on the line. N is the hex distance between the two points calculated as Math.max( x1-x2,y1-y2,z1-z2) . These points are the green dots on the yellow line. Each of these points will fall into a cell on the grid and these are the cells that the ship will follow to reach the target, as I highlight them in white. So here is the video of the ship moving along the grid:

h2.md.gif


Metadata

Similar posts

Powered by TF-IDF/Cosine similarity

First published on 2017-12-15

Generated on May 29, 2024, 10:01 PM

Index

Mobile optimized version. Desktop version.