Page 1 of 1
[Mod] Generative road, path network [0.3.2] [path]

Posted:
Sun May 18, 2014 22:19
by paramat

Download, rename to 'path'
https://github.com/paramat/path/archive/master.zipCode
https://github.com/paramat/pathpath 0.3.2 by paramat
For latest stable Minetest back to 0.4.8
Depends default
Licenses: code WTFPL
The intersecting road systems and paths climb hills and use halfslabs to create a walkable (no jumping) and drivable slope.
Away from the roads are lakes with beaches, and high hills. This is a single biome mapgen with grassland and variable density forests.
Chunk generation time roughly 1s.
Start a new world with this mod enabled, the mod will automatically set singlenode mapgen.
You will probably spawn underground so disable damage before starting a new world, enable freemove and fly up to find the surface.
After spawning in a new world you may need to travel up to 1kn to find a road.
Re: [Mod] Generative road/path experiment [0.1.2] [path]

Posted:
Mon May 19, 2014 02:02
by paramat
0.1.2
Now using x overgeneration to fix most chunk border bugs.
Desert sand is easier on the eye, added stereotype cacti.
Lane width parameter.
Tuned diagonal road width for a better match.
Re: [Mod] Generative road/path experiment [0.1.2] [path]

Posted:
Mon May 19, 2014 02:36
by philipbenr
Cool... It would be amazing to have--
Great idea:

If you've ever played the game, it is fun, is it not? Anyhow, I was wondering if this could be possible? I know that there are multiple cars mods... Webdesigner97's would be nice because it doesn't run up slopes. Anyhow, you would just have a looping race track with the track in a depression. Then you would have a couple cacti and some other decorative items (cliffs, train tracks, old broken locomotive... maybe more). You would have Mario Kart 64 Kalimari Desert. Just a cool thought... I dunno if you want to though (I think it would be amazing... :)
Edit: Another nice lookin' mod Paramat
Re: [Mod] Generative road/path experiment [0.1.2] [path]

Posted:
Mon May 19, 2014 22:53
by paramat
The road is 'drawn' by a 3D node brush that is a 7x7 node disc with a white centre. White has priority over black which has priority over sand. The brush is triggered by the curves where 2D noise is zero.
Re: [Mod] Generative road/path experiment [0.1.2] [path]

Posted:
Tue May 20, 2014 05:12
by 4aiman
Wow!
Is there any way I can be sure that there will be only ONE road on a map?
Why? Because of Roger Zelazny's legacy:
http://wiki.roadtoamber.com/black-road
Re: [Mod] Generative road/path experiment [0.1.2] [path]

Posted:
Tue May 20, 2014 16:37
by Hybrid Dog
You could use pelin3d for the height.
Re: [Mod] Generative road/path experiment [0.1.3] [path]

Posted:
Wed May 21, 2014 11:25
by 4aiman
Thanks!
PS: WHY CAN'T I "LIKE" SOMEONE'S POST USING NEW FORUM SOFTWARE AS WELL AS THE OLD ONE???
Re: [Mod] Generative road/path experiment [0.1.3] [path]

Posted:
Wed May 21, 2014 15:06
by paramat
One road is impossible, but you can move towards vast isolated roads by increasing the 'spread' of the 'np_base' noise, double it perhaps 2-3 times, adding an 'octave' each time you do, until the spread is larger than the area you expect to explore. Then also reduce 'persistence' to 0.4 or 0.33. When you spawn yo umay need to travel the spread distance to find the first road.
Re: [Mod] Generative road/path experiment [0.1.3] [path]

Posted:
Wed May 21, 2014 16:51
by Hybrid Dog
paramat wrote:One road is impossible, [...]
with the code you use
It's possible if the position of the street would be found out with using the map's seed and pseudorandom.
Re: [Mod] Generative road/path experiment [0.1.3] [path]

Posted:
Wed May 21, 2014 20:56
by paramat
^ Yep.
Re: [Mod] Generative road/path experiment [0.1.3] [path]

Posted:
Wed May 21, 2014 22:04
by philipbenr
Amazing...
Edit: @paramat: Could you make a version with a finish line? I would like to generate a racetrack off the bat... If not, then I'll make a map of Kalimari Desert and post it later...
Re: [Mod] Generative road/path experiment [0.1.3] [path]

Posted:
Thu May 22, 2014 09:40
by 4aiman
paramat wrote:One road is impossible, but you can move towards vast isolated roads
Well, that's enough for me, 'cause the black road is not continuous.
Maybe It'll be good to create some "power fields" that'll slow players who are to cross the road instead of moving along it :)
Great work, paramat!
Re: [Mod] Generative road/path experiment [0.1.4] [path]

Posted:
Sat May 24, 2014 05:28
by paramat
0.1.4
Two intersecting road systems, one passes under hills in tunnels, the white line is luminous.
Re: [Mod] Generative road/path experiment [0.1.5] [path]

Posted:
Mon May 26, 2014 05:24
by paramat
0.1.5
Added yellow tunnel ceiling lights, finally found a good way to spread the light in tunnels by ABM.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_abm({
nodenames = {"path:lightoff"},
interval = 7,
chance = 8,
action = function(pos, node)
minetest.add_node(pos, {name="path:lighton"})
pos.y = pos.y - 1
minetest.add_node(pos, {name="path:roadblack"})
minetest.dig_node(pos)
end,
})
Re: [Mod] Generative road/path experiment [0.1.5] [path]

Posted:
Mon May 26, 2014 17:42
by Hybrid Dog
paramat wrote:.1.5
Added yellow tunnel ceiling lights, finally found a good way to spread the light in tunnels by ABM.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_abm({
nodenames = {"path:lightoff"},
interval = 7,
chance = 8,
action = function(pos, node)
minetest.add_node(pos, {name="path:lighton"})
pos.y = pos.y - 1
minetest.add_node(pos, {name="path:roadblack"})
minetest.dig_node(pos)
end,
})
1. you could use update_map() to light a lot of lights at once
2. there's a function called "nodeupdate(pos)"
3. you could also use on_punch and enable/disable the connecting lights at once
Re: [Mod] Generative road/path experiment [0.1.5] [path]

Posted:
Mon May 26, 2014 21:43
by paramat
Thanks, however it seems 'update_map()' is not for the on-generated version of voxelmanip.
I seemed to remember there was a 'nodeupdate' function but could not find it when searching through the lua-api.txt, i was wondering if i has imagined it. How is it used? 'minetest.node_update(pos)'?
Re: [Mod] Generative road/path experiment [0.1.5] [path]

Posted:
Tue May 27, 2014 15:17
by Krock
paramat wrote:Thanks, however it seems 'update_map()' is not for the on-generated version of voxelmanip.
I seemed to remember there was a 'nodeupdate' function but could not find it when searching through the lua-api.txt, i was wondering if i has imagined it. How is it used? 'minetest.node_update(pos)'?
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
https://github.com/VanessaE/moretrees/b ... ay.lua#L31
Re: [Mod] Generative road/path experiment [0.1.5] [path]

Posted:
Tue May 27, 2014 19:00
by paramat
Thanks i will try it.
EDIT
It works :}
Re: [Mod] Generative road/path experiment [0.2.0] [path]

Posted:
Sat Jun 21, 2014 06:00
by paramat
Version 0.2.0
Now tunnels have been moved to noisegrid, this mod is currently an experiment (also an example and a mapgen framework) in roads that climb hills and place halfslabs to create walkable and drivable slopes (gradient is limited though). Map in first post.
Re: [Mod] Generative road/path experiment [0.2.0] [path]

Posted:
Sat Jun 21, 2014 07:24
by Krock
Error at startup:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
09:21:21: ERROR[main]: ServerError: E:\Programme\minetest\bin\..\mods\path\init.
lua:168: bad argument #1 to 'abs' (number expected, got nil)
09:21:21: ERROR[main]: stack traceback:
09:21:21: ERROR[main]: [C]: in function 'abs'
09:21:21: ERROR[main]: E:\Programme\minetest\bin\..\mods\path\init.lua:168: in
function <E:\Programme\minetest\bin\..\mods\path\init.lua:121>
The indexes seem to be correct in the codes
EDIT: Found the bug... the hardcoded sidelen of "81" was the problem.
Re: [Mod] Generative road/path experiment [0.2.0] [path]

Posted:
Sat Jun 21, 2014 21:28
by paramat
Interesting, you use a chunk size other than 5? I usually assume no-one does but i might use sidelen in future now. It's 81 instead of 80 because of overgeneration, so use sidelen + 1.
Re: [Mod] Generative path experiments [0.3.0] [path]

Posted:
Sun Jun 22, 2014 08:01
by paramat
Version 0.3.0
Grass, dirt, trees, lakes, mountains, beaches. 2 road systems along ridges and valleys.
Re: [Mod] Generative path experiments [0.3.1] [path]

Posted:
Mon Jun 23, 2014 08:12
by paramat
Version 0.3.2
Dirt paths with walkable (no jumping) halfslab slopes.