Author Topic: Discussion on possibilities of implementing Tunnels  (Read 2421 times)

jda

  • Guest
Discussion on possibilities of implementing Tunnels
« on: 19 December 2011, 07:46:19 »
Back on the Dwarves Aglarond thread, a discussion came up about tunnels. Yep, tunnels ...  :P

There are two long posts, one by myself and one from Omega on this on that thread. They start with a suggestion by Bloodwurm, quoted on my first reply to it, here - also a link by Psychedelic_hands to an older similar discussion; he did mention there was more thought put into this one, though.  :P
Link to Psychedelic_hands thread on Tunnels for GAE: https://forum.megaglest.org/index.php?topic=7026.0

So, if you want to seriously consider this, please take a look at those two posts by myself and Omega first. I'm moving it down here 'cause Dwarves Aglarond isn't even specific to GAE yet; and now Project Red is up, once I finish the engine-independent work on the faction, any GAE specific stuff should be put in that project (the two "factions" have already shared stuff forth and back).
And besides this goes well beyond only the Dwarves faction.

So, "continuing" the discussion started on the Dwarves faction:

1. Option 1 by Omega is based on my rant about modelling air units above ground and thus you might as well model them to be underground. I think the way to go here would be an adaptation of the walls mechanics. Put simple:
1.1. If the walls mechanics were fully implemented and the engine allowed them to be "built" upside-down to the underground, it would be easy to place the "tunnelers" on it, walking.
1.2. The building of the wall/tunnel might be acomplished by simply modelling the tunnelers under ground zero.
1.3. This specific kind of wall/tunnel would be both unattackable as well as unable to prevent passing-through fo units on the surface.
1.4. "Flags" could be used to mark tunnelers / other-tunnel-walking-units' locations in the tunnel. Similarly, some kind of dotted line or such might be used to mark the tunnels/walls "path" on the surface.
1.5. There is the problem of the "unwalkable" zones. Tunnels should be free to go under trees. But what about deep water, possible large rocks whose surface might be like the tip of an iceberg?... Easy sollution would be to make them all walkable, not so bad either... Just take care to model a 3D wall that will look good if seen inwater somehow...?
1.6. Combine the Walls mechanics with the in-development Cloaking mechanics and there should be no problem of surface units attacking underground ones. Units that can see cloacked units - I think that can be defined in their XML's so... No problem here.  :thumbup:
1.7. The reverse problem kinda remains? How to prevent the underground units from attacking surface ones (til they get out of the tunnel of course)? I mean... tunnel-building units might just not have an attack skill, but what about the units that you actually want to pass through the tunnel to attack the foe when they get out? Sollution engine-end only (i.e. feature request needed)? Pls. see Omega's post for thoughts.  ;)

2. Option 2 comes from using Teleportation to achieve this.
2.1. Teleportation teleports possibly anywhere. Issue 1: how many tunnels are you going to have? Issue 2: Are they all premade? We are talking "endpoints"
2.2. Even if the tunnels are already premade... the units don't just walk them instantly. You need teleportation with a delay. Again, Omega was thoughtful on this, even beyond my simple "use a kind of cast-time to teleport/walk though the tunnel".  Please take a look at his post on the Dwarves faction.
So rephrasing 2.1 and 2.2:
2.1. We need to have endpoints, NOT the ability to teleport from anywhere to anywhere!
2.2. We need to delay the teleportation - 'cause in this case we are NOT teleporting, just using its mechanics to seemingly move an unit underground, unseen by the enemy from one location to the other. Again... underground, NOT just stealthed, forced to circle trees and such.  :P
And:
2.3. While underground, some kind of flag to "see" that some units are, well, undeground, would also be useful. Placed somewhere in a straight line between start and end points, possibly.
2.4. The possibility of endpoints being destroyed by the enemy was looked upon by Omega.

So, what do you think? Possible to adapt the Walls / Cloaking / Teleportation mechanics to implement Tunnels?
Furhter engine development needed, besides that already planned?
Or time to open new tickets? Worth it even?

Speak thy mind!  ;D

EDIT; Added link to Psychedelic_hands prior thread on this subject.
« Last Edit: 21 December 2011, 18:59:33 by jda »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Discussion on possibilities of implementing Tunnels
« Reply #1 on: 19 December 2011, 14:19:56 »
I personally would have to think that the second option would be the easiest to implement, as well as the most versatile (whereas moving freely underground might benefit the dwarves, setting up a "teleportation relay" could be used even for futuristic mods.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

jda

  • Guest
Re: Discussion on possibilities of implementing Tunnels
« Reply #2 on: 19 December 2011, 14:47:08 »
You're right, I think. It would probably be easier Telepor-way. And it would definitelly be more versatile - the relay stuff with all the possible timings you mentioned in your post on the Dwarves.

Also, coming back to that issue you mentioned there, about specific endpoints vs teleport/tunnel to wherever (current teleport mechanics), maybe something that could solve it (engine-end) would be a kind of "endpoint = true" property in a "stationary unit" that would be called e.g. "Tunnel entrance" or something like that. Hence, you could only have teleports to where you had built the said entrance.
It does not quite satisfy Bloodwurm's request to have, in this case, the Dwarves "secretly" digging up to the enemy base but that would be too much of an advantage too...
On the other hand, a visible cave entrance would be easy for the enemy to spot and destroy - one sollution would be to cloak the entrance. So you still had to walk the surface up to the enemy base, build the thing and then cloack it; possibly uncloacking it only when the troops came through (making it then destroyable).
Of course, a human player would have seen the said entrance be built and know sooner or later, something would come out of it. Or would it?...  :wicked: Could still be used strategically to divert attention, even if not "in fact".  ;)

Well, here's a couple cents.  ;D

Would also like to hear the GAE devs on these requirements before actually opening a ticket for what I think might be missing in the engine to acomplish it.

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Discussion on possibilities of implementing Tunnels
« Reply #3 on: 20 December 2011, 01:16:16 »
C&C GLA style tunnels should be possible with shared carried units. I'm busy working on the multiplayer though.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

jda

  • Guest
Re: Discussion on possibilities of implementing Tunnels
« Reply #4 on: 20 December 2011, 01:29:43 »
C&C GLA style tunnels should be possible with shared carried units. I'm busy working on the multiplayer though.
I didn't really understand your first sentence  :look: But you have my full support for multiplayer over tunnels anyway.  :thumbup: :thumbup:

Bloodwurm

  • Guest
Re: Discussion on possibilities of implementing Tunnels
« Reply #5 on: 20 December 2011, 01:39:45 »
Well actually I made a reference to Nydus Canals which come from StarCraft2, and they work exactly like the cave example. Meaning, you build an entrance to your tunnel, and then, when your entrance is done, you need to select an exit point (anywhere on the map that you currently can see). The exit "cave" starts building and is quite visible to all players and minimap. There is a delay before the exit is completed and then some form of cooldown after it's done (in the form of an animation). While the cooldown is in effect, the exit can be attacked and destroyed. It's done like that for balancing issues (else it's just too drastic and powerful an ability, there's even an audio warning that the exit was completed). Units can then enter the tunnels which kind of act like transporters, and by selecting the exit you can "unload" the units from there, in that case the "travel" is rather instantaneous. Since you must select the exit to make the units pop up, units can enter the tunnels from any entrance and exit anywhere, there's no formal link between the entrances.

I would presume that's the easiest way to achieve "tunnels".

But then again, having units "burrow" and move underground is quite cool (and also done in StarCraft2) and can lead up to interesting strategies. And I wonder if underground walls and all are really required to achieve it:

A tunneling unit, when going underground, morphs into a specially cloaked unit, say some mound of dirt, which has no attack whatsoever. It's still a ground unit, just a really small one. Then, when the unit wants to pop back up, it morphs back to the original unit. The interesting part about morphing is that you also get an animation which can be used to do the dig in and dig out.

Now, can't a simple flag like "can walk over unwalkables" be added to a unit type? If so then the dirt mound unit could have that flag. And before allowing to morph back into the original unit, it must be on valid ground.

Left would be what happens to cloaked units that can detected?... well... again I guess a flag could be added to a unit to make it unattackable or something, so they can't be attacked until they pop up. Or, for some balancing issues, just let them be attacked! This is a strategy game after all!

My own cents :)

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Discussion on possibilities of implementing Tunnels
« Reply #6 on: 20 December 2011, 01:58:11 »
C&C GLA style tunnels should be possible with shared carried units. I'm busy working on the multiplayer though.
I didn't really understand your first sentence  :look: But you have my full support for multiplayer over tunnels anyway.  :thumbup: :thumbup:
The way I interpret that (as a guess) is a modification on how carrying units (transports/garrisoning) works. As it is, you can load and unload units into a moving or stationary unit. What Hailstone's concept seems to be is to "pair" together two (or more?) of these units (with the possible addition of a "delay time"?) so they could load or unload between them (as an example, let's say you load the unit into tweedledee, then unload it from tweedledum, way on the other side of the map).

Of course, it would still need some modifications, but is probably the best way to implement concept 2. Later though, Hailstone's working on multiplayer. :thumbup:
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

jda

  • Guest
Re: Discussion on possibilities of implementing Tunnels
« Reply #7 on: 20 December 2011, 03:38:02 »
Well, it's late down here and I'm tired so I'll have a closer look later on (buys couple of days ahead too).

But there's something I don't understand about the transport / garrisson units. I mean, as transports, what's the difference between having the units transported through the tunnel on another unit and just doing the trip by foot so to speak? And if they are stationary units (garrisons), wouldn't they need some kind of tag marking them as endpoints? You wouldn't actually need them to be garrisons for that (though yes, it would look cool seeing them go inside the "building"). Well, just wondering if there is some other advantage I'm not seeing.

@ Bloodwurm,
You posted several interesting ideas, I'd like to reread them later on. But regarding the walkability, air units can "walk" those areas so, in practice, even if it looked weird to have an "air" unit going underground; and there would be some side effects related to what units could attack them (which wouldn't really matter if they were cloacked).
Regarding another issue I raised in the Dwarves thread, the units going underground could be possibly be made unattackable through some small tweaking of the engine (actually, I think they already have a property that defines how they can be uncloacked? Maybe you can specify already they can't be uncloacked by erm "uncloackers"?). The morphing mechanics would solve that easily - morph it to an unit with no attack command, period.  :P But... this whole business brings up the AI issue: would the AI understand how to use the mechanics? Would it even try to send down (morph) an unit from one that can attack to one that can't ("weaker")? (I did some testing with this a good while back, to solve a completelly different problem with the Dwarves; it turned out erm not what intended :O).

How's work on the AI BTW? Anything new since 0.2.13?  :look:

Well, there I went... all ranting and wondering and ranting... See ya! :)

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Discussion on possibilities of implementing Tunnels
« Reply #8 on: 20 December 2011, 05:34:05 »
But there's something I don't understand about the transport / garrisson units. I mean, as transports, what's the difference between having the units transported through the tunnel on another unit and just doing the trip by foot so to speak? And if they are stationary units (garrisons), wouldn't they need some kind of tag marking them as endpoints? You wouldn't actually need them to be garrisons for that (though yes, it would look cool seeing them go inside the "building"). Well, just wondering if there is some other advantage I'm not seeing.
Yeah, that's where the tweak would have to be. The whole endpoints system would simply reuse existing loading and unloading code, but modified to work as a pair (or more?). So units would load and unload not just into one unit, but rather inbetween two units (enter one, exit the other, etc).
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Discussion on possibilities of implementing Tunnels
« Reply #9 on: 20 December 2011, 17:58:07 »
Being able to unload at a distance would be awesome too, as far as portals go.

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: Discussion on possibilities of implementing Tunnels
« Reply #10 on: 21 December 2011, 12:33:24 »
I allready made a suggestion on tunnels/carrying units before, on the MG forums.

WiP Game developer.
I do danish translations.
"i break stuff"

jda

  • Guest
Re: Discussion on possibilities of implementing Tunnels
« Reply #11 on: 21 December 2011, 18:57:25 »
I allready made a suggestion on tunnels/carrying units before, on the MG forums.
Yeah, Psychedelic_hands had also made a topic a while back, right here on the GAE forums. The link to that thread of his (which I'll be putting in an edit to my first post above) is this: https://forum.megaglest.org/index.php?topic=7026.0
Care to provide a link to your topic on the Megaglest board as well? (the engines and routes to implement this are somewhat different but the some ideas might be useful to either or both)