[Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pathv7]

Post Reply
User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

[Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pathv7]

by paramat » Post

Image

For Minetest 0.4.13 and later
Depends default
Licenses: Code LGPLv2.1, textures CC BY-SA 3.0
Download ZIP, extract and rename to 'pathv7' https://github.com/paramat/pathv7/archive/master.zip
Browse code https://github.com/paramat/pathv7

Use with mapgen v7 only. This is the mgv7 version of my mod 'pathv6alt' but also simplified and improved.
Creates a worldwide network of walkable / drivable wooden roads, bridges and lighted tunnels.
There are 4 2D noise networks, each with a different scale, crossroads are found at network intersections.
All slopes are half-node steps so no jumping required, most car mods can cope with the slopes.
Mgv7 terrain noises are used to make the road height roughly follow the terrain, it does the best it can considering it needs to rise at cliff terrain, inevitably it will sometimes rise or sink for seemingly no good reason.
Currently limited to a maximum height of y = 42 due to unsolved mapchunk border issues.

Image
Last edited by paramat on Sun Dec 18, 2016 02:41, edited 5 times in total.

User avatar
TheReaperKing
Member
Posts: 531
Joined: Sun Nov 22, 2015 21:36
Contact:

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.3] [pat

by TheReaperKing » Post

Sooooo awesomeeee Seems like this needs to be comboed with cityscape :)
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.3] [pat

by azekill_DIABLO » Post

awesome!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

KCoombes
Member
Posts: 427
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt
Location: SW Florida, USA

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.3] [pat

by KCoombes » Post

Very nice!

u34

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.3] [pat

by u34 » Post

+1 awesome mod!

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.3] [pat

by paramat » Post

Here's something new for use in mgv7 https://github.com/paramat/roadv7

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pat

by paramat » Post

Version 1.5 has all 3 memory use optimisations i detailed elsewhere, so should hopefully be suitable for those using LuaJIT and not cause OOM errors (out of memory).

User avatar
FreeLikeGNU
Member
Posts: 280
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pat

by FreeLikeGNU » Post

these look really cool. Theres a kind of post apocalyptic vibe when seeing structures like this through the overgrowth. Like some advanced bronze age civilization had vanished from here.

User avatar
ManElevation
Member
Posts: 896
Joined: Tue Aug 02, 2016 22:04
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
Location: Madrid,Spain

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pat

by ManElevation » Post

that's pretty cool
My Public Mods! Discord: Rottweiler Games#3368

Emojiminetest
Member
Posts: 38
Joined: Sat Jun 06, 2020 00:21
GitHub: Emojigit

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pathv7]

by Emojiminetest » Post

I Have an updated version that replaced some old calls: https://content.minetest.net/packages/E ... st/pathv7/

Merak
Member
Posts: 116
Joined: Sat Nov 05, 2016 20:34

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pathv7]

by Merak » Post

Emojiminetest wrote:
Sat Jul 17, 2021 04:27
I Have an updated version that replaced some old calls:
I tried it and see no effect, except for 'bridge wood' in the inventory. I was using MG7 in a newly created world.

Could we get a fly-through video of what we should be seeing?

Emojiminetest
Member
Posts: 38
Joined: Sat Jun 06, 2020 00:21
GitHub: Emojigit

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pathv7]

by Emojiminetest » Post

Merak wrote:
Sat Jul 17, 2021 11:28
Emojiminetest wrote:
Sat Jul 17, 2021 04:27
I Have an updated version that replaced some old calls:
I tried it and see no effect, except for 'bridge wood' in the inventory. I was using MG7 in a newly created world.

Could we get a fly-through video of what we should be seeing?
Actually, you will see no difference between the two pathv7 versions. My version replaces some depresated engine calls, that is having no difference visually.

0siribix
Member
Posts: 123
Joined: Tue Nov 17, 2020 20:54
GitHub: 0siribix
In-game: 0siribix

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pathv7]

by 0siribix » Post

Could someone please show how to use this at a different height? I;ve been tinkering and I can't seem to generate anywhere other than 0 ground level. For example, I want to use this on another layer like AiTechEye's Dimensions

User avatar
Blockhead
Member
Posts: 1602
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pathv7]

by Blockhead » Post

0siribix wrote:
Tue Mar 22, 2022 15:52
Could someone please show how to use this at a different height? I;ve been tinkering and I can't seem to generate anywhere other than 0 ground level. For example, I want to use this on another layer like AiTechEye's Dimensions
Well this got me in way over my head. After expanding the y range check and preventing multidimensions from overriding pathv7 with air nodes, the generation is still very patchy and seems to cut off at random. It's very tightly tied to the surface level of mapgen v7 and possibly nearby areas, but doesn't seem to work way up high (y around 10500, the sandstone dimension by default in multidimensions).

The Lua code comments seem to claim only 2D noises are used but they have y spread parameters, they just have a really high magnitude of 600. I can only hazard a guess that above that height they start to mess up. A transform from local (dimensional) space to earth-coordinate-space (i.e. by subtracting from the y value) might help?

I explored up from y=0 up to y=10500 and found that as I went up there was an expanding area that was missing nodes as each path generated on top of each other. There's got to be some issue with the mapgen code which means it doesn't work at high y-levels, despite theoretically being height-agnostic. The chunks also took longer the generate. Also, it's kind of boring that it's the same set of paths for the same x & z coordinates in each dimension. pathv7 definitely needs some big changes to support that though.

Good test seed: 4627737571162856324 (bonus points to anyone who can tell me what that seed is from), has a path right near the 0,0 point.

Video demo: https://youtu.be/1tB45H4wxa8
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

0siribix
Member
Posts: 123
Joined: Tue Nov 17, 2020 20:54
GitHub: 0siribix
In-game: 0siribix

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pathv7]

by 0siribix » Post

Well you got further than I did. I have a world where I moved ground level up to 30500. I tried the following changes but nothing generates that high

Code: Select all

+local y_offset = 30500
 
 -- Mapgen v7 noises
 
 -- 2D noise for base terrain
 
 local np_base = {
-       offset = 4,
+       offset = y_offset + 4,
        scale = 70,
        spread = {x = 600, y = 600, z = 600},
        seed = 82341,

----------------------------------------------

 -- On generated function
 
 minetest.register_on_generated(function(minp, maxp, seed)
-       if minp.y > 0 or maxp.y < 0 then
+       if minp.y > y_offset or maxp.y < y_offset then
                return
        end

----------------------------------------------

                                local tblend = 0.5 + HSAMP * (select - 0.5)
                                tblend = math.min(math.max(tblend, 0), 1)
                                local tlevel = math.floor(base * tblend + alt * (1 - tblend))
-                               local pathy = math.min(math.max(tlevel, 7), 42)
+                               local pathy = math.min(math.max(tlevel, y_offset + 7), y_offset + 42)
 

----------------------------------------------

Maybe there's an issue with the offset since it isn't a chunk border?

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests