Pathfinding/Collisiondetection of Ships vs. Underwater - Page 2

Pathfinding/Collisiondetection of Ships vs. Underwater

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
Rayden
Posts: 377
Joined: 01 May 2005, 13:15

Post by Rayden »

No i have XP 3000+ ( but no stucked units on land, only water)
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Post by SinbadEV »

The other water issue has been exautively discussed and entirely ignored by anyone who can fix it.

http://taspring.clan-sy.com/phpbb/viewtopic.php?t=4014
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

Well looking at code I guess it should be possible to specify that subs are "flat" that means they would be just like aircrafts - being able to stack on top of each other and travel below ships / above underwater structures.

Corresponding tag for modders is called "blocking".

However this property is set to true for all units in unit.cpp contructor:

//All units are set as ground-blocking.
blocking = true;


I tested it by setting this to false for submarines and it worked nicely :-)
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Maybe it is related? jcnossen reported to not experience stucks and, as far as i remember, he has a fast PC.
ship pathfinding sucks indeed, I should really read posts better next time...
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

Replace submarine pathfinding with aircraft style.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

Das Bruce wrote:Replace submarine pathfinding with aircraft style.
Aircrafts in spring have pathfinding? I thought they just sortof randomly flew around until the target order you assigned ended up under them. It often seems that way anyways :P
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

Das Bruce wrote:Replace submarine pathfinding with aircraft style.
Well good luck with that.. you would have to write taairmovetype equivalent adapted for subs and change stuff in other (hard to find) places as well .. Tbh whoever wrote this initiailly should fix it..

Setting unit's as non-blocking is not a solution, because spring detects collision anyway and if you happen to be in same place as underwater metal contructor or port, your unit will get shifted or explode..
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

jcnossen wrote:... I should really read posts better next time...
Carefully reading all posts posted in these forums wears you down really quick. I've been there.
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Post by SinbadEV »

your solution doesn't address that fact that BOATS can't travel over submerged buildings!
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

Yeah, you are right - non-blocking unit doesn't block only with another non-blocking unit. It's not a solution .. proper movement model for subs and ships is..

But for the starters I think it would be wonder full to just fix ship above sea-floor building movement problem..
Post Reply

Return to “Engine”