IPB Style© Fisana

Jump to content


Wall Gates - how should they work


  • Please log in to reply
44 replies to this topic

#1 luziferius

luziferius

  • Community Members
    Pip

  • Discens
    (63 posts)

Posted 20 June 2012 - 07:21 PM

Hi there,
I‘ve searched a bit(Forum, Trac), but didn‘t find much about how the wall gates should work(high level).
only found the ticket #1385
Since there doesn’t seem to be any implementation currently, I think it is the right time to think about how those gates should work on a high-level base.
There are many possibilities how they could work/what features should be there(UI buttons to control behavior and such things)

I‘ve collected some points(the list below), that might be considered when implementing the gates.
Maybe the devs could rule out some of them that are impossible/very hard to implement,
for the others I would like to initiate some sort of discussion to get the best out of this planned feature.
  • should open gates magically block enemy units?

    #1385 said:

    The open gate could just operate like the farms do where allied and enemy units could just walk right through. This seems more sensible to me then AoE/M's way of having an open gate still block out enemies as if they were vampires or something.
  • UI controls: force close/force open
  • should your gates auto-open/close when own units are near? maybe only when those are following a path through it
    afaik in TA:Kingdoms you needed to open/close the gates by yourself, when you forgot to close them the enemy could easily invade...
  • only operational when a unit is garrisoned in it?(I wouldn’t like that, someone might find it to be more realistic)
  • what should happen when your and enemy units are near? should the gate let your units out to fight the enemy or should it keep closed to not let the enemy in?
    maybe 2 "stances":
    permissive: it opens when your units are near even when enemy units could pass the gate, maybe default
    strict: stay closed when enemy is in LOS,don‘t allow your fighting units to retreat into your territory, maybe overwrites force-open
  • UI controls: fine-tune what can pass the gate, "diplomacy stances"(that would include point 2):
    block nothing:let everything through(basically as if the gate doesn‘t exist, force-open)
    block enemy:(well, you know...)
    block neutral:blocks enemy and neutral units like animals and neutral players when diplomacy is designed to allow neutral players, maybe default stance
    block allies:only let your units through(prevent the allied AI from raiding your resources if you want to do such things)
    block everything: force-close
  • how long should it take to open/close the gate
    those gates from around 0ad aren’t instant-on/off-energy-shields… they need some time to open or close, but maybe not 30minutes(definitely not)
  • a global button/menu, apply the settings of the currently selected one on all gates
  • when(if) pathfinding based on LOS is implemented, should enemy gates be treated as closed even when they were open the last time seen(since they wouldn’t open for you normally)
  • to be continued…

Edited by luziferius, 20 June 2012 - 07:25 PM.


#2 quantumstate

quantumstate

  • WFG Programming Team

  • Primus Pilus
    (1,072 posts)

Posted 20 June 2012 - 10:23 PM

This was mainly discussed on irc. You can take a look at http://irclogs.wildf...et-#0ad-dev.log . That is the main discussion I found with a quick search but there are quite a lot of other mentions.

Jonathan Waller [ aka quantumstate ]

Wildfire Games AI Scripter
Contact me: jonathanmarkwaller at gmail dot com


Support Wildfire Games!


#3 vts

vts

  • WFG Programming Team

  • Sesquiplicarius
    (110 posts)

Posted 20 June 2012 - 10:38 PM

Indeed, I believe they were discussed on IRC, but I think they should definitely be moved somewhere more prominently visible/available. Helps ensure that everyone has the same understanding of what needs to be done. For the walls implementation, this was a thread in the staff forums, so perhaps we could create a similar public one for the wall gates with any decisions made on how the team envisions for them to work.
Jeroen DR [ aka vts ]
Wildfire Games Programmer
Contact me: jeroen@wildfiregames.com


‹Mythos_Ruler› Give that batch some uniforms. Batches love uniforms.

#4 Pureon

Pureon

  • 0 A.D. Art Team

  • Primus Pilus
    (3,220 posts)

Posted 21 June 2012 - 07:46 PM

I'll finish off the models and create the animations if some are needed, but first I need to clarify how gates function. Specifically, when the gate is opening the doors are going to swing out into the open - if something is in the way do the doors just go straight through the object, or do you need to move the object out of the way first.

I believe we may have opted for the doors to become passable (units can walk through the door models) as soon as the doors begin to open. This will help with pathfinding (units won't get stuck behind open doors when trying to walk through the gate) and make gates quicker to implement. Other more complicated functionality can be added afterwards if needed.
Pureon
0 A.D. Designer / Texturer / 3D Artist
Contact email:
pureon{@}wildfiregames.com

#5 Pureon

Pureon

  • 0 A.D. Art Team

  • Primus Pilus
    (3,220 posts)

Posted 21 June 2012 - 08:04 PM

Larger siege weapons will not be able to fit through the gates. Eventually most non-mobile siege weapons will pack into carts that will fit through.

As long as most of the door is within the gate structure, it won't look too bad.
Pureon
0 A.D. Designer / Texturer / 3D Artist
Contact email:
pureon{@}wildfiregames.com

#6 Geek377

Geek377

  • Web Development Team

  • Primus Pilus
    (1,718 posts)

Posted 21 June 2012 - 08:41 PM

Will Carthage get there special gate structure, the homah?
The Geek [ aka Geek377]
Wildfire Games Webmaster
Contact me: Posted Image Posted Image

#7 feneur

feneur

  • 0 A.D. Project Leader

  • Cartographer of imaginary worlds
    (7,061 posts)

Posted 21 June 2012 - 09:59 PM

View PostGeek377, on 21 June 2012 - 08:41 PM, said:

Will Carthage get there special gate structure, the homah?
Not directly. Later the Carthaginian walls were decided to be a civ bonus instead, see http://trac.wildfire...ians#CIVBONUSES

Erik Johansson [ aka feneur ]

Wildfire Games
Contact me: feneur@wildfiregames.com



Support Wildfire Games!


#8 Pureon

Pureon

  • 0 A.D. Art Team

  • Primus Pilus
    (3,220 posts)

Posted 21 June 2012 - 10:12 PM

View PostLion.Kanzen, on 21 June 2012 - 08:56 PM, said:

right i forget the packet mobile siege units XD
Hopefully someone will decide to take a look at implementing that sometime :)
Pureon
0 A.D. Designer / Texturer / 3D Artist
Contact email:
pureon{@}wildfiregames.com

#9 Pureon

Pureon

  • 0 A.D. Art Team

  • Primus Pilus
    (3,220 posts)

Posted 21 June 2012 - 10:27 PM

There's pathing and obstruction obstacles to overcome first, so there's more to it than just making the model animate.
Pureon
0 A.D. Designer / Texturer / 3D Artist
Contact email:
pureon{@}wildfiregames.com

#10 vts

vts

  • WFG Programming Team

  • Sesquiplicarius
    (110 posts)

Posted 22 June 2012 - 09:34 PM

View PostPureon, on 21 June 2012 - 07:46 PM, said:

I'll finish off the models and create the animations if some are needed, but first I need to clarify how gates function. Specifically, when the gate is opening the doors are going to swing out into the open - if something is in the way do the doors just go straight through the object, or do you need to move the object out of the way first.

I believe we may have opted for the doors to become passable (units can walk through the door models) as soon as the doors begin to open. This will help with pathfinding (units won't get stuck behind open doors when trying to walk through the gate) and make gates quicker to implement. Other more complicated functionality can be added afterwards if needed.

I'm not aware whether any consensus has already been reached about this, but it seems to me like the way you propose is the better alternative, for one because making units move out of the way first creates pathfinding hazards/nightmares. I also don't think players would particularly mind to have the occasional unit walk "through" a wall gate that's swinging open, but they might mind the opposite: e.g. if at some point they need to retreat quickly but can't open their gates because they have 200 units in the way queueing up in front of the gate.
Jeroen DR [ aka vts ]
Wildfire Games Programmer
Contact me: jeroen@wildfiregames.com


‹Mythos_Ruler› Give that batch some uniforms. Batches love uniforms.

#11 luziferius

luziferius

  • Community Members
    Pip

  • Discens
    (63 posts)

Posted 22 June 2012 - 10:44 PM

View Postquantumstate, on 20 June 2012 - 10:23 PM, said:

This was mainly discussed on irc. You can take a look at http://irclogs.wildf...et-#0ad-dev.log . That is the main discussion I found with a quick search but there are quite a lot of other mentions.
thanks for pointing to the irc log
your link seems to be broken for me, i‘ve digged a bit, the working one (for me) is here: http://irclogs.wildf...-%230ad-dev.log

for anyone interested: i’ve searched through that log and here’s some sort of summary:
Spoiler

about the problem with the pathfinder and closed gates blocking own units:
you would need a player-dependant obstruction map for player-dependant pathfinding(I don’t know hard to implement that would be)[multitheading idea: 1 pathfinder per player with it’s own obstruction map]
own gates are always passable for own units(unless gate is locked, so units would walk through gates as the pathfinder finds a path through it) and only passable for enemies when it is in 'open' state(maybe even when in LOS too, but thats LOS dependant pathfinding, probably a bad idea)

Edited by luziferius, 22 June 2012 - 10:55 PM.


#12 FeXoR

FeXoR

  • Community Members
    PipPipPipPipPip

  • Centurio
    (659 posts)

Posted 23 June 2012 - 02:49 PM

View Postluziferius, on 22 June 2012 - 10:44 PM, said:

you would need a player-dependant obstruction map for player-dependant pathfinding(I don’t know hard to implement that would be)[multitheading idea: 1 pathfinder per player with it’s own obstruction map]
own gates are always passable for own units(unless gate is locked, so units would walk through gates as the pathfinder finds a path through it) and only passable for enemies when it is in 'open' state(maybe even when in LOS too, but thats LOS dependant pathfinding, probably a bad idea)

What would be the advantage of "opening" gates if your own units can pass them anyway? Pathfinding is already hard to do, so I don't think complicating it further would be wise.
Posted Image Im Übrigen bin ich der Meinung, dass 0A.D. Auslöser braucht. (IMO 0A.D. needs triggers ASAP.)

#13 oddchild

oddchild

  • Community Members
    Pip

  • Discens
    (28 posts)

Posted 23 June 2012 - 06:57 PM

i agree with the idea that you have to manually close them. I think that would be great, and would make the game more difficult in a good way. Surprise attacks would be more surprising...

Programing wise it wouldn't be hard to implement. When you have a sprite, or a unit of area, you set mapstate or whatnot.

If gate = "closed" then
maparea = 1
else
maparea = 2
endif

If you have to deal with the detecting friends and foes, the coding becomes all the more difficult with pathfinding etc. Keep it simple, let the user close and open the gates.

#14 FeXoR

FeXoR

  • Community Members
    PipPipPipPipPip

  • Centurio
    (659 posts)

Posted 24 June 2012 - 08:44 AM

View Postoddchild, on 23 June 2012 - 06:57 PM, said:

i agree with the idea that you have to manually close them. I think that would be great, and would make the game more difficult in a good way. Surprise attacks would be more surprising...

Programing wise it wouldn't be hard to implement. When you have a sprite, or a unit of area, you set mapstate or whatnot.

If gate = "closed" then
maparea = 1
else
maparea = 2
endif

If you have to deal with the detecting friends and foes, the coding becomes all the more difficult with pathfinding etc. Keep it simple, let the user close and open the gates.

That way you would still need multiple areas to update for the pathfinder. It has to take care of moving/dynamic objects anyway so you could just place a blocking "gate door entity" when the gate is closes and remove it when it's opened. So a gate would be like 3 entities: 2 for the parts that always block (walls at the edges) and one for the center part that only blocks if the door is closed. I don't know if it would be easier to remove the center "gate door entity" or lower it's collision radius to 0 (or remove it's footprint).

Edited by FeXoR, 24 June 2012 - 08:44 AM.

Posted Image Im Übrigen bin ich der Meinung, dass 0A.D. Auslöser braucht. (IMO 0A.D. needs triggers ASAP.)

#15 wrod

wrod

  • Community Members
    Pip

  • Discens
    (86 posts)

Posted 25 June 2012 - 10:14 PM

I think once the walls are implemented there should be different "stances" for the wall for example
Open:its like open for anyone or anything wanting to go through
Friendlies:only friendlies can go thru
Trade:only friendly trade units can go through
Embargo:friendly units except trade units
Warring:only friendly soldiers and healers and trade units go thru
Full war:only soldier units can leave

#16 luziferius

luziferius

  • Community Members
    Pip

  • Discens
    (63 posts)

Posted 27 June 2012 - 09:26 PM

View Postluziferius, on 22 June 2012 - 10:44 PM, said:

about the problem with the pathfinder and closed gates blocking own units:
you would need a player-dependant obstruction map for player-dependant pathfinding
own gates are always passable for own units(unless gate is locked, so units would walk through gates as the pathfinder finds a path through it) and only passable for enemies when it is in 'open' state(maybe even when in LOS too, but thats LOS dependant pathfinding, probably a bad idea)

View PostFeXoR, on 23 June 2012 - 02:49 PM, said:

What would be the advantage of "opening" gates if your own units can pass them anyway? Pathfinding is already hard to do, so I don't think complicating it further would be wise.
that wasn’t about really opening the gates, but a trick(a hack?) to get the pathfinder working with dynamicaly opening gates:
when the door is closed, it blocks tiles->the pathfinder sees blocked tiles->doesn‘t find a way through the door(since it is closed atm of the pathfinder query); you see the problem!?
so your(as a player) pathfinder should see the gates as always open(until force-close or something is triggered) to allow routing through them.
in reality the gate is opened when the units arrive and closed when they go away, and only in this timeframe the door is really open(so enemies could pass)
but the enemy shouldn’t see your gates that way, because if the enemy pathfinder would, you would almost always stuck your units at enemy gates(and vice-versa)

Edited by luziferius, 27 June 2012 - 09:44 PM.


#17 FeXoR

FeXoR

  • Community Members
    PipPipPipPipPip

  • Centurio
    (659 posts)

Posted 28 June 2012 - 07:33 AM

View Postluziferius, on 27 June 2012 - 09:26 PM, said:

that wasn’t about really opening the gates, but a trick(a hack?) to get the pathfinder working with dynamicaly opening gates:
when the door is closed, it blocks tiles->the pathfinder sees blocked tiles->doesn‘t find a way through the door(since it is closed atm of the pathfinder query); you see the problem!?
so your(as a player) pathfinder should see the gates as always open(until force-close or something is triggered) to allow routing through them.
in reality the gate is opened when the units arrive and closed when they go away, and only in this timeframe the door is really open(so enemies could pass)
but the enemy shouldn’t see your gates that way, because if the enemy pathfinder would, you would almost always stuck your units at enemy gates(and vice-versa)

Ah, ok. That still leaves the problem with the player dependent obstruction mapping. But if it can be done...
Posted Image Im Übrigen bin ich der Meinung, dass 0A.D. Auslöser braucht. (IMO 0A.D. needs triggers ASAP.)

#18 Alpha of the Eagles

Alpha of the Eagles

  • Community Members
    PipPip

  • Sesquiplicarius
    (108 posts)

Posted 28 June 2012 - 05:14 PM

Do it simple like Aoe. Opens for friendlies, but during a retreat it can be locked to prevent enemies from entering. Could be convertable, but in that case, not while it's in lockdown.
"One more such victory, and I shall be utterly undone." - Phyrrus of Epirus after the battle of Heraclea.

#19 luziferius

luziferius

  • Community Members
    Pip

  • Discens
    (63 posts)

Posted 29 June 2012 - 11:54 AM

I think the simplest way doing it is(programming wise):
  • pathfinder always sees gates as open(units would stuck in front of gates) and
  • not doing any automation; only let the player open/close gates
(but that somehow shifts problems into the AIs, since then they must know how to use gates)

#20 Alpha of the Eagles

Alpha of the Eagles

  • Community Members
    PipPip

  • Sesquiplicarius
    (108 posts)

Posted 04 July 2012 - 08:34 PM

View PostLion.Kanzen, on 28 June 2012 - 05:15 PM, said:

i repeart the problem are around the Programming that. its technical non conceptual.

I think in Aoe2, when the gate is 'closed,' it seems as though it loads a model that blocks the path for the units. I don't think the programming would be hard, relatively speaking, but as I'm incapable of doing it myself, I probably should weigh my words carefully. :P
"One more such victory, and I shall be utterly undone." - Phyrrus of Epirus after the battle of Heraclea.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users