Opened 8 years ago

Last modified 3 years ago

#3808 new defect

Volcanic Lands - sometimes no wood for players

Reported by: elexis Owned by:
Priority: Should Have Milestone: Backlog
Component: Maps Keywords: patch, simple
Cc: Patch:

Description (last modified by Inari)

The random-map script "Volcano" often leaves one or two players completely without any wood, especially with 8 players. From a gameplay perspective, this is not really acceptable.

Attachments (6)

commands.txt (373.1 KB ) - added by elexis 8 years ago.
Sample a19 replay
volcanic_lands.js.patch (2.2 KB ) - added by Niek 8 years ago.
Implements retry functionality, add som missing semicolons on the fly
volcanic_lands.js.2.patch (2.2 KB ) - added by Niek 8 years ago.
Breaking on success is nice
6063.png (1.3 MB ) - added by Inari 6 years ago.
6064.png (1.4 MB ) - added by Inari 6 years ago.
6065.png (1.3 MB ) - added by Inari 6 years ago.

Change History (19)

by elexis, 8 years ago

Attachment: commands.txt added

Sample a19 replay

comment:1 by elexis, 8 years ago

I think only a retry for the initial trees is missing. We encountered this problem with island stronghold too, see:

// create initial trees
let tries = 10;
for (let x = 0; x < tries; ++x)
...

by Niek, 8 years ago

Attachment: volcanic_lands.js.patch added

Implements retry functionality, add som missing semicolons on the fly

comment:2 by Niek, 8 years ago

Keywords: patch review added
Milestone: BacklogAlpha 20

by Niek, 8 years ago

Attachment: volcanic_lands.js.2.patch added

Breaking on success is nice

comment:3 by elexis, 8 years ago

In 17909:

Ensure initial trees are placed on volcanic lands and add missing semicolons. Patch by niektb, refs #3808.

comment:4 by elexis, 8 years ago

Keywords: review removed

Thanks niektb for the patch and Itms for the review.

However I'm not satisfied yet with the distribution of forests.

Using the seed mapseed 6063, mapsize normal and the default 8 players given in atlas I get a map where 2-3 players don't have any wood reachable in age 2.

On this map wood should stay scarce so as to motivate players to fight over wood and rush building CCs near enemy forests. But this is not feasible with only those 15ish initial trees.

Should be easily fixable by copying the tree-placement code L230-260 to place exactly one forest in range of a player and then just placing the remaining trees randomly (so don't push it to alpha 21 yet).

comment:5 by elexis, 8 years ago

Milestone: Alpha 20Backlog

Tried rewriting, too meh

comment:6 by light94, 8 years ago

I would like to work on this. How do I use the info you have provided here "Using the seed mapseed 6063, mapsize normal and the default 8 players given in atlas I get a map where 2-3 players don't have any wood reachable in age 2." on my system? P.S I have already set up the build environment locally and its working perfect.

comment:7 by elexis, 8 years ago

Open the atlas editor (pyrogenesis -editor or main menu -> tools & options -> scenario editor). Then you can pick the map, set the mentioned game attributes (playersettings, map seed, potentially others) and click on generate.

It is a common experience that one player doesn't have any wood here. So just starting a number of games on that map will show you how often it occurs. (The more players there are, the higher the probability that one of them doesn't have access to wood).

The initial starting tree algorithm in L120 seems more useful than the one in L230-260, since the latter randomizes (and we can't specify the area where they are placed nicely with the avoidClasses and stayClasses model (since clPlayer is only the area of the civic center))

comment:8 by light94, 8 years ago

Thanks elexis. I am thinking of the following method,based on your comments above. We remove the random placing of forests in L230-260. In addition to the placement of the trees in L120, we add a forest for each player at position

var tX = round(fx + (radius + dist) * cos(tAngle));
var tZ = round(fz + (radius + dist) * sin(tAngle));

tAngle would be randomized. dist is randomized in a very narrow band, say (2,3).

comment:9 by elexis, 8 years ago

Having those 10 +/- starting trees besides the CC isn't bad. Random forests aren't bad either. It should just be ensured that there is at least one forest accessible from the initial territory in my opinion. So the initial tree code would have to be copied to place the initial forest after the initial trees and paint clForest so that the random forests that are placed afterwards ignore the starting forest. The distance from the starting forest to the civic center should be between like 70% and 110% of the initial territory. (For example Iberians start with walls, which might overlap with these trees).

comment:10 by light94, 8 years ago

Ok, but in that case wouldn't some players have more access to the forests (those that are favored by the random distribution) ?

comment:11 by Inari, 6 years ago

Description: modified (diff)

Trying to have a look at this (as evident by asking about it in IRC :D)

Result so far (8 players, mapsize normal, still have to adjust for different mapsizes either way) is attached in three screenshots. 6063, 6064, and 6065 as seeds. The color code:

  • Purple = area around the player's base that is determined as placement point for a forest for that player. It looks a bit uneven because later terrain operations paint over it, but you get the general shape.
  • Red = the actual forest placed at the player's base
  • Yellow = the normal random forests that are littered onto the map.

I guess with the addition of the guaranteed forests the amount of yellow forests should be reduced too?

Also I feel the yellow forests should constrain themselves more to the middle part of the map. If they spawn all around one player's base that player has an advantage, and having them more in the middle means people have to expand to get them. As the ticket noted, a theme of this map is that wood is scarce, making players fight over it. That seems better accomplished by not spawning it all around someones base. But maybe that should be in a different ticket.

Version 0, edited 6 years ago by Inari (next)

by Inari, 6 years ago

Attachment: 6063.png added

by Inari, 6 years ago

Attachment: 6064.png added

by Inari, 6 years ago

Attachment: 6065.png added

comment:12 by Silier, 3 years ago

Keywords: simple removed
severity: simple

comment:13 by Silier, 3 years ago

Keywords: simple added
Note: See TracTickets for help on using tickets.