[Patch] Multiple (Flat) Worlds

Post Reply
User avatar
duane
Member
Posts: 1715
Joined: Wed Aug 19, 2015 19:11
GitHub: duane-r
Location: Oklahoma City
Contact:

[Patch] Multiple (Flat) Worlds

by duane » Post

Awakened from a nap by a feverish notion, Duane worked tirelessly for 20 minutes, before revealing his ghastly experiment to the world. Some called it genius, some called it madness -- okay, most called it madness.

This is a very simple patch to the flat mapgen to create 10 extra worlds at different altitudes. Every 6km up or down is another layer of terrain, water, and decorations.

Of course there are some caveats to this.
- The surface terrain is repeated exactly as originally generated.
- It only works on the flat mapgen (but hills and lakes work).
- Biomes are placed with the actual altitude, so the default game's water biomes don't work higher than zero-world, and you get only underground biomes below. (Look below for a fix.)
- Worlds below zero-world are dark. That's built into the game. (Again, see below.)
- Caves are created based on real altitude, which could result in caves/lava intruding on your terrain below zero-world (with hilarious results).

Why would you want this? Extra space? If you limit the default biomes with y_max and y_min, you can create a new set of biomes for each world. You could have desert on one and snow on another in the same place. You could fix your mob mod to make monsters harder on each successive world. You could assign one world to each member of your family (I don't want to know who gets the dark ones).
Spoiler
Image
Edit: I've banged together a small mod to fix the default biomes/decorations for this patch. It still can't deal with water surface decorations, but gets quite a bit right.

https://github.com/duane-r/flat_layer

Edit: I've discovered that recalculating the lighting seems to make the below-zero layers work fine too. No problems so far. I'm including the fix in my ruins mod.

The patch
Attachments
screenshot_20190529_175839.jpg
screenshot_20190529_175839.jpg (407.57 KiB) Viewed 270 times
Last edited by duane on Fri May 31, 2019 04:29, edited 5 times in total.
Believe in people and you don't need to believe anything else.

User avatar
duane
Member
Posts: 1715
Joined: Wed Aug 19, 2015 19:11
GitHub: duane-r
Location: Oklahoma City
Contact:

Re: [Patch] Multiple (Flat) Worlds

by duane » Post

I have everything working, except for some water decorations like lily pads and coral. Lighting seems to be normal, and I haven't found any serious issues with the game. I can now get results like this on all eleven layers (with C++ generation speed).

Image

The lighting below zero-world requires my flat_vm mod (or any mod that relights those chunks). The decorations and biomes are copied by my flat_layer mod. I could (and will) make different biomes for each layer, allowing for a completely different feel on each world.

I'm thinking of a nice hellscape for at least one.
Attachments
screenshot_20190530_210634.jpg
screenshot_20190530_210634.jpg (342.81 KiB) Viewed 270 times
Believe in people and you don't need to believe anything else.

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Patch] Multiple (Flat) Worlds

by texmex » Post

That’s pretty great. Will you do a PR?

User avatar
duane
Member
Posts: 1715
Joined: Wed Aug 19, 2015 19:11
GitHub: duane-r
Location: Oklahoma City
Contact:

Re: [Patch] Multiple (Flat) Worlds

by duane » Post

texmex wrote:That’s pretty great. Will you do a PR?
Very unlikely. I doubt there's much demand for more worlds per game. People are probably more interested in being able to move between games. I can't believe that's not a feature yet.

In theory you could make a table of mapgens and ranges and run any combination of them together. It shouldn't be much harder than this. I could probably make it work eventually, but I doubt I could build the user input and sanity checking. Anyway, it sounds like too much work, and who's going to maintain it?
Last edited by duane on Sat Jun 01, 2019 07:33, edited 1 time in total.
Believe in people and you don't need to believe anything else.

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: [Patch] Multiple (Flat) Worlds

by ShadMOrdre » Post

I believe in you duane.

u18398

Re: [Patch] Multiple (Flat) Worlds

by u18398 » Post

duane wrote: People are probably more interested in being able to move between games. I can't believe that's not a feature yet.
Multiple worlds you can already find on some servers. Like switching between earth, moon etc, but moving between games or even servers would be a nice feature. I succeeded in changing stuff between different servers but I still have
no idea how a player could switch between them. You got no hint for me ? :)

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Patch] Multiple (Flat) Worlds

by texmex » Post

Closest thing to a multi-server effort I’ve seen is this project: https://github.com/andrewvy/knot

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: [Patch] Multiple (Flat) Worlds

by TumeniNodes » Post

duane wrote: People are probably more interested in being able to move between games. I can't believe that's not a feature yet.
I think moving between world folders would be ideal.
i.e. create a new world, and then to be able to create additional worlds in a 'sub-worlds' folder within that world folder.
This would be a big deal.
A Wonderful World

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests