Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

Addendum:

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.

share|improve this question
    
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? –  Tetrad Nov 21 '11 at 8:47
1  
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? –  Trevor Powell Nov 21 '11 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. –  Jo-Herman Haugholt Nov 21 '11 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. –  Jo-Herman Haugholt Nov 21 '11 at 12:03
    
The blocks also form the grid in which actors move. –  Jo-Herman Haugholt Nov 21 '11 at 12:06
show 2 more comments

1 Answer

Individual units are completely arbitrary and meaningless to the outside world. What matters is the topology of your search space. You need each segment to be small enough to ensure you can reach all the areas of the map that you want to be able to reach, but as big as possible in order to complete the searches more quickly.

share|improve this answer
    
But what is a typically good size for the graph of the search space? Or rather, what is typically to big? –  Jo-Herman Haugholt Nov 21 '11 at 13:47
2  
You keep using this word size and its very confusing. The two main performance issues you are going to have is memory which is limits the total number of nodes and edges and density which impacts the performance of the actual search. You sound like you are using size to refer to distance between nodes which has no performance implications. –  ClassicThunder Nov 21 '11 at 14:29
2  
There is no 'typically'. It depends on how much time you have available for the search, how much memory you have available, how good your heuristic is, what the average branching factor of your graph is, how well optimised your implementation is, what platform you're running on, and so on. –  Kylotan Nov 21 '11 at 14:34
    
@ClassicThunder Yeah, I see how I was unclear. I'll append the question. –  Jo-Herman Haugholt Nov 25 '11 at 14:21
1  
No. It's entirely dependent on your search space and your application requirements. Your amendment to your question doesn't help because it just emphasises that you have 2 grid granularities - why search through the large one (or worry about its size) when the small one is the only thing relevant to characters? Most people using A* don't have these 2 tiers, so even if there could be a standard, it wouldn't apply to your question. –  Kylotan Nov 25 '11 at 15:01
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.