Tag Info

New answers tagged

0

Consider this: public sealed partial class HexCoords { static HexCoords() { MatrixUserToCanon = new IntMatrix2D(2, 1, 0,2, 0,0, 2); MatrixCanonToUser = new IntMatrix2D(2,-1, 0,2, 0,1, 2); } protected HexCoords(CoordsType coordsType, IntVector2D vector) { switch(coordsType) { default: case CoordsType.Canon: _vectorCanon ...


6

Before I answer the question you already asked, some notes: You can use A* with the original grid system you are using. The key things you need are neighbors and distance (for the heuristic). For neighbors with your grid system, you need to do something different for even and odd columns (as you mention); here's how: neighbors = [ [ [+1, +1], [+1, ...


1

Separate your screen coordinates from your world coordinates. Pick a coordinates system that will accurately represent your position with enough detail. For example, if you're using a 256x144 int coordinate system for your positions, you only have 144 different positions available to you, even when the screen size can display 1080. You may want to use a ...



Top 50 recent answers are included