Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Sun Nov 10, 2024 9:25 pm
All times are UTC + 0
Cliff & Pathfinding questions
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Fri Apr 14, 2017 1:53 pm    Post subject:  Cliff & Pathfinding questions Reply with quote  Mark this post and the followings unread

I have few questions regarding specific cliff tiles, I would be glad if someone could clarify some info.

1) About adjacent cells near cliffs: (found also in this tutorial from Aro https://ppmforums.com/viewtopic.php?t=29535 under Special Cliff Cells section). Do these adjacent cells need to have only clear ground or can also these tiles ground1, ground2, ground3 be applied?

2) In double level cliffs or cliffs close together (example on pic bellow), does it also need clear ground or it doesn't matter since it's area is not accessible?

3) What symptoms have broken pathfinding exactly? (lag, IE, freeze, unit stuck?)

4) Does cliff overlapping have any negative effect when same types of cliffs are used? (for example half of C5 next to C6 tile?)



SCRN01.png
 Description:
 Filesize:  13.66 KB
 Viewed:  6897 Time(s)

SCRN01.png



Back to top
View user's profile Send private message
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Fri Apr 14, 2017 7:52 pm    Post subject: Re: Cliff & Pathfinding questions Reply with quote  Mark this post and the followings unread

Tuc0 wrote:
Do these adjacent cells need to have only clear ground or can also these tiles ground1, ground2, ground3 be applied?


It isn't related to the tile properties per se, but rather Tiberium. If you let Tiberium spawn on these cells, you will immediately face pathfinding problems. For example you can place pavement or green crystal (which Tiberium cannot grow upon) on these cells to make them passable without risking the pathfinding bug.

Tuc0 wrote:
2) In double level cliffs or cliffs close together (example on pic bellow), does it also need clear ground or it doesn't matter since it's area is not accessible?


It doesn't matter because the cells are impassable, i.e. Tiberium cannot spawn on them.

Tuc0 wrote:
3) What symptoms have broken pathfinding exactly? (lag, IE, freeze, unit stuck?)


Only units getting stuck and/or ignoring move commands near these cells (that is, if Tiberium exists on them. See my writings above). This applies to all ground units. This is particularly annoying with Harvesters who might be able to automatically move to a Tiberium field but not get out because of careless tile placement.

Tuc0 wrote:
4) Does cliff overlapping have any negative effect when same types of cliffs are used? (for example half of C5 next to C6 tile?)


Usually not, the pathfinding engine is usually surprisingly robust/flexible when it comes to cutting and pasting parts of terrain. There are just these annoying special cases that mappers should keep in mind.

_________________


Back to top
View user's profile Send private message
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Fri Apr 14, 2017 10:26 pm    Post subject: Re: Cliff & Pathfinding questions Reply with quote  Mark this post and the followings unread

Thanks for answers Smile
Crimsonum wrote:
For example you can place pavement or green crystal (which Tiberium cannot grow upon) on these cells to make them passable without risking the pathfinding bug.

Sadly, my map is already done without any FS terrain and any crystal tiles wouldn't  fit in map. So I guess my only option is using cropped rough ground terrain 0035 tiles to avoid tiberium spawn (or maybe using small cliff tiles lowered to ground level also making it impassable).
Is it possible to spread those 1 cell cropped rough tiles easily using text editor? Or it is not worth the time?

Edit: added pics bellow, seems to work. Used 1 cell of rough ground (next to buggy) and lowered cliff edge (next to tank)



SCRN07.png
 Description:
 Filesize:  147.52 KB
 Viewed:  6848 Time(s)

SCRN07.png



SCRN05.png
 Description:
 Filesize:  22.05 KB
 Viewed:  6851 Time(s)

SCRN05.png



Back to top
View user's profile Send private message
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Sat Apr 15, 2017 7:03 am    Post subject: Reply with quote  Mark this post and the followings unread

If you insist on having those cells passable, then yeah, you need to use pavement or some workaround like the big rough tiles (#0035). However, if you leave these cells clear, then they will be automatically impassable ingame, and also block Tiberium from spawning on them (Tiberium cannot spawn on any impassable tiles). Thus there's no need to put such impassable tiles like cliff corners on these cells, simply leave them clear.

_________________


Back to top
View user's profile Send private message
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Sat Apr 15, 2017 7:54 am    Post subject: Reply with quote  Mark this post and the followings unread

Crimsonum wrote:
However, if you leave these cells clear, then they will be automatically impassable ingame, and also block Tiberium from spawning on them (Tiberium cannot spawn on any impassable tiles). Thus there's no need to put such impassable tiles like cliff corners on these cells, simply leave them clear.

Wow thanks, I didn't noticed that. Interesting behavior.

Back to top
View user's profile Send private message
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Sat Apr 15, 2017 9:45 am    Post subject: Reply with quote  Mark this post and the followings unread

I guess for veins overlay those tiles needs to be only impassable, since it can grow on anything passable (including pavement, rough ground, crystal tiles)

Back to top
View user's profile Send private message
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Sat Apr 15, 2017 6:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'm not sure if veins cause any pathfinding errors, but it's worth testing.

_________________


Back to top
View user's profile Send private message
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Sat Apr 15, 2017 8:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

Crimsonum wrote:
I'm not sure if veins cause any pathfinding errors, but it's worth testing.

It indeed changes these tiles to impassable same like tiberium, but not sure about pathfinding.

Back to top
View user's profile Send private message
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Sat Apr 22, 2017 2:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

Update: Also all cliffs from C23 - C40 share same bahavior, basicaly every cliff that hides cells behind them. If any other ground is placed behind, it becomes passable, also tiberium can spawn there. Probably also breaks pathfinding, but I am not sure how to test pathfinding correctly



Cliffs.gif
 Description:
 Filesize:  164.94 KB
 Viewed:  6701 Time(s)

Cliffs.gif



cliffs01.png
 Description:
 Filesize:  5.87 KB
 Viewed:  6701 Time(s)

cliffs01.png



cliffs02.png
 Description:
 Filesize:  113.85 KB
 Viewed:  6701 Time(s)

cliffs02.png



Back to top
View user's profile Send private message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Sat Apr 22, 2017 3:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

Going that deep into the cliff shouldn't be possible. I never even saw sth. similar. Might be because the cliff is incorrectly made...

_________________
One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done. #Tongue

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Sat Apr 22, 2017 3:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

TAK02 wrote:
Going that deep into the cliff shouldn't be possible. I never even saw sth. similar. Might be because the cliff is incorrectly made...

It is always possible, if ground behind cliff isn't clear ground. In testing I put ground2 behind cliff (last picture, shown in 2D, ussing D key in FS) and it becomes passable.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Apr 22, 2017 4:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

Tuc0 wrote:
but I am not sure how to test pathfinding correctly

it should break already when you try to send a unit from one side of the bad cell to the other side.
As soon as a pathfinding calculated path leads over such a cell, the unit simply doesn't move at all when giving a move order.

try changing CliffBackImpassability in rules.ini from 2 to 0 and see what happens.
I assume the special impassability logic is a result of this key. Maybe it works better with a different setting, but i never tested that key.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Sat Apr 22, 2017 5:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:

try changing CliffBackImpassability in rules.ini from 2 to 0 and see what happens.
I assume the special impassability logic is a result of this key. Maybe it works better with a different setting, but i never tested that key.


You are right! Run few tests and all those pathfinding failures occurs because of CliffBackImpassability=2 settings. If set =2 (default value), units are not able to move behind cliffs if ground is clear behind these cliffs:
- 2 cells behind cliffs C23-C40
- adjacent cells for special cliffs  C1,C2,C21,C22 and possibly R7,R10,R5,R8 cliff slopes

But if CliffBackImpassability is set to any other number (tested: -1; 0; 1; 1.5; 1.9; 10), cells behind cliffs are always passable, even cells near those C1,C2,C21,C22 cliffs are passable, tiberium can spawn there and units can move there freely without breaking pathfinding.

So I assume that tiberium pathfinding issues occurs because of half-working CliffBackImpassability=2 setting



PassableCliffs.gif
 Description:
 Filesize:  371.57 KB
 Viewed:  6659 Time(s)

PassableCliffs.gif



Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sat Apr 22, 2017 7:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

ModEnc - http://modenc.renegadeprojects.com/CliffBackImpassability

Only valid value for CliffBackImpassability is 2. Any other value would let
you place building very close to the back cliff, where the rendering might
overlap with cliff edge.

Also, when it comes to cells it should be positive whole numbers. Game
would consider decimal values like 1.5 or 1.9 as 1.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Apr 22, 2017 8:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite, are you a former Westwood engine programmer? Confused
From the moment you joined PPM, your inside knowledge amazed me each time. Thanks for your helpful answers. Approved!

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sat Apr 22, 2017 8:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
E1 Elite, are you a former Westwood engine programmer? Confused
No.
Lin Kuei Ominae wrote:
From the moment you joined PPM, your inside knowledge amazed me each time. Thanks for your helpful answers. Approved!
Thanks and your posts are helpful as well.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.3618s ][ Queries: 20 (0.0668s) ][ Debug on ]