Goto and waypoints

Discussion among members of the development team.

Moderator: Forum Moderators

Post Reply
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Goto and waypoints

Post by miyo »

This would ease capturing those "backstage" villages and some items.

* Press 'g' and select destination.
* Hold down 'shift-g', set waypoints and release shift-g to execute. Holding down 'shift-g' and right-mouse-click removes latest waypoint.
* Cancel destination selection/waypoint setting with right-mouse-click or 'esc'
* Non-player unit within 2 tiles breaks the goto.

- Miyo
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Good idea. It's likely that I will simplify the implementation by making it that you can choose one destination, not multiple waypoints. They have something like this in Civilization III, but when I play that, I never actually execute 'go to' (as they call it) commands, I just press 'g' and then mouse over various points to see what the quickest path is to various points.

A question: What should happen if the shortest path is through enemy units or ZOCs? e.g. you order fighter to move to village that is 4 turns away, but 2 turns away there are orcs it'd have to move through. Does it start moving in that direction?

David
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

They have this in FreeCiv.

Don't remove the waypoints... you would use that in eg. Scenario 3: to make merman go around the Naga.

Also with waypoints you can make one or more fast unit(s) to capture all "backstage" villages, no need to do another goto after it has reached one village.

- Miyo
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

Dave wrote: A question: What should happen if the shortest path is through enemy units or ZOCs? e.g. you order fighter to move to village that is 4 turns away, but 2 turns away there are orcs it'd have to move through. Does it start moving in that direction?
Pop-up window [proceed] [reroute] [break] for each unit whose path becomes blocked/slowed down by ZOC - path should not be changed without confirmation. Proceed does not care, just keeps on going. Reroute finds alternative path. Break does what is says.

- Miyo
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

miyo wrote: Don't remove the waypoints... you would use that in eg. Scenario 3: to make merman go around the Naga.
I might remove the waypoints just to make it easy to program. That's the kind of 'simple' I was talking about. :-)

Multiple waypoints might be of substantial difficulty. Also, to fulfill a waypoint, would a unit have to actually stop on the waypoint or simply move past it?

David
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

Dave wrote: Also, to fulfill a waypoint, would a unit have to actually stop on the waypoint or simply move past it?
Way points are just to design a route (multi-turn go around enemies or capturing multiple villages), no stops.

- Miyo
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

miyo wrote:
Dave wrote: Also, to fulfill a waypoint, would a unit have to actually stop on the waypoint or simply move past it?
Way points are just to design a route (multi-turn go around enemies or capturing multiple villages), no stops.

- Miyo
But you have to stop on a village to capture it....so this would make waypoints not very useful for capturing multiple villages...

David
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

Dave wrote: But you have to stop on a village to capture it....so this would make waypoints not very useful for capturing multiple villages...
Unit stops moving when it captures village but goto does not break, it will continue towards next waypoint on your next turn.

village-1(waypoint) -> village-2(waypoint) -> village-3(waypoint) -> village-4(waypoint) -> castle (waypoint)

You set the waypoints and the unit goes and captures all those villages for you and then returns back to castle. No need to waste time considering moves for that unit until last waypoint is reached.

- Miyo
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

Waypoint is just a linked goto... goto here and then goto there and then goto...

- Miyo
zas
Posts: 54
Joined: August 25th, 2003, 9:58 pm
Location: France

I like waypoints idea.

Post by zas »

So unit moves automagically each turn. Kool.
But we need a Cancel Road.

AI will optimize best road between two points ?
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Re: I like waypoints idea.

Post by Dave »

zas wrote:So unit moves automagically each turn. Kool.
But we need a Cancel Road.
Mousing over the unit will show the path it intends to take to its destination. If you just click on it and move it somewhere else, it'll automatically cancel the 'goto'.
zas wrote: AI will optimize best road between two points ?
If 'best' = 'quickest', then yes :-)

David
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Re: I like waypoints idea.

Post by miyo »

Dave wrote: If 'best' = 'quickest', then yes :-)
Best = quickest. If you want to move defensively or avoid enemies, etc use the waypoints.

- Miyo
Post Reply