Jump to content

Oppidum / Two Streams, procedural map with celtic scripted enemy


Recommended Posts

Step 32: Performance improvements from 63 seconds to 41 seconds for a normal sized map, further down to 27 seconds with a library improvement. One of the biggest enemies of map development is the loading screen (and the reason why three days passed until the actors were placed). Behind each of these numbers a different algorithmic and mapdesign problem resides. Map generation should consume less than one second, so one could see an actual map generation preview in the map selection sreen, guess that will never happen.

Spoiler

Generating Oppidum of size 320 and 8 players.
Placing players... 0.016s.
Marking city area... 0.028s.
Painting wall terrain... 0.065s.
Painting ditches... 0.110s.
Creating streams... 1.218s.
Creating parallel substreams... 0.570s.
Painting path near ditches... 0.044s.
Painting gate terrain... 0.063s.
Placing CC... 0.000s.
Painting CC patch... 0.003s.
Painting CC path... 0.003s.
Painting CC water... 0.005s.
Painting middle oppidum circle... 0.006s.
Painting paths connecting the outer and middle oppidum ring... 0.043s.
Painting paths connecting the inner and middle oppidum ring... 0.109s.
Painting paths connecting the CC with the inner ring... 0.011s.
Creating flags near civic center... 0.000s.
Placing large buildings around CC... 2.860s.
Painting oppidum path near walls... 0.006s.
Placing towers near walls... 0.007s.
Placing bridges and fortified gates... 0.037s.
Painting roads starting at gates... 1.212s.
Marking central map area... 0.114s.
Painting road places... 0.061s.
Connecting road places from right to left with the closest player without a path... 0.053s.
Connecting players that don't have a path with road places... 0.017s.
Painting paths between players and road places... 0.092s.
Painting bridge paths... 0.149s.
Placing oppidum buildings... 6.609s.
Creating campfires in the oppidum... 0.046s.
Placing soldiers near the campfires in the oppidum... 0.003s.
Creating settlements... 5.879s.
Creating settlement houses, palisades and decoratives... 0.449s.
Placing decoratives in the oppidum and settlements... 0.326s.
Placing units near buildings... 0.423s.
Placing remote fortresses... 0.285s.
Painting farmlands... 0.200s.
Placing farmsteads and fruits... 0.167s.
Creating perpendicular substreams... 2.702s.
Painting shallows... 0.044s.
Placing shallow flora... 5.128s.
Creating bumps... 1.219s.
Painting water and shoreline... 0.079s.
Creating forests... 1.368s.
Placing trees near roads... 1.577s.
Placing trees in oppidum... 0.789s.
Painting fern areas... 0.014s.
Placing ferns... 0.006s.
Placing metal... 0.049s.
Placing stone... 0.008s.
Creating straggler trees... 0.240s.
Creating fish... 0.835s.
Creating bushes near paths... 0.565s.
Creating bushes near walls... 0.016s.
Creating trees near ditches... 1.535s.
Creating fence near ditches... 0.006s.
Creating houses near ditches... 0.007s.
Creating berries... 0.032s.
Creating sheep and goats... 0.056s.
Creating deer and rabbits... 0.015s.
Creating fox... 0.029s.
Placing flags near roadplaces... 0.084s.
Placing path decoratives... 0.648s.
Placing megaliths and skeletons... 0.001s.
Placing bushes... 0.661s.
Finding flora areas near water... 1.294s.
Placing trees near streams... 1.042s.
Placing bushes near streams... 0.027s.
Placing rocks... 0.120s.
Creating hawks... 0.002s.
Total map generation time: 41.561s.

 

Created a profiler so that we can see the bottlenecks (here a subset of the output):

screenshot.png

The code quality is satisfying, since only two types of commands (createArea and createObjectGroups) are used repeatedly. So the complexity is comparable to a markup language (a composition of styles) but still remaining turing-complete.

4 hours ago, serveurix said:

The Gaia city looks a bit too round to my taste

You are right, it's also something I wanted to improve. But there are some problems with that. The first problem is to compute the tangent angle at an arbitrary area, for example for the fences. But for the walls it's even more difficult because the wall piece angle would not be equal to the angle at the center depending on the shape. I had tried two approaches to create a breadth-first-search Placer that calls different painters depending on the distance to the border of the area (so one could have a winded path from A to B, trees on the right side of the path and a ditch on the left side of the path. The PathPlacer and the paintRiver function do something like that but not quite and it doesn't fit well into the library without some good design idea.) So it seems like that's future development.

4 hours ago, serveurix said:

If I was a city commander I would definitely have those trees cut down

You are right that a promenade would be unlikely near a fortification that the city depends on. Perhaps they got so used to the peacetime, trade and the good life that they beautified the oppidum.

  • Like 1
Link to post
Share on other sites
On 7/19/2018 at 10:10 PM, Nescio said:

Latin has cases. Names are in the nominative. [De] Bello Gallico (about the Gallic War) is ablative, because of the particle de. You probably want Bellum Gallicum (the Gallic war) or Bella Gallica (Gallic wars). And Beautiful Gaul would be Bella Gallia :)

Not Bella Gallica but Belli Gallici (plural neutral nominative of second declension).

 

On 7/19/2018 at 7:03 PM, elexis said:

I couldn't find the gaulish translation yet (or even a good place to find gaulish translations at all)

I doubt you'll find one because very little is known about gallic speach(es) of this time. Some words survived in later languages but there is no written testimony. It was certainly a member of the celtic family but it would be inaccurate to pick something in those. For instance, old britton used in Armorique around 600/700 is not a mere survival of gallic. It received influences from British Isles. More of it, gallic (or gaulish) existed  not as a rather standardized language like latin, there was certainly a wide number of local variations even if people understood them rather well. That's probably why latin spread so quickly in Gaul after the conquest: it offered a common speach, like English nowadays.

Friendly,

  • Like 1
Link to post
Share on other sites
On 7/20/2018 at 4:15 AM, elexis said:

You are right that a promenade would be unlikely near a fortification that the city depends on. Perhaps they got so used to the peacetime, trade and the good life that they beautified the oppidum.

I don't mind the promenade as long as it is not cobbled. But the tree lines on each side of it clash too much with the fortified aspect of the city, IMHO.

Link to post
Share on other sites
2 hours ago, Pyrophorus said:

Not Bella Gallica but Belli Gallici (plural neutral nominative of second declension).

No, you're mistaken. Although second declenation, bellum is neutre, not masculine; nominative (and accusative) singular is bellum, plural is bella. Belli Gallici (of the Gallic War) is genitive singular.

Link to post
Share on other sites
1 hour ago, serveurix said:

I don't mind the promenade as long as it is not cobbled. But the tree lines on each side of it clash too much with the fortified aspect of the city, IMHO.

There should be no trees in front of walls. Trees block the sight of the defenders and give shelter to the attackers, therefore they were typically cut down during construction and not allowed to grow in the empty space surrounding the walls.

Edited by Nescio
ce
  • Like 1
Link to post
Share on other sites

Step 33: Considering Quest-design.

As the map generation concludes, what concerned me most since the last update is which unique triggerscripts and features the map should receive. The "zombie invasion" gameplay known from survival of the fittest, polar sea, danubius and jebel barkal is interesting, but it is not unique anymore. Yet we want to break the status quo with every map.

So I was thinking about RPG elements, such as storytelling and quests.

Quests are mostly combinations of the two elements movement and destruction (go to location/person X, get/bring item/person X, talk to X, kill X units while doing so). The only possibilities that come to my mind:

Main quest: When encountering some delegates of the celtic tribe outside of the oppidum (= passive hero + passive guardians?), a cutscene is triggered with some storytelling, negotiation with the celtic tribe. The talk could end with leaving the player multiple choices, for example whether to cooperate with the people in the oppidum or condoning war. So if the celts are pleased, they would spare one team and attack the other side. If they aren't, they will attack as known from the zombie-outbreak maps. The difference to diplomacy with a Petra bot would be that it's embedded in a story that is unique to the map. This is still one-dimensional. What makes stories good are plottwists, so maybe by some turn of events (being almost wiped out and claiming loyalty with gaia?) players units may flee to oppidum, work for gaia, help gaias cause in fighting the enemy or doing some labor for them. There could be a specific victory condition triggered in such a case, rather than just relying on gaia being militarily able to defeat the other team.

Side quest: It could be that there is a lone celtic woman somewhere that when talked to, triggers a cutscene, tells some short story and if you bring her some entity or unit, you get some ingame benefit such as a treasure or some unlocked map-specific technology (maybe we can do something with the spies feature).

I'm not really convinced by these thought experiments yet, but something like this has to happen eventually. If there is actual storytelling, there should be interesting camera angles and cutscenes while the text is displayed, otherwise it's too boring and the ingame controls are binding attention too much (at least that was my feeling with the tutorial).

11 hours ago, Nescio said:

There should be no trees in front of walls. Trees block the sight of the defenders and give shelter to the attackers, therefore they were typically cut down during construction and not allowed to grow in the empty space surrounding the walls. 

That's militarily more reasonable yes. The oaks are so beautiful there and voidness is so ugly that from a mere visual quality point of view I'd rather keep them even if unrealistic (it's a fictive place, so maybe it's still covered by artistic freedom). Secondly,

that quote could be embedded in the story as is. It's what the experienced roman engineer could say to the people of the foolish celts who never understood the concept of fortifications well, and only built them because there was this one guy fearmongering. Or maybe they took over the ruins from a past tribe and didn't build the fortifications on their own.

Link to post
Share on other sites
6 hours ago, elexis said:

That's militarily more reasonable yes. The oaks are so beautiful there and voidness is so ugly that from a mere visual quality point of view I'd rather keep them even if unrealistic (it's a fictive place, so maybe it's still covered by artistic freedom). Secondly,

that quote could be embedded in the story as is. It's what the experienced roman engineer could say to the people of the foolish celts who never understood the concept of fortifications well, and only built them because there was this one guy fearmongering. Or maybe they took over the ruins from a past tribe and didn't build the fortifications on their own.

Personally I dislike reinforcing the "barbarian" stereortype. Celts did understand fortications; in fact, the massive earthworks of Celtic Britain were possibly the largest ever constructed in Europe. And surrounding walls with meadows or fields (no trees) was common practice since people started fortifying settlements in the Stone Age.

Anyway, you're the artist, so do whatever you like - aesthetics and gameplay can be more important than historicity :)

Link to post
Share on other sites
9 hours ago, elexis said:

The oaks are so beautiful there and voidness is so ugly that from a mere visual quality point of view I'd rather keep them even if unrealisti

Instead of voidness had you got every assets you wanted what would you put there ?

Link to post
Share on other sites
22 minutes ago, stanislas69 said:

Instead of voidness had you got every assets you wanted what would you put there ?

Cattle, flowers, maybe a small mossy rock or two, and perhaps a couple of boys playing in the water.

Link to post
Share on other sites
On 7/19/2018 at 4:48 PM, elexis said:

 

screenshot0806.png

And because I'm already involved in this conversation, another minor detail: nowadays we fence in animals and allow fields to be accessed freely. Historically it was the other way around: animals would roam freely when grazing (under the loose supervision of herdsmen or boys) and farm fields had fences (to keep the animals out).

  • Like 2
  • Thanks 1
Link to post
Share on other sites

Step 34: Becoming artistically inspired by LordGoods awesome Atlas-created oppidum scenery. A new technology for paths that are smaller  than 1 tile is what above map needs, but is not feasible with current code! :bawling:

 

Quote

screenshot0031.png.0cdd15e7fb9861511f31e67ce46bb4cc.png

 

  • Like 1
Link to post
Share on other sites

Not sure if it could help (or more: give some clues by looking at the code behind it) but it's possible to draw very small texture paths in Atlas by setting the brush size to 1 and then use the right mouse button behind it :) (not sure how it works but it seems like you can paint edges instead of tiles, I always used it to create softer edges and transitions without straight angles :))

  • Like 1
Link to post
Share on other sites

Thanks, I didn't know that Atlas feature! It seems when rightclicking, the 4 vertices still have the texture of the surrounding tiles but the center edge receives the different texture. It must be that blending thing that isn't supported currently in rmgen. The main problem is computing if a given position is obstructed by a building or not in a more precise manner. (Probably only requires biting the bullet for a number of days.)

  • Like 2
Link to post
Share on other sites
  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...