4 minutes ago, ferrous said:What do you mean by 'physical rigidity' ?
I think he means that there's only 1 unit per cell, in other words the units/positions are all quantized and there's no continuous movement of units across the map. So, it's "rigid" in the sense that there's hard collisions at cell boundaries.
At least I think that's what he means.
11 hours ago, Kylotan said:What you want to do is beyond what any games currently do. The Total War games work with far fewer units and they almost certainly perform hacks to simplify their logic.
I will add this: your grid is too small to give you much benefit and I expect the cache coherence is almost zero with rows that long. A more complex spatial database - perhaps even just a large grid of smaller grids - may give you significantly faster lookups much of the time, if it means that the 8 grid squares you're examining are almost always in the same cache line. But what you gain there, you might lose on having the 2 stage lookup, or on having to occasionally search across multiple large grid squares.
Maybe some sort of swizzled arrangement of the grid like for textures. The lookups would involve more math, but you get better cache-coherency. It might be a big win in this type of situation where the entire game is one huge grid with 1 unit per grid square.