Jump to content

Grids and Pathfinding


Recommended Posts

This is like a ruler to help us measure the size of objects, use as reference to see the game's "tiles" that is built of,  and to make sure the 3d models are correctly lining up with their intended size and footprint within the game. I.e. a unit takes up 1x1 tiles, a house 3x3 a town center 8x8 or whatever it happens to be per the design documents.

 

In 3d software (at the time 3dstudio max) we'd have a similar ruler setup in our modeling environment so that we are exporting the models at the correct size for the game and making sure the scale is consistent between art assets.

Edited by Aeros
  • Like 3
Link to comment
Share on other sites

I suppose that's a visualisation of the terrain height grid. Each vertex can have an independent height value. So, it is indirectly related to pathfinding I guess.

Edited by Guest
Link to comment
Share on other sites

What you're seeing there is just the polygons used for rendering. However we do have a "terrain tile" system, which are the same size as every ground-rectangle you see above.

Pathfinding takes places on a 4x more precise "pathfinding grid", which has 16 squares per terrain tile.

  • Like 1
Link to comment
Share on other sites

Thanks. This is interesting. I noticed with animations, they seem to not line up perfectly in the center of the large tile. It makes sense there are smaller tiles within the larger tile. It seems the 16 tiles, as opposed to 4 tiles or one tile, combined with unit range would allow more melee units to be able to attack a single surrounded unit? Is the unit position at the center of a single tile or the vertexes that make up tiles? Would I be correct to assume the code would position things based on the height map data which is the vertex locations, and then positions the mesh? 

Link to comment
Share on other sites

5 hours ago, (-_-) said:

Unit positions does not have any restrictions like AoE2 does. Buildings and units can be placed anywhere and rotated in any angle.

Would be nice though to have snap-to-grid building placement in the options...

(has been proposed/discussed before, I don't remember the reason why this is undesirable and still don't see it, at least as an option it wouldn't hurt anybody)

Edited by Palaxin
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Which grid though? In AoE2 a tile is the same for pathfinder and terrain. A whole tile can be blocked by just a single tree. If this is supposed to be just aesthetics, snap-to-buildings sound more sensible. Also, buildings always perfectly line up with the tiles in those games.

Link to comment
Share on other sites

terrain grid, I suppose

Yeah its mainly for aesthetics and also efficient use of building space to a small degree. Furthermore it feels more satisfying / less tiring trying to build houses with same distance to one another or in a certain pattern (more important for single player use or map creation than for multiplayer)

Link to comment
Share on other sites

Building placement is frustrating (for me and for people I have watched playing in online videos). The problem is, that as soon as the building preview (which follows the mouse cursor) is moved slightly over an obstacle, it turns red (which means that it is not allowed to place the building there). To fix this, the preview should snap to the closest position next to the obstacle. This should only happen when there is a slight overlap.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

56 minutes ago, odalman said:

Building placement is frustrating (for me and for people I have watched playing in online videos). The problem is, that as soon as the building preview (which follows the mouse cursor) is moved slightly over an obstacle, it turns red (which means that it is not allowed to place the building there). To fix this, the preview should snap to the closest position next to the obstacle. This should only happen when there is a slight overlap.

Spectcially when building walls

Link to comment
Share on other sites

  • 1 month later...

If the if the footprint is JS, does this mean there is another overlayed system for range determination, and path finding just deals with unit navigation? For example, when an archer has a range of twelve, and fires an arrow at another unit at range ten, does that mean ten path finding tiles or is there another system governing attack ranges?

Link to comment
Share on other sites

5 hours ago, DanHart said:

If the if the footprint is JS, does this mean there is another overlayed system for range determination, and path finding just deals with unit navigation? For example, when an archer has a range of twelve, and fires an arrow at another unit at range ten, does that mean ten path finding tiles or is there another system governing attack ranges?

1) what @(-_-) said

2) attack range has several meanings depending of the part of the code which use it... and most of the time it's not exactly what you expected an attack range is :-)

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...