Submarines should be able to go under ships?

Submarines should be able to go under ships?

Requests for features in the spring code.

Moderator: Moderators

User avatar
Pendrokar
Posts: 658
Joined: 30 May 2007, 10:45

Submarines should be able to go under ships?

Post by Pendrokar »

Why isn't it already in or it is, but sub collision just collides with ship collision?
User avatar
Pendrokar
Posts: 658
Joined: 30 May 2007, 10:45

Re: Submarines should be able to go under ships?

Post by Pendrokar »

Bumped for not getting a reply on this! :cry:
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Submarines should be able to go under ships?

Post by Satirik »

would be great
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Submarines should be able to go under ships?

Post by KDR_11k »

Because there's just one uniform "ground" collision system that applies to land as well as water.
User avatar
Pendrokar
Posts: 658
Joined: 30 May 2007, 10:45

Re: Submarines should be able to go under ships?

Post by Pendrokar »

KDR_11k wrote:Because there's just one uniform "ground" collision system that applies to land as well as water.
I've seen that in PURE buildings and units have box and other type of collision geometry. This most likely was a new feature for spring but I wouldn't know. :roll:
So if the collision spheres don't collide then submarines could go under ships? Of course this would be mod not engine wise.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Re: Submarines should be able to go under ships?

Post by Peet »

No, pathfinding is separate from collision primitives, it uses footprints.
manored
Posts: 3179
Joined: 15 Nov 2006, 00:37

Re: Submarines should be able to go under ships?

Post by manored »

Can torpedos, that dont need to pathfind (At least I believe so since they move in a straigh line to target), pass above or below units then? If yes, (teory based on limited knowledge about spring engine) couldnt sub pathfinding be rebuild to ignore ships, and then make they be really deep so they wont bump or enter ships to achieve that effect?
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Re: Submarines should be able to go under ships?

Post by [Krogoth86] »

Well amphibs have the same problem of not being able to pass floating DTs...

@manored:
Unit pathfinding and weapon behaviour are two different things. Apart from that afaik a torpedo will explode on the very first enemy thing it collides with even when targeting at another sub...
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: Submarines should be able to go under ships?

Post by yuritch »

Torpedoes definitely can go under naval units. It's just they usually try to go near the surface and thus hit everything. I've seen the torps launched from the torpedo bombers going under ships, that's because they gain some depth after hitting water and need a bit of time to go back to the surface.
Fri13
Posts: 54
Joined: 03 Feb 2007, 13:15

Re: Submarines should be able to go under ships?

Post by Fri13 »

That would be awesom!

Submarines should move near bottom, not near surface.
It would be great to see submarines going under ships when on deep sea but coming to surface when on near shore.

And submarines should have possibility to surface anytime and shoot their deck cannon and small AA fire against torpedo bombers.

Then we could add for different mods units what has deck gun and/or small AA turret or even missiles (what usually can be fired just below surface, but not from deeper, in real world).
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Re: Submarines should be able to go under ships?

Post by [Krogoth86] »

Fri13 wrote:And submarines should have possibility to surface anytime and shoot their deck cannon and small AA fire against torpedo bombers.

Then we could add for different mods units what has deck gun and/or small AA turret or even missiles (what usually can be fired just below surface, but not from deeper, in real world).
That should be possible right now...
manored
Posts: 3179
Joined: 15 Nov 2006, 00:37

Re: Submarines should be able to go under ships?

Post by manored »

[Krogoth86] wrote:
Fri13 wrote:And submarines should have possibility to surface anytime and shoot their deck cannon and small AA fire against torpedo bombers.

Then we could add for different mods units what has deck gun and/or small AA turret or even missiles (what usually can be fired just below surface, but not from deeper, in real world).
That should be possible right now...
I think it is, tough since our maps are used to submarines not passing under ships I think most of then probally dont have enough water deep :(... off course, this can depend of the scale of the mod :)
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Re: Submarines should be able to go under ships?

Post by [Krogoth86] »

Well it's perfectly fine for one method which gets used like in EE for example where you morph/replace the unit with an emerged / submerged version...

But I think you also could set a waterline setting in the FBI tag and then move up the entire model per script until the turrets are above the water. I didn't test this yet but the turrets might fire then...
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Re: Submarines should be able to go under ships?

Post by Gnomre »

The turret may fire but the hitsphere wouldn't move, so it'd still be wherever it was to begin with.
User avatar
MadRat
Posts: 532
Joined: 24 Oct 2006, 13:45

Re: Submarines should be able to go under ships?

Post by MadRat »

Maybe we should just allow mods to "distort" the notion of underwater depths to give submarines more clearance. Suddenly shallows become deep and the deep becomes the abyss...
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Submarines should be able to go under ships?

Post by Pxtl »

Probably the simplest solution would be to have multiple blocking maps - just a way to say "the blocking map for unit Q is x1 by y1 in blocking map 1, and x2 by y2 in blocking map 2". For pathing, the unit considers the union of their blocking maps if they exist in multiple blocking maps.

Thus, you could have a blocking map dedicated to ships that would be seperate from the blocking map used for subs and land units (which live on the ocean floor when they're overboard). The only problem would be things overlapping in shallows, so ships would need to have a deep mindepth. This would probably be the approach that requires the least perversion of existing logic.

You could also create a floating-unit layer for hovercraft that float above the height of normal units but still use normal unit handling. For example, if Kernel Panic had the Bytes float a little higher, then you could have Bits scooting around underneath it.

But yeah, if you applied this business to ships, you'd lose compatibility with a lot of maps to get the mindepth wrangling you'd need to keep ships from running into ocean-floor stuff in shallows.
User avatar
Erom
Posts: 1115
Joined: 25 Apr 2006, 05:08

Re: Submarines should be able to go under ships?

Post by Erom »

Pxtl's way is the right way to do this, computationally. However, pathfinding would go at least linearly with the number of maps, and probably worse, and pathfinding is one of the most intensive processes in the Spring engine, so you're opening a large can of worms, performance-wise.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Submarines should be able to go under ships?

Post by Pxtl »

Erom wrote:Pxtl's way is the right way to do this, computationally. However, pathfinding would go at least linearly with the number of maps, and probably worse, and pathfinding is one of the most intensive processes in the Spring engine, so you're opening a large can of worms, performance-wise.
Either way, multi-map-blocking-units would be pretty convoluted to path unless you converted them into a single map. You'd probably have to make the multi-map units have the same pathing footprint in each map (so a 4x4 in map 1 that extends into map 2 is still a 4x4), and simply union the maps... in which case, the pathing would be of the same computational expense, but you'd have the additional expense of constructing the unioned-blocking-map.

So, pathing the units is of the same computational expense, but the construction of blocking-maps is increased... and even then, I would think that mobile multi-map units would be rare - most multi-block units would be large immobile structures. Maybe experimentals that are so huge they stick out of the water while walking on the ocean floor.

The real drawback would be the shallow-water bugs - ships/subs would not function in shallows because they'd collide with the other blocking map.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Submarines should be able to go under ships?

Post by CarRepairer »

Air units have a block map of all green (can go anywhere). They ignore units and features.

The only way to assign this behavior to a unit is to make it canfly in the unit definition. I would like a new tag other than canfly to give a unit that can have terrain blocking assigned to it as normal by its movetype (based on water level, slope) but ignores all units and features. Subs would benefit from this, as well as my babies, the burrowing units. Such units move somewhat in 3D space, so it makes sense that they can avoid units, but in the case of subs cannot go above water, and for burrowers optionally cannot go below water.
HoneyFox
Posts: 20
Joined: 01 Aug 2007, 06:44

Re: Submarines should be able to go under ships?

Post by HoneyFox »

Why not just consider subs as aircrafts in water? they can go under the ships, they can go above/under each other too. :lol:
of course, water has its depth and ... maybe there should be some limitation so that only a certain amount of subs can be in the same (x,y) position?
Post Reply

Return to “Feature Requests”