Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support "groundcover" mapgen terrain #22268

Closed
Coolthulhu opened this issue Oct 27, 2017 · 2 comments
Closed

Support "groundcover" mapgen terrain #22268

Coolthulhu opened this issue Oct 27, 2017 · 2 comments
Labels
<Enhancement / Feature> New features, or enhancements on existing Map / Mapgen Overmap, Mapgen, Map extras, Map display

Comments

@Coolthulhu
Copy link
Contributor

Currently every mapgen specifies own ground cover terrain. Many entries have differing amounts of grass vs dirt, some swamp mapgens have incorrect furniture placement (cattails on dry ground). This can be pretty jarring due to square nature of mapgen.

I see two options:

A fake terrain type is supplied. During mapgen, it is replaced with biome's default ground cover.
Advantages:

  • Groundcover can be specified as fill_ter, mapping or placement, whichever is the most convenient
  • Simple
  • Probably faster than the alternative below

Each mapgen entry gains an optional (later possibly mandatory) field that describes what is it placed on. For example, most houses would be placed on a field, but swamp shack would be placed on swamp.
During mapgen, the types are processed sequentially: first a field is generated, then a house is generated on the field.
Advantages:

  • Support for partially-jsoned mapgen (hardcoded swamp, jsonized shack on it)
  • Support for furniture (cattails) due to the above
  • Depending on implementation, could allow more "natural" results, like small house bordering a forest having more trees in its square
@Coolthulhu Coolthulhu added <Enhancement / Feature> New features, or enhancements on existing Map / Mapgen Overmap, Mapgen, Map extras, Map display labels Oct 27, 2017
@BevapDin
Copy link
Contributor

The second option sounds good, but is a bit more complicated: the second mapgen process must clear some of the first mapgen data and not just add its own data.

E.g. first mapgen adds shallow water tile and cattail on top of it. The second mapgen changes that into the floor of a house but it must also remove the cattail furniture. Current mapgen simply leaves the furniture as it (and it was initially set to f_null all over the map).

Same with items that had been spawned during the first mapgen and traps (don't want sinkholes inside the house).

@ZhilkinSerg
Copy link
Contributor

Solved in #35627

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Enhancement / Feature> New features, or enhancements on existing Map / Mapgen Overmap, Mapgen, Map extras, Map display
Projects
None yet
Development

No branches or pull requests

3 participants