Andrettin / Wyrmsun

Strategy game based on history, mythology and fiction
http://andrettin.github.io/
GNU General Public License v2.0
301 stars 47 forks source link

Clutter of similar type objects in random maps #206

Open SenhorFlibble opened 2 years ago

SenhorFlibble commented 2 years ago

It seems that the random map generation algorithm has a predilection of placing two or more similar objects (building sites, ore mines) next to each other, in a way they'd probably never be placed on a hand-crafted map -- e.g. several ore mines standing right next to each other.

Sometimes these clusters of mines and/or building sites block unit movement or can even potentially disrupt normal base-building.

Here's a few examples, all taken in scenario and legacy quest maps: screen01 screen02 screen03

Andrettin commented 2 years ago

Thanks for the report!

The issue with the Nidavellir scenario map was that building sites were only being generated in the submaps, but not in the transition space between them*. I've updated the Nidavellir map to generate building sites on the transition spaces as well.

*The Nidavellir map is built by placing submaps, and then generating the transitioning spaces between them.

For the legacy quest maps I haven't found any indication that this isn't just randomness. I've added some automated tests for the random number generation, and it seems to be working fine.

SenhorFlibble commented 2 years ago

Thanks!

I have to note though, the randomness in scenario maps sometimes leads to drastically different experience.

Yesterday I started playing A Home in the Fields of Sand scenario, and the path to the town location went right through a goblin settlement (as the opening dialogue suggested), and I lost almost every unit trying to fight through them. Today, I played this anew (the map had a different layout of course), and found no resistance whatsoever on the way to the town site. Moreover, when I decided to keep playing after I reached it, I found that all other factions on the map (goblins, gnomes and dark gnomes) were all neutral/friendly to me, even though the objectives said to defeat all rivals. So there was nothing else to do except build up peacefully.

Andrettin commented 2 years ago

I agree that randomness has to be kept in check so as to not create situations which aren't desirable. The building site generation for legacy maps, for instance, could be improved by forbidding building sites from being generated adjacent to each other.

For the Joruvellir scenario, one possible solution would be to make the "transition" areas in Nidavellir have plenty of neutral enemies generated in them, so that passing through the goblin swamplands would be the preferable route. And even if the player takes a different route, there would still be a challenge.

The "defeat all rivals" is supposed to mean non-allied players. You can become hostile to those neutral players by changing the diplomacy stance towards them in the diplomacy dialog. If you have a suggestion as to how I could make the meaning of the objective more intuitive, I would be happy to hear :)

SenhorFlibble commented 2 years ago

You can become hostile to those neutral players by changing the diplomacy stance towards them in the diplomacy dialog.

I guessed that much, but I kind of feel uncomfortable to basically declare war on friendly neighbours without any real provocation. Not exactly a thing that the "good" dwarves would do I suppose.

On a related note, I wonder if you are familiar with the game Horde: The Northern Wind? It's a Russian Warcraft "kind-of" clone with a very sandbox-y approach to gameplay. I frequently get thoughts that Wyrmsun is rather leaning towards a similar gameplay style, albeit with some possible interesting improvements, but it is not quite there yet.

Horde has a very rudimentary but functional diplomacy, in that the AI can of its own accord declare war, ally or beg for peace with the player, and can be sent similar declarations by the player too. For example, when the player gains the upper hand, the AI will offer to submit and pay tribute in exchange for leaving its settlement alone. Once it builds up and feels more confident, it will tell the player it no longer wants (or can) send tribute, leaving it for the player to decide whether to declare a war again.

Even when an AI player is wiped off the map in Horde, there's a chance they'll come back later and start building up again, although the AI in the game is too weak to pose a serious threat in such case (it can do some extra tricks like bribing the player's units though). Nevertheless, it's a functional persistent world, and I think Wyrmsun's big scenarios could work in a similar fashion.

I've always wanted to be able to trade with allied nations in Horde, and Wyrmsun has that, although I've not made any meaningful use of the trade option in any of the scenarios or quests so far.

Here's a video playthrough of the English version of Horde if you're interested. There's also a playable demo version.

SenhorFlibble commented 1 year ago

I've played a bit of the latest version, with minor building sites added. I'm not entirely sure how this affects playing strategies yet, but it is far less restrictive than I expected it to be.

I wonder though if building sites could be made passable through for ground units? That would eliminate the clutter problem almost entirely. In Warcraft II and in the original Wargus, oil patches can passed over by naval units but function similarly to building sites, i.e. oil platforms can only be built on top of them.

Also an idea occurred to me, it seems logical from the in-game world perspective for farms to be built on fertile land. Indeed, in games like Age of Empires I was a bit bothered that one can build patches of farmland everywhere, neglecting the fact that in real life, some land is better suited for farming than other (I think The Fertile Crescent rectifies this by linking different farm productivity to terrain type). I suppose it could be possible to make patches of fertile land as the only places to build farms, entirely passable by ground units when nothing's built on top of them yet.

Similarly, one could imagine "hallowed sites" suitable for building temples as a substitute for the more generic building sites.

What do you think?

Andrettin commented 1 year ago

I wonder though if building sites could be made passable through for ground units?

Code-wise it would be a simple change to do (just a minor tweak to the definition of the building sites). I tried that out in-game after reading your suggestion, but I'm not sure how I feel about it... it's not bad, but I think on balance the building sites not being passable feels better to me.

Also an idea occurred to me, it seems logical from the in-game world perspective for farms to be built on fertile land.

I think buildable farms on farmland are a good idea, but IMO it would work better for a new 3x3 building representing larger farms (e.g. "Manor" or "Estate"). The reason for that being that the 2x2 farms represent not just small farms, but also basic dwellings.

Similarly, one could imagine "hallowed sites" suitable for building temples as a substitute for the more generic building sites.

Yeah :) Something like a "Holy Site" being required for temples would be nice. I wonder how that could be represented graphically...

SenhorFlibble commented 1 year ago

Code-wise it would be a simple change to do (just a minor tweak to the definition of the building sites). I tried that out in-game after reading your suggestion, but I'm not sure how I feel about it... it's not bad, but I think on balance the building sites not being passable feels better to me.

I've played a bit more of random maps, and I'm noticing that random map layouts often create bottlenecks that are just problematic for unit movement, and impassable building sites simply exacerbate the problem.

For example, one random forest map placed my position to the south of the enemy, with several openings created between rocks, forest and some water, with only a few minor sites along this border to actually defend my settlement. In retrospect I realise that I should have just used walls to block these, but since the game forces me to place towers only on minor sites, I had to stretch my defences. The goblins kept coming through both large openings and I had to move a mobile force between the two to fend them off. After I pushed back one wave, they started attacking the other towers (and the minor sites there were too far apart so the towers did not cover each other). I sent my force there but they had a rough time navigating all the obstacles in their way (pathfinding isn't the best in Stratagus you know), and got slaughtered to the last man even before they reached the towers, or what was left of them by that point.

I'm attaching the screenshots below to show the three possible entrances into my territory on that map. Only two had any building sites, and those were not sufficient.

I'm also wondering what exactly are these building sites supposed to represent in-game wise? Is it that someone reserved land for construction but did not use it? Some other settlers left unfinished buildings? Why, from the standpoint of game lore, only some buildings can be constructed on these sites but others may be built everywhere?

I would more readily imagine something like ruins from a previous civilization or old times, which may be rebuilt into useful buildings. Ruined farmsteads, ruined towers and temples, that seems realistic to me in the context of a historical and mythological setting. I believe it was not uncommon in both mediaeval times and classical antiquity to repurpose old structures made from durable materials, even if damaged or in ruins. Temples and other buildings rebuilt into churches, etc. In-game, such ruins could perhaps allow to build something at reduced cost (let's say 75pc of original cost).

Back to the towers though, considering the above I'm not sure if the minor building sites system is totally adequate. I agree that there must be a way to limit the player and prevent the spamming of towers, but in the current state, the player is completely at the mercy of the random map generator and where it happens to place these building sites. Perhaps you could consider other ways to limit the player? IIRC in Rising Kingdoms, there are "glory points" that the player earns by killing enemies, which are spent on farms and towers if I'm not mistaken. This sounds like a more player-friendly approach to me as it encourages a more proactive stance in the game while not restricting where to actually place any buildings.

Anyway, the screenshots: 370070_20220920235146_1 370070_20220920235156_1 370070_20220920235309_1

Andrettin commented 1 year ago

Hey, sorry for the late response. I've been pretty sick for the past few days, so I'll write a proper answer to your post when I'm fully healthy (hopefully soon).

Andrettin commented 1 year ago

Sorry for the delay in answering; as I mentioned above, I was sick for a while.

I've played a bit more of random maps, and I'm noticing that random map layouts often create bottlenecks that are just problematic for unit movement, and impassable building sites simply exacerbate the problem.

I am changing the custom maps - including the random ones - to have the building sites feature disabled for the next version, so that they will provide an experience closer to classic RTSes. So this issue should no longer be present with the next version, at least regarding the custom random maps.

I'm also wondering what exactly are these building sites supposed to represent in-game wise? Is it that someone reserved land for construction but did not use it? Some other settlers left unfinished buildings? Why, from the standpoint of game lore, only some buildings can be constructed on these sites but others may be built everywhere?

I would consider them something like places where you would have some sort of small village, or city district, which would support a building being placed there. Constructing a building near a pre-existing population nexus would be a simpler matter than building it somewhere in the wilderness.

About the towers, one idea would be to make them require either a minor building site, or being placed adjacent to a border with another player.