Jump to content

Interactable enteties outside walkable area


FeXoR
 Share

Recommended Posts

On some random maps (I didn't check all the scenarios) interactable objects are so close to the map border that no units can walk there.

I think the the general functions should warn if an entity is placed to close to the map border so that map/rmg designers are made aware of.

In my circular rmgs I define a 'playable map radius' variable and set it to 'g_map.getMapSize()/2 - 5' and always check against it if placing entities.Walkable map area my be a bit bigger but I didn't notice units could walk behind a tree placed at this radius. Have to check though.

Edited by FeXoR
Link to comment
Share on other sites

The only rms with this problem I found was guadalguivir that was fixed in the last svn update. Are you sure you've seen such a thing in other maps?

In beta 8 (installed with 0ad-r10803-alpha-win32.exe) yes.

EDIT: Perhaps should install on linux and use the svn version to keep track of the actual development...

- latium, tiny, players 2, seed 0, bottom on the cliff is a tree.

- Cantabrian Highlands, tiny, players 2, seed 0, right bottom of the blue players start location is a tree.

- Neareastern bad lands, tiny, players 2, seed 0, bottom left below the red players start location

...did'nt even need to seed to find some...

Edited by FeXoR
Link to comment
Share on other sites

Yeah, the existing checks in rmgen don't exactly match up with the passability criteria. Atlas has similar problems, you can place entities within the circle but not reachable.

I don't think it's a bad idea to have some space at the border, looks better, the shadows for example and map doesn't end so abrupt.

But it should have no game impact. Perhaps those objects could be shown but marked as non-interactable so no player/AI/Unit AI tries to interact with them... and fails. 

Edited by FeXoR
Link to comment
Share on other sites

Perhaps once the new pathfinder is in, the rough passability region (see red grid in pictures in penultimate page of "reporting progress thread") can be use to give rmgen a better check. Or vise-versa: the proper map barrier can be used when generating the rough passability region.

Link to comment
Share on other sites

In beta 8 (installed with 0ad-r10803-alpha-win32.exe) yes.

EDIT: Perhaps should install on linux and use the svn version to keep track of the actual development...

- latium, tiny, players 2, seed 0, bottom on the cliff is a tree.

- Cantabrian Highlands, tiny, players 2, seed 0, right bottom of the blue players start location is a tree.

- Neareastern bad lands, tiny, players 2, seed 0, bottom left below the red players start location

...did'nt even need to seed to find some...

Some problems in the original four random maps are fixed in svn about a month ago. Also I fixed a small issue that could happen is Cantabrian Highlands today. But this can't be fixed ultimately until work on pathfinding passibility is finished.

Link to comment
Share on other sites

I don't think pathfinding will have any impact on this, the new pathfinder is being designed to behave more or less identically to the old, except more precise and consistent.

You can view the bounds discrepancy in Atlas, by going to the Terrain tab and choosing passability class "default". The way the pathfinder works currently, a unit can't cross from one passability class to another (from red tiles to clear, or vice versa), even if it started in an invalid class. Remember land ships? Same thing. So it's currently working as designed, but the exact definition of the passability class on round maps may be in error (perhaps a rounding error?) or the overlap may be intentional. Philip would probably know :)

In short: if you place an entity in the unpassable area for "default" passability, it won't be able to move anywhere but in that area, and units outside the area won't be able to reach it, because it would violate the passability constraint.

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...