REmapper Ideas / Planning

Ideas for future research and work. Classic procgen blogpost where she wants to reinvent the world from first principles and wants everyone to think that was a good idea.

Date
Repo hexylena/remapper
Tags gamedev,mapgen

Evolving Villages

Ok, so if we’re building up villages on flat ground now (particularly egyptian ones, can we evolve them?)

Probably not.

We could simulate population, place houses, develop rules for population sizes at which you need an X class of building (e.g. a church / a market / government buildings) but that gets awful close to have apple and is (as evidenced by my progress there, a huge amount of work.)

Ok, let’s restrict it to just simulating an egyptian village, maybe we lay it out randomly and not worry too much. Apply some symmetry, some general rules for layout, it’ll be OK.

Thought: Could we use BSP here? layout some “rooms” which are actually the big buildings, then the walkways between the big ones are streets, and then layout houses off of the streets? Doubtful we could get good verticality.

It’d be nice to have a river running through…

Research

Thoughts

  • Roman fortresses are small and probably a tractable thing to implement, however incredibly dull (completely flat terrain, mostly single story buildings, etc.)
  • The city layout is awesome and impressive, but it is large. Especially things like Elburg, this would be great to implement but is far, far too large for the preferred game size. Let’s start by implementing a simple city block, that’s a reachable target. Maybe we can squash some city blocks together? It would be overly regular, but … maybe this isn’t so bad.
  • Historical urban planning is not a popular topic.

City Block Layout Test

  • Buildings should be placed around the edges
  • A courtyard should be built (space permitting)
  • (if there is a courtyard) One of the buildings should be replaced with a gateway
    • does placement matter? Should we be concerned with placing the entrance on a less-busy street?
  • Buildings need a walkway runing from outside wall to courtyard
  • Place corner buildings first? Those might be tricky otherwise.
  • BSP? BSP per-edge could work.

See /js/cityblock.js for the source.

Well heck, that worked pretty OK! Let’s add a some entrances and a courtyard where we can place various … stuff.

See /js/cityblock2.js for the source.

Courtyard Layout Test

but what about that empty space? could have a garden thing. or a small green space with trees. maybe walkways. maze?

See /js/courtyard1.js, /js/courtyard2.js, /js/courtyard3.js, /js/courtyard4.js, /js/courtyard5.js, /js/courtyard6.js for sources.

Those look… alright? the asymmetry of the penultimate one really bothers me. It’s a nice overall design and I like the transition from grid on 90° to on 45° offset. That’s kinda cool. The last one is probably the most plausible.

Should add other features that are more interesting than just an orchard. And orchards are just especially boring even if with fun patterns.

  • raised flowerbeds (offering some cover)
  • park benches (flavor)
  • ponds (irregular shapes?)
  • ponds (regular shapes, raised border?)
  • empty areas?
  • tiny soccer pitch

Interiors

Nice houses around the edge but no interiors developed yet. As always, would be nice if the houses were themeable somehow. Most house design seems to revolve around a “backbone” and then rooms of various sizes sprouting from there.

I’ve done some reading in the past here to develop accurate interiors but that is a complex and ongoing area of research. And this is a game, one that’s rendered in relatively low detail, and usually without models if it is coming from the remapper project. We can get away with really incredibly basic interiors.

We could use more or less the same building blocks that are in use with the prefabs. Or at least use them for reference sizes.

  • Should try to have more variables for better variety, otherwise they’ll be incredibly boring.
  • Consider punching doorways in multiple buildings?

See /js/apartment.js for the source.

Fortresses / Battlements

Would be nice to build fortresses. The ones in AC:O are really quite nice. Notable features:

  • boundary wall
  • stuff inside?
  • sometimes boundary wall is wide enough to walk around
  • if border wall connects to buildings then the top level should be used, put some tables or stuff on top
  • gates?
  • what shape, regular, not?
  • Can this be evolved? from a tiny temporary foritifaction to something larger?
  • Time setting? Are they historical camps? European? Middle eastern? HESCOs everywhere?

Research

Testing

Ok, enough reading, can we build a simple outpost. Just as proof o concept. Bare minimum would be:

  • tents
  • watch tower
  • barrier wall.

Rivers

Well at least we can simulate a river, right?

Research

Hahahah no.

Well let’s settle for something that looks enough like a river that no one bats an eye.

Erosion

Did not even attempt.

Random Walks

The random walk approach seemed easy enough to implement and doesn’t look horrible?

Random walks from (0,0) to (10, 10)
Random walks from (0,0) to (10, 10)

The algorithm was supposed to avoid overlapping with itself but that apparently seriously decreases the amount of random walks we discover. So we limited serious overlaps and it works well enough.

Four example outputs from the random walk algorithm
Four example outputs from the random walk algorithm

I applied some (poorly implemented) dilation to the resulting river which turned out pretty well. The results look pretty decent, they’ll probably even look OK inside a redeclipse map as well.

The same four example outputs after the dilation has been applied.
The same four example outputs after the dilation has been applied.

I originally coded it with the intention of having no overlaps since those seemed implausible but it seems to have created a nice delta effect when occuring near the goal.

TODO

This implementation sucks for a whole host of reasons:

  • No branching
  • No heightmap included so doesn’t make any sense
  • Curves are horrifically un-smooth in places
  • No width change that would come with heavy flow

But is such a thing necessary for the scale of RE maps? No possibility to see such global changes as erosion or rivers delta unless the entire map is set atop a river delta. Maybe this belongs in a different project.