Trailgen C++ mgv6-like mapgen using the biome api(Now Updated to version 1.0)

For people working on the C++ code.
Post Reply
Cartmic
Member
Posts: 43
Joined: Thu Jul 12, 2018 18:03

Trailgen C++ mgv6-like mapgen using the biome api(Now Updated to version 1.0)

by Cartmic » Post

Trailgen

Trailgen is a v6-like Minetest C++ mapgen which uses the biome api.

Version 1.0 has the option to adjust the map generation height, setting a value of 2 makes dropping a v6 world into a trailgen world a little smoother where the map types meet. Setting a value of 0 reduces, from my experience, the amount of shoreside you'll get along coast lines and inner land ponds.

I hope you have fun with it!

Image

Installation:

Repo: https://github.com/Cartmic/trailgen

Replace the files in the 'trailgen/minestest' folder into the relevant places.

Code: Select all

minetest_source_directory
		---->builtin
			---->mainmenu
				---->dlg_create_world.lua
			---->settingtypes.txt
		---->src
			---->mapgen
				---->CMakeLists.txt
				---->mapgen.h
				---->mapgen.cpp
				---->mapgen_trailgen.h
				---->mapgen_trailgen.cpp

		---->settings_translation_file.cpp
Attachments
screenshot.png
screenshot.png (907.68 KiB) Viewed 2076 times
Last edited by Cartmic on Sat Dec 03, 2022 13:40, edited 2 times in total.
Trailgen A C++ mgv6-like mapgen using the biome api viewtopic.php?f=7&t=26751

User avatar
Minix
Member
Posts: 144
Joined: Thu Nov 12, 2020 13:51
In-game: Minix

Re: Trailgen C++ mgv6-like mapgen using the biome api.

by Minix » Post

This looks interesting, what features does this mapgen bring over normal v6 ?

Using the biomes API means mods that use such API to gather data would then work as expected, like the moretrees mod from VanessaE am I right ?

Cartmic
Member
Posts: 43
Joined: Thu Jul 12, 2018 18:03

Re: Trailgen C++ mgv6-like mapgen using the biome api.

by Cartmic » Post

Minix wrote:
Wed May 19, 2021 19:39
This looks interesting, what features does this mapgen bring over normal v6 ?

Using the biomes API means mods that use such API to gather data would then work as expected, like the moretrees mod from VanessaE am I right ?
Trailgen varies from v6 in that it puts it in league with the modern mapgens like v7 which use the modern biome system rather than v6's hard coded biomes.

VanessaE's moretrees uses her biome_lib just for the growth of plants and trees and was designed before Minetest got a modable biome system of it's own.
Trailgen A C++ mgv6-like mapgen using the biome api viewtopic.php?f=7&t=26751

User avatar
Minix
Member
Posts: 144
Joined: Thu Nov 12, 2020 13:51
In-game: Minix

Re: Trailgen C++ mgv6-like mapgen using the biome api.

by Minix » Post

I will be waiting for trailtest then, I might make an attempt at compiling minetest with trailgen this weekend to see how it works.

Cartmic
Member
Posts: 43
Joined: Thu Jul 12, 2018 18:03

Re: Trailgen C++ mgv6-like mapgen using the biome api.

by Cartmic » Post

Minix wrote:
Wed May 19, 2021 20:49
I will be waiting for trailtest then, I might make an attempt at compiling minetest with trailgen this weekend to see how it works.
Cool!

I just updated the filler depth as the dirt was a little too deep. The spawn code isn't great, I often find myself spawning underground, so I'll give some more thought about how to fix that.
Trailgen A C++ mgv6-like mapgen using the biome api viewtopic.php?f=7&t=26751

Cartmic
Member
Posts: 43
Joined: Thu Jul 12, 2018 18:03

Re: Trailgen C++ mgv6-like mapgen using the biome api.

by Cartmic » Post

The spawn code is now fixed, I tested it a few times and it appears to be working okay now.
Trailgen A C++ mgv6-like mapgen using the biome api viewtopic.php?f=7&t=26751

User avatar
Minix
Member
Posts: 144
Joined: Thu Nov 12, 2020 13:51
In-game: Minix

Re: Trailgen C++ mgv6-like mapgen using the biome api.

by Minix » Post

I compiled minetest-f3e51dca155ce1d1062a339cf925f41d7c751df8 (5.4.0 release) server with the latest version of trailgen as of writing this post. I did some tests using normal v6, trailgen and adding ethereal to v6 and trailgen, the biome support works great, you did a good job. All tests were done on the seed 8866517838305885116.

Now it is possible to use ethereal in v6-like mapgen.

I attached some screenshots to compare normal v6, trailgen and trailgen with ethereal respectively.
Image
Image
Image

Ethereal on v6 does not work, the biomes from the mod do not appear and trees spawn too close to each other, but with trailgen it works fine.

The issues I had were that I spawned at -256,0,-256 which was underground, maybe the spawn problem is not fully fixed yet, also there seems to be no lava in the caves, I went to -20000 and found no lava after flying for a while.
Attachments
v6_trailgen_ethereal_8866517838305885116.png
v6_trailgen_ethereal_8866517838305885116.png (854.11 KiB) Viewed 3228 times
v6_trailgen_8866517838305885116.png
v6_trailgen_8866517838305885116.png (815.02 KiB) Viewed 3228 times
v6_8866517838305885116.png
v6_8866517838305885116.png (721.49 KiB) Viewed 3228 times

Cartmic
Member
Posts: 43
Joined: Thu Jul 12, 2018 18:03

Re: Trailgen C++ mgv6-like mapgen using the biome api.

by Cartmic » Post

Minix wrote:
Sat May 22, 2021 19:18
I compiled minetest-f3e51dca155ce1d1062a339cf925f41d7c751df8 (5.4.0 release) server with the latest version of trailgen as of writing this post. I did some tests using normal v6, trailgen and adding ethereal to v6 and trailgen, the biome support works great, you did a good job. All tests were done on the seed 8866517838305885116.
Thanks!
Minix wrote:
Sat May 22, 2021 19:18
Now it is possible to use ethereal in v6-like mapgen.

I attached some screenshots to compare normal v6, trailgen and trailgen with ethereal respectively.

Ethereal on v6 does not work, the biomes from the mod do not appear and trees spawn too close to each other, but with trailgen it works fine.

The issues I had were that I spawned at -256,0,-256 which was underground, maybe the spawn problem is not fully fixed yet, also there seems to be no lava in the caves, I went to -20000 and found no lava after flying for a while.
Thanks for testing it. I'll keep on at the spawn code then. As for the lava could you try -400, -410, -560? I found some lava down there on the same seed of yours using the same version.
Trailgen A C++ mgv6-like mapgen using the biome api viewtopic.php?f=7&t=26751

User avatar
Minix
Member
Posts: 144
Joined: Thu Nov 12, 2020 13:51
In-game: Minix

Re: Trailgen C++ mgv6-like mapgen using the biome api.

by Minix » Post

I loaded the same seed and went to those coordinates, indeed there were some lava pools, so lava does generate.

Cartmic
Member
Posts: 43
Joined: Thu Jul 12, 2018 18:03

Re: Trailgen C++ mgv6-like mapgen using the biome api.

by Cartmic » Post

Good news! Spawning is actually working now! Also the seeds can be shared between v6 worlds now, aside from from some extra dirt with grass I saw on of a small island in v6 and of course the different biome system, the land generation can now share the same seed with both mapgens.

Additional note: Apologies to those who downloaded the commit just after I had posted it as I found later that I spawned in half in a block at at ground level, so I simply increased the responsible number in commit '33f2ac39049a9da52198f68044f73a7fa240cff8'.
Trailgen A C++ mgv6-like mapgen using the biome api viewtopic.php?f=7&t=26751

User avatar
jwmhjwmh
Developer
Posts: 125
Joined: Sun Jul 18, 2021 14:10
GitHub: TurkeyMcMac

Re: Trailgen C++ mgv6-like mapgen using the biome api.

by jwmhjwmh » Post

Your work here is very cool. I hope it gets integrated into the engine eventually. I like being able to have v6-style landscapes with custom biomes.

Cartmic
Member
Posts: 43
Joined: Thu Jul 12, 2018 18:03

Re: Trailgen C++ mgv6-like mapgen using the biome api.

by Cartmic » Post

jwmhjwmh wrote:
Wed Sep 29, 2021 12:18
Your work here is very cool. I hope it gets integrated into the engine eventually. I like being able to have v6-style landscapes with custom biomes.
Thank you!
Trailgen A C++ mgv6-like mapgen using the biome api viewtopic.php?f=7&t=26751

Cartmic
Member
Posts: 43
Joined: Thu Jul 12, 2018 18:03

Re: Trailgen C++ mgv6-like mapgen using the biome api(Now Updated to version 1.0)

by Cartmic » Post

Version 1.0

Time for a release! Welcome to version 1.0!

I've decided to release this version as full a release putting an emphasis on 'v6-like' rather than a v6 clone, but I have made sure that v6 worlds line up a little better than before via the new Adjust Map Height(map_height_mod) option. Setting the Adjust Map Height to '2' will, with some minor discrepancies, line up a v6 world to a trailgen world.
Trailgen A C++ mgv6-like mapgen using the biome api viewtopic.php?f=7&t=26751

User avatar
jwmhjwmh
Developer
Posts: 125
Joined: Sun Jul 18, 2021 14:10
GitHub: TurkeyMcMac

Re: Trailgen C++ mgv6-like mapgen using the biome api(Now Updated to version 1.0)

by jwmhjwmh » Post

Could you open a PR to add this to Minetest? Some core developers (including myself) support the idea, as you can see from the comments on https://github.com/minetest/minetest/issues/12981

Cartmic
Member
Posts: 43
Joined: Thu Jul 12, 2018 18:03

Re: Trailgen C++ mgv6-like mapgen using the biome api(Now Updated to version 1.0)

by Cartmic » Post

jwmhjwmh wrote:
Sat Dec 03, 2022 16:23
Could you open a PR to add this to Minetest? Some core developers (including myself) support the idea, as you can see from the comments on https://github.com/minetest/minetest/issues/12981
Thanks! Yeah I'll open a PR now!

Edit: I just opened a pull request: https://github.com/minetest/minetest/pull/13019
Trailgen A C++ mgv6-like mapgen using the biome api viewtopic.php?f=7&t=26751

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest