Uber, I figured out how to get Subs to work... (I think)

Discussion in 'Planetary Annihilation General Discussion' started by squishypon3, August 4, 2014.

  1. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,356
    Okay here's a way I see getting subs to work.

    First things firs there needs to be a new water layer, this layer actually doesn't even need to be under the water it can still be exactly where the surface of the water's layer is, only it needs to be separate and of a new name such as WL_Undersea. With this layer means that there is now a new target layer, which means nothing can fire at a units in the WL_Undersea layer without being told it can, this means ships can't fire at subs randomly, unless their weapon is given the ability to.

    Now then, you're probably wondering "But wait, if they're on the sea's surface, how are they subs? Ah I thought you'd ask that, so here's how it'd work... You'd need to create the models like this-

    New-Old.PNG new-old2.PNG new-old3.PNG new-old4.PNG

    As you can see you can place them below water, without them protruding through the surface, AND being either higher or exactly as deep as the bottom of the ship. The sub would be moving around down below, but it's base armature would be exactly at the surface, this allows it to move around and detect collisions below the water, yet move as if on the surface, and this means that there is no need for a layer below the surface.
    Remy561, stuart98, websterx01 and 2 others like this.
  2. cdrkf

    cdrkf Post Master General

    Messages:
    5,721
    Likes Received:
    4,793
    Another 'quick fix' to subs might be to treat them as amphib tanks (and then the question becomes how do you prevent them leaving the water)....
  3. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,356
    I know I'm going to give my idea a try with what we currently can do, I'll edit the models to be below their base armature and so below the surface, then make them invisible to sight (So that you need sonar... or radar rather to see them) as a real bandaidy thing to see if what I'm thinking up is possible.
    cdrkf likes this.
  4. cdrkf

    cdrkf Post Master General

    Messages:
    5,721
    Likes Received:
    4,793
    I'll be interested to see how this works out...

    Whilst your at it can you try using the amphib unit hack as well? Slammers *do* go underwater now and behave essentially as a sub. So could you try making an amphib unit that happens to be a sub perhaps using the slammer as a starting point? The only issue would be preventing it walking up onto land (although subs that crawl out of the water would be funny)...
  5. donut64

    donut64 Member

    Messages:
    86
    Likes Received:
    46
    Haha, okay. I'm pretty sure they know how to do it. It is more of a time investment issue.
    DalekDan and aevs like this.
  6. SolitaryCheese

    SolitaryCheese Post Master General

    Messages:
    674
    Likes Received:
    1,046
    Who would have thought that putting the submarine under the water was the solution? :eek:


    /troll
    ndm250, squishypon3 and aapl2 like this.
  7. cdrkf

    cdrkf Post Master General

    Messages:
    5,721
    Likes Received:
    4,793
    The clever thing about squishes suggestion is he *isn't* putting it underwater though... He's just making it look like it is :p
  8. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,356
    No they told us they couldn't add subs because of technical issues, I believe they tried to make the layer for the subs underwater, and that's why I think what I came up with will fix it.
  9. brianpurkiss

    brianpurkiss Post Master General

    Messages:
    7,879
    Likes Received:
    7,438
    I'm sure Uber has put more thought into it than you.

    Similarly, Uber doesn't want to cut corners.

    Uber has written some incredibly impressive code thus far. I say we wait for them to do subs and do subs right.

    I'm also going to venture to guess that the main issue with subs isn't submerging them. We already have an underwater layer. I'm guessing the main issue is the visibility. They need to show up when a ship has underwater vision on them or sonar, but not when an aircraft flies overhead.

    ...

    But then again... we already have that functionality in the Orbital layer...

    *shrugs*

    I dunno. Either way, I don't want Uber to cut corners and have a hackish way of getting subs to work.

    Even though I don't think naval will fully work until we have sinking wrecks and submarines, it is what it is.
    wilhelmvx and zweistein000 like this.
  10. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,356
    This may be a hackish way, but it'd be fine in game, no one would know it was a a hack. Oh and they may have put more thought into it but it doesn't mean they've thought of everything. :p
    Last edited: August 4, 2014
    drboggles and cdrkf like this.
  11. liquius

    liquius Well-Known Member

    Messages:
    731
    Likes Received:
    482
    The "technical issues" is just the fact that they haven't added support for subs yet. Other stuff takes priority over subs.
  12. nuketf

    nuketf Active Member

    Messages:
    702
    Likes Received:
    130
    we have submarines? oh ya..i forgot
  13. cwarner7264

    cwarner7264 Moderator Alumni

    Messages:
    4,460
    Likes Received:
    5,390
    Clever solution, squishy, and would be excellent if you could get it into a mod. However, I suspect that Uber will most likely not want to cut corners with this sort of thing and there's a very slim chance of something like this making it into the core game.
    zweistein000 likes this.
  14. brianpurkiss

    brianpurkiss Post Master General

    Messages:
    7,879
    Likes Received:
    7,438
    As a developer myself, I can say that hackish fixes only pay off in the short term and never pay off in the long term. It simply creates duplicate code and Uber is more concerned about the long term.
    zweistein000 likes this.
  15. cdrkf

    cdrkf Post Master General

    Messages:
    5,721
    Likes Received:
    4,793
    I like the idea tbh. It's a neat solution that works with what we've already got. Maybe it isn't the correct solution for the main game but it certainly looks like a valid option to allow modders to get subs into games.

    The end result of this is:
    1: Sub will be submerged at 'periscope depth' where the periscope is what anchors them to the water.
    2: The targeting will be correct if the subs are treated as being on a separate "theoretical" layer. They will function as intended which is the purpose of the exercise.

    I understand that 'hack' type fixes aren't desirable, however on the other hand sometimes it's better to get something working than not at all? I also think the point here is that Squishie's solution shouldn't require much (if anything) in the way of additional code.
  16. websterx01

    websterx01 Post Master General

    Messages:
    1,682
    Likes Received:
    1,063
    If they were to cut corners (as they have here and there), I have full faith that they would put in proper code as soon as possible, probably just for performance reasons :p
  17. mredge73

    mredge73 Active Member

    Messages:
    201
    Likes Received:
    96
    I think this hack would work well if you allow subs to stack like air/orbital units.
    This would allow them to pass under ships and under/over each other.
    tehtrekd and cdrkf like this.
  18. GoodOak

    GoodOak Active Member

    Messages:
    323
    Likes Received:
    244
    Oh my god. In 1997 TA naval was way ahead of its time. In 2014, 17 years after Total Annihilation was released, we're at the point where "the subs should go underwater! in their own layer!" is actually needed advice and has to be modded into the game. WTF.
  19. epicblaster117

    epicblaster117 Active Member

    Messages:
    420
    Likes Received:
    231
    In TA the maps were flat.
  20. GoodOak

    GoodOak Active Member

    Messages:
    323
    Likes Received:
    244
    And the water was blue and the grass was green?

Share This Page