# Good baseline size for an A* Search grid?

I'm working on a grid based game/prototype with a continuous open map, and are currently considering what size to make each segment. I've seen some articles mention different sizes, but most of them is really old, so I'm unsure how well they map to the various platforms and performance demands common today.

As for the project, it's a hybrid of 2D and 3D, but for path-finding purposes, the majority of searches would be approximately 2D. From a graphics perspective, the minimum segment size would be 64x64 in the XZ plane to minimize loaded segments while ensuring full screen coverage. I figure pathfinding would be an important indicator of maximum practical size.

I realize I was a bit unclear when talking about sizes and segments.

Each segment is a cubical map of blocks, e.g. 64x64x64 blocks. These represent both geometry, but also if an actor can move into that location and is thus a potential node in the graph.

Each of these segments again combine to a larger square or cubical world map. Neighboring segments are to be loaded dynamically to ensure a seamless local map.

Therefore how many blocks fit into the screen space when rendered, sets a practical minimum for the segments, but we would probably want to have larger segments than the absolute minimum. However, since a block also represents a potential node, the segment size also affects the size of the graph, which have to be considered when choosing a segment size.

• Isn't that something you could just set in one place in code and then change it later when the system is built to see the real-world ramifications of certain values? Nov 21, 2011 at 8:47
• When you say "64x64", what sort of units are you talking about? Is that pixels? What resolution is the screen? Is that the size of your tiles, or is that the size of something else? I'm not really sure what you mean by "segment" or "segment size". Can you elaborate a little? Nov 21, 2011 at 9:23
• In this case it's "blocks", roughly translatable to 1 meter or yard. When rendered, it will probably be 16 or 24 pixels in width. Nov 21, 2011 at 11:59
• By segments I mean what I guess is often called world offsets. Each segment represents local space, and probably four segments will be loaded at a time to enable a seamless map. Nov 21, 2011 at 12:03
• The blocks also form the grid in which actors move. Nov 21, 2011 at 12:06