Latest Posts

Topic: Ferries

kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 2434
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2018-07-26, 22:21

Nordfriese wrote:

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 value of the length restriction is a matter of intention: On the map "The Nile" the distance between two shores is between 4 and 7 nodes. With a value of 8 one can build a port on the opposite shore and afterwards connect the shores with a ferry. So he could dismantle the ports again. Is this what a ferry is intended to use for? This applies then only to atlanteans and frisians, giving them an advantage on some maps, "The Nile" in this case. Not sure if this is really a goal.


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1118
Ranking
One Elder of Players
Location: Poland
Posted at: 2018-07-27, 00:40

The Nile was intended to use ferries in its first version, but there was no ferry in Widelands yet. Changing the map for ferry introduction is still possible. But before that let's see how ferries will work first.

Maybe emp/bar-5 atl/fri-6 will be an option? It is conservative, but still longer than old S2 game.


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
Nordfriese
Avatar
Topic Opener
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2018-07-28, 09:39

A branch is online face-smile.png

There are still a couple of bugs, but waterway building works now on the whole. I reworked the entire road rendering system, removing an old TODO and possibly (needs more checking) fixed a known road-rendering bug as well. The change has the downside of consuming more memory; but the increase is only 2 bytes extra per field plus 2 bytes per field per player, so even on a large multiplayer map this shouldn´t be a real problem.

I expect the remaining issues with waterways will be easy by comparison to get rid of, so I´ll most likely get started with the construction and requesting of ferries today.


Top Quote
Nordfriese
Avatar
Topic Opener
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2018-07-28, 10:21

kaputtnik wrote:

The value of the length restriction is a matter of intention: On the map "The Nile" the distance between two shores is between 4 and 7 nodes. With a value of 8 one can build a port on the opposite shore and afterwards connect the shores with a ferry. So he could dismantle the ports again.

No, because ferries can´t transport workers, only wares. So you´d still need ships for workers. Also, long waterways have low capacity, so you´d need lots of ferry routes for this to be really efficient, which requires two long coastlines, and lots of ferries, which can be expensive.

The suggested requirement that there must be a road-connection between the waterway start/end flags would solve this. I´ll try to implement this when ferries work...

einstein13 wrote:

Maybe emp/bar-5 atl/fri-6 will be an option? It is conservative, but still longer than old S2 game.

Sound good, I set it to these values now. Let´s wait until everything works so we can test this in-game face-smile.png


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2018-07-28, 10:24

Nordfriese wrote:

Quick question to someone who knows logic/roadtype.h: ~~~~ enum RoadType { kNone = 0, kNormal = 1, kBusy = 2, kWaterway = ???, kWater = 3, kMask = 3,

kEast = 0, // shift values kSouthEast = 2, kSouthWest = 4, }; ~~~~ What value should I assign to the new constant kWaterway which I add here? Do I need to change kMask?

I'll have to get home before I can comment on this - I need my IDE to navigate the code, since I'm not really familiar with the road code.


Busy indexing nil values

Top Quote
Nordfriese
Avatar
Topic Opener
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2018-07-28, 11:14

@GunChleoc: No need, the question is not longer important. I ripped out the kMask and RoadType::kDirection constants and replaced the single uint8_t roads with three uint8_t road_e, road_se, road_sw everywhere. Directions are now Widelands::WALK_SE etc. This also makes the code easier to read imho.


Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 2091
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2018-07-28, 12:23

Nordfriese wrote:

No, because ferries can´t transport workers, only wares.

Wouldn't it be better (and logical) if they could also transport workers?

In general I think that king_of_nowhere's idea with restricting ships to certain ports is more useful than ferries...


Wanted to save the world, then I got widetracked

Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1118
Ranking
One Elder of Players
Location: Poland
Posted at: 2018-07-28, 17:36

@WorldSavior

If you allow ferries to transport workers, there are several changes need to be done first (for example worker should be "as ware", waiting next to the flag. That makes changes very complicated.

But even if you make those changes, there are multiple maps where you don't want to do so. Because you don't need port space to build an economy on small island.
Prohibiting workers on ferries makes map designing easier and further devs compatible with old maps.


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 2091
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2018-07-28, 22:09

einstein13 wrote:

@WorldSavior

If you allow ferries to transport workers, there are several changes need to be done first (for example worker should be "as ware", waiting next to the flag. That makes changes very complicated.

Sure? Ships can also transport workers, so maybe on could use the code of docks somehow?

But even if you make those changes, there are multiple maps where you don't want to do so. Because you don't need port space to build an economy on small island.
Prohibiting workers on ferries makes map designing easier and further devs compatible with old maps.

Okay, that's a good argument... Even though it's not really logic that ferries cannot transport workers.


Wanted to save the world, then I got widetracked

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2018-07-29, 10:32

If we want to transport workers, maybe having a little building is a good idea after all? Allowing ferries to transport workers would also make it easier for players to learn the game mechanics.


Busy indexing nil values

Top Quote