Opened 10 years ago

Closed 10 years ago

#2314 closed enhancement (invalid)

[PATCH] Simplify the gates

Reported by: sanderd17 Owned by:
Priority: Nice to Have Milestone:
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description

Currently, the gates behaviour is strange, and hard to get as a new user.

The UI lets you choose if the gate is locked or unlocked. When it's locked, no unit can pass. But when it's unlocked, the gate isn't opened yet either.

Opening and closing the gate happens automatically, this is done via a range check. If units come too close, the gate is opened. Even if they don't want to go through the gate. This can cause very irritating situations where you let in a complete army, just because one unit accidentally came too close to the invisible trigger area.

The other problem is that unlocked gates are considered passable by the pathfinder, even for enemies, when they're not.

IMO, we should be less clever. And just let the player decide to open or close the gate. If the gate is open, it should be open for everyone (and visible without clicking thanks to the model showing open doors). And when it's closed, it should never open automatically.

This way, players have complete control, and won't be irritated by the game doing stuff automatically.

Attachments (1)

simplify_gates.diff (9.5 KB ) - added by sanderd17 10 years ago.

Download all attachments as: .zip

Change History (15)

by sanderd17, 10 years ago

Attachment: simplify_gates.diff added

comment:1 by historic_bruno, 10 years ago

Sounds like the solution is worse than the problem. It's slightly annoying that gates can open even when units don't want to pass through, it just needs better integration with the pathfinder than whatever the current hack is. It would be nice if the range detection worked better as well, since a circle/radius isn't really the best paradigm there. Ideally a unit would request a path through the gate and that would cause it to open as they approach it (maybe taking movement speed into account for timing).

But where your proposal will cause problems is for traders, who may need a long term pass through the city walls to reach their market, and also for gatherers/workers. I imagine it would be very tiring to monitor the gates for them, while maintaining the defense. Letting an enemy in is always the risk of having holes in your walls, no matter how they are controlled :) Letting them work automatically eliminates useless micro. I don't care much about locking conceptually, so what if gates had three states: "always open"/"always closed"/"auto" ?

Last edited 10 years ago by historic_bruno (previous) (diff)

comment:2 by sanderd17, 10 years ago

If you have traders, you have holes in your walls anyway, as the traders open the doors when they need to get in, so all you have to do as enemy is wait for a trader to come by. That means you are occupied with the micro anyway, and moreover, there is no visual clue to see whether the gate is locked or unlocked without clicking on it.

Last edited 10 years ago by sanderd17 (previous) (diff)

comment:3 by historic_bruno, 10 years ago

If you have enemies waiting outside your gates to sneak in, and are unable to fight them off or defend your city, then you have more problems than the occasional hole in the wall :) In fact relying on gates as a sole or main defense seems to be a losing strategy in all the games I've seen. But if you do see them and want to keep them from coming in, just lock the gate (using current functionality). I don't see the scenario being dramatically different if gates are manual open/close only, the enemy could just wait for one of them to open again...

comment:4 by sanderd17, 10 years ago

The amount of micro involved won't change a lot, but I believe it will be easier for new players to understand how the gates work, and for veteran players to not make stupid mistakes. I've had it happening before, I thought a gate was locked, and when sending some units to garrison in the tower next to it, it opened.

And it makes the code a lot more simple.

comment:5 by Erik Johansson, 10 years ago

As far as I know all other games I've played do it the open/closed + locked/unlocked way, so in that sense it would probably be more confusing to veteran (RTS) players if we did something differently.

comment:6 by leper, 10 years ago

Keywords: design added; review removed

comment:7 by sanderd17, 10 years ago

feneur: so the gates work together with the pathfinder, and only open if you want to path outside the gate? Or did they also use range checks?

comment:8 by Erik Johansson, 10 years ago

I don't know anything about the technical details I'm afraid :(

comment:9 by historic_bruno, 10 years ago

The way the gates work now is almost identical to Age of Kings, and you can tell those are distance based too, because you can have a unit walk near but not through a gate and it will open and stay open. They also have the same issue of gates being "stuck" open, allowing enemies to come through.

One issue if you want gates to be shut on command is that you don't want to trap units inside the gate, so you will at least need to check for obstructions within the gate before shutting it (not sure if the attached patch does so). That was part of the reason why our gates are range based, and partly to mimic other games.

comment:10 by sanderd17, 10 years ago

They check for obstructions, but my patch also adds a unitai command that tasks the units to go out of the obstruction (the same thing that happens when building a foundation), and the pathfinder through the gate is disabled before the gate actually closes, so no new units should enter the gate.

I guess we could just use those two parts from the patch, and ditch all the rest.

comment:11 by Adrián Chaves, 10 years ago

I had not though about it, but I see the point of the original report.

What good is it to have an unlocked door closed while there are not units around? What difference does it make? Doesn’t it make more sense that the door is open while it is unlocked and closed while it is locked?

in reply to:  11 comment:12 by historic_bruno, 10 years ago

Replying to Gallaecio:

What good is it to have an unlocked door closed while there are not units around? What difference does it make? Doesn’t it make more sense that the door is open while it is unlocked and closed while it is locked?

If the gate only had two states and was manually controlled, then yes. But they don't currently work that way. There is no "always open" state (actually, I don't know why you would ever want that in a defensive structure), instead there is "always closed" or "automatic" based on diplomacy and range. "Locking" overrides the default automatic control.

in reply to:  5 comment:13 by Josh, 10 years ago

Replying to feneur:

As far as I know all other games I've played do it the open/closed + locked/unlocked way, so in that sense it would probably be more confusing to veteran (RTS) players if we did something differently.

+1, I'd be quite confused if we removed automatic open/closing.

comment:14 by sanderd17, 10 years ago

Keywords: design removed
Milestone: Alpha 16
Resolution: invalid
Status: newclosed

So, guess that's settled.

Note: See TracTickets for help on using tickets.