Topic: Ferries
kaputtnik |
Posted at: 2018-07-25, 17:22
We shouldn't make it too complicated...
The normal flag action window can get an addtional button "Build ferry route" if the flag is on the border of water. Clicking it shows then the radius as you mentioned.
From my understanding a ferry acts just like a carrier. It is just like creating a road over water. So it should be part of the normal transportation system and shouldn't need any extras, imho. Fight simulator for Widelands: |
Nordfriese Topic Opener |
Posted at: 2018-07-25, 18:47
Started to implement this earlier. The compiler is running now, and hopefully I´ll have screenshots and a branch to show soon I pulled most code from Road into a new class RoadBase and made Road and Waterway children of RoadBase. Only road-specific code (like road promotion stuff) is left to the subclass. Waterways can be built exactly like roads (I mostly copy-pasted here), except that the option to build one appears only on flags with MOVECAPS_SWIM. Flags cannot be built in places where there is a waterway. I didn´t do the length restriction yet. The pathfinder for workers ignores waterways, so walkers can´t walk over water. The current implementation might cause a bug if two flags are connected by a waterway and a long, unsplit road; but I guess no player will build a road like that, so it shouldn´t matter, right? The ferry´s special pathfinding settings are not implemented yet. Top Quote |
Nordfriese Topic Opener |
Posted at: 2018-07-25, 19:45
Quick question to someone who knows
What value should I assign to the new constant Top Quote |
fuchur |
Posted at: 2018-07-25, 19:54
I don't think that's necessary. I unterstand ferries more similiar to a normal carrier. The only difference is that the transport goes by waterways.
That would restrict ferry stops to places where you could build a building at the coast.
How about letting it swim in distance 1 away from one end of the waterway? Or just in the middle of it? When a ware arrives at one flag then the ferry rows there and takes the ware. Top Quote |
Nordfriese Topic Opener |
Posted at: 2018-07-25, 20:11
Sorry, I phrased the question wrong. A ferry that is assigned to a waterway but not shipping anything will wait in the middle of the waterway, just as an idle carrier stands in the middle of his road. What I meant is: When the waterway is destroyed, where should its ferry go until it is reassigned to another waterway? Top Quote |
hessenfarmer |
Posted at: 2018-07-25, 21:24
Depends on the cost. Top Quote |
ypopezios |
Posted at: 2018-07-26, 10:25
-1 for assembling rafts on the spot, because it breaks the game's consistency. I prefer kaputtnik's approach. Also the length restriction seems wrong to me. A clearer solution would be to limit ferries to shallow waters and ships to deep waters. That design is well-tested in many strategy games. Later we could even get rid of the special port-space concept, by allowing ports on any big building-space with deep-enough water nearby. Map-designers will have fine control of a map's possibilities by simply adjusting the depths. And also players will have an easier time guessing potential port spaces. Top Quote |
Nordfriese Topic Opener |
Posted at: 2018-07-26, 11:49
First tests will be delayed a bit, I´m still chasing Road dependencies through the entire codebase. They seem to be used everywhere, except where I look for them Rafts would be difficult to implement, and as ypopezios said, the concept doesn´t quite fit to Widelands. Also, the logs would clutter up the flag for some time, and having a Carrier assemble something on a flag and then turn into a Ferry could also be tricky.
Widelands doesn´t have shallow and deep water yet, and this isn´t a trivial change. So this is something that can be considered in the future, but for now, I´ll stick with a tribe-specific length limit. Top Quote |
einstein13 |
Posted at: 2018-07-26, 14:47
I don't like limit of 4 for Empire. It is enough for 2 out of 3 cases (from my experience). Also I don't like limiting flag to have only one ferry-route. That will directly say that you can't build bypasses near coast for a heavy traffic. I remember that my first The Nile map contained tiny islands near starting positions #1 and #2. Those islands were designed to be used as "ferry bridge" (from one shore to the another). In old Settlers II I used that trick many times. Limiting the distance for ferries are ok, but from my point of view, it should be greater than 4 units. Even 5 will be better than nothing . And about my idea of moving builder - as it was told, it can damage some map designs. So I am against this idea now. That means you have to use a ship to build a port somewhere, even if you have this place in range of military building. einstein13 |
Nordfriese Topic Opener |
Posted at: 2018-07-26, 15:36
The reason why I want a restriction of one waterway per flag is that it´ll damage some maps less. If the map intends there to be a bottleneck somewhere, ferries break the design. That´s why I want to give them an additional disadvantage for such cases, and that is by forcing players to build at least one road between waterways, so they either have to use very long waterways (slow) or many short waterways (with roads between, which is diffcult in such situations). Length restrictions can be easily changed, the values 8/6/4 were only a first suggestion. Perhaps something like emp-6, bar-7, atl+fri-8 ? The branch is almost ready for first tests with waterways I´m still waiting to see if my latest change (compiling now) fixes a problem with road/waterway texture rendering; if not, I´ll likely have to do some complicated changes to the whole road-rendering code... Top Quote |