Post your mapgen questions here (modding or engine)

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Post your mapgen questions here (modding or engine)

by Sergey » Wed Jan 25, 2017 09:43

duane wrote:
Sergey wrote:I have obvious question about mapgen and engine itself.

Why are there objects hanging in the air? Sand or gravel falls down if there is nothing (air) under it. But block of dirt or stone can hang in the air without being connected to something on the ground. Even tree can "stand" in the air. You have to fly to fell it. Why is that? This is against basic physical laws!


It takes a lot more computation to make things fall than to just leave them in place. When I made the mistake of producing unstable sand structures underground, the resulting sandslides crashed servers. Plus, some people like making floating islands.

Underground not sand but gravel falls down.
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: Post your mapgen questions here (modding or engine)

by taikedz » Wed Jan 25, 2017 10:10

duane wrote:It takes a lot more computation to make things fall than to just leave them in place. When I made the mistake of producing unstable sand structures underground, the resulting sandslides crashed servers. Plus, some people like making floating islands.


I remember those. Trying to dig sandy floors and suddenly finding yourself hurtling into the deeps was a fun little surprise *cackle*
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Post your mapgen questions here (modding or engine)

by paramat » Wed Jan 25, 2017 17:49

Falling nodes only fall if disturbed, until then they float.
It's too intensive to check for floating nodes and make them fall, imagine if a huge floating island in mgv7 was made to fall.
It's complex and intensive to trace a path through nodes to see if a node is connected to the ground.
Making more nodes falling nodes would cause huge chain reactions of falling-node updates, this is probably why dirt nodes are not falling nodes.

The floating rocks in mgv7 and mgv5 are an unavoidable result of using 3D noise, they can be made more rare by reducing 'persistence' but then the other 3D noise structures become less interesting.
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Post your mapgen questions here (modding or engine)

by Sergey » Thu Jan 26, 2017 16:26

Another question about leaves.

For example, pine has crown of 5x5 blocks with trunk inside.

Like this
□ □ □ □ □
□ □ □ □ □
□ □ ■ □ □
□ □ □ □ □
□ □ □ □ □

But if I fell that tree, not all its leaves will decay! Some of them will stay hanging in the air being connected to another pine! Amazing! There is no tree anymore, but "its" leaves changed their mind and deserted to another pine! That's all because leaves will not decay if there is pine tree no further than 4 block!

There is so much nonsense in this game!
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: Post your mapgen questions here (modding or engine)

by taikedz » Thu Jan 26, 2017 16:32

Sergey - in the game trees are also made of individual cubic blocks, that's really silly! Trees aren't normally uniformally cubic -- real trunks are all kinds of slants and girths, and I can pick individual leaves!

This game is totally ridiculous right?

;-)
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Post your mapgen questions here (modding or engine)

by Sergey » Thu Jan 26, 2017 16:40

taikedz wrote:Sergey - in the game trees are also made of individual cubic blocks, that's really silly! Trees aren't normally uniformally cubic -- real trunks are all kinds of slants and girths, and I can pick individual leaves!

This game is totally ridiculous right?

;-)


Yeah, head of my hero is also cubic! :-)

But game must be closer to reality. At least, in regard to leaves! Tree's leaves are tree's leaves. Simple array (in programming language). No tree — no leaves. Delete this array.
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: Post your mapgen questions here (modding or engine)

by taikedz » Thu Jan 26, 2017 17:08

Sergey wrote:Tree's leaves are tree's leaves.


That's not how this world works... there is no such thing as "a tree" that ties together multiple nodes into a single conceptual item. This is a voxel game. Each voxel node exists as an individual thing, this is the core nature of the game.

There are tree trunk nodes and tree leaf nodes arranged to look like a tree, that is all. There is no "tree" just "some nodes in a 3d space." When you remove a trunk node, you are just removing an individual node. No such thing as a tree to remove it from. Just a an independent node.

Sergey wrote:Simple array (in programming language). No tree — no leaves. Delete this array.


There was never an array in the first place, and I doubt there ever will be (an actual engine dev would have to assert that one themselves). Imagine an array for every. single. tree ever produced by the mapgen. Not efficient. But if you want to make that kind of mod yourself, you're welcome to do so. As you say - it's a Simple array.
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Post your mapgen questions here (modding or engine)

by Sergey » Thu Jan 26, 2017 17:57

You said that all blocks in game are individuals with independent behavior. But it is not true.

Why do leaves decay if there is no tree trunk nearby? It means that leaves depends on tree.

Why when you cut one block of papyrus, you cut them all? It means they are dependent.

Why do torch fall down if there no supporting block anymore? Again, dependence. Why does not it hang in the air like other blocks? (I have complained about it before)
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: Post your mapgen questions here (modding or engine)

by taikedz » Thu Jan 26, 2017 18:06

This conversation has nothing to do with mapgen. Moving the conversation out:

viewtopic.php?f=47&t=16509

Please reply over there.
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Post your mapgen questions here (modding or engine)

by paramat » Fri Jan 27, 2017 13:14

Thanks taikedz, and i agree with your replies to this offtopic stuff.
 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Re: Post your mapgen questions here (modding or engine)

by burli » Sat Jan 28, 2017 13:28

Do flowers and bushes use the same noise/seed? I noticed that bushes and flowers appear in the same area and in other areas are no flowers and no bushes.


As you can see on the screenshot on the left and right side there are both plants, in the center is only grass (except below me, there are also bushes).

Edit: Hmm, it might be a coincidence. Found another grassland

Image
Attachments
screenshot_20170128_142145.jpg
screenshot_20170128_142145.jpg (893.87 KiB) Viewed 4684 times
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Post your mapgen questions here (modding or engine)

by paramat » Sat Jan 28, 2017 23:57

Probably coincidence but i may have accidently used the same seed number for bushes as for one of the flowers (each flower uses a different seed).
 

crazy_baboon
Member
 
Posts: 40
Joined: Sat Oct 17, 2015 10:47

Re: Post your mapgen questions here (modding or engine)

by crazy_baboon » Tue Jan 31, 2017 20:24

This thread seems to be a little bit messy! Would it not be better to create an actual index in the forum for mapgen discussions?
 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Re: Post your mapgen questions here (modding or engine)

by burli » Mon Feb 06, 2017 15:13

I added the birch tree from ethereal (Lua schematic) to my mod base to test new trees. Works fine so far except that the trunk base is often removed by other decoration

What can I do about it?

Image

Edit: A similar problem is, that trees grown from saplings don't remove the sapling
Attachments
screenshot_20170206_161002.jpg
screenshot_20170206_161002.jpg (309.69 KiB) Viewed 4684 times
Last edited by burli on Mon Feb 06, 2017 15:34, edited 1 time in total.
 

User avatar
the_raven_262
Member
 
Posts: 68
Joined: Mon Sep 22, 2014 09:30
GitHub: theraven262
IRC: the_raven_262 Raven262 Corvus262 corvus
In-game: the_raven_262 Raven262 Nevermore

Re: Post your mapgen questions here (modding or engine)

by the_raven_262 » Mon Feb 06, 2017 15:22

I really need help with this one :P
I tried registering a new biome (using the biome api), but since i'm making a game without starting from the default minetest_game, i have no biomes defined already.So, when i register this new biome (two of them, one for land and one for ocean), i get two biomes that are covered only in the "node_stone" node.There are traces of the nodes i placed as "node_top" and "node_filler", but only in cave entrances.There is no water, and i get strange void lines that cut the terrain at random heights (45 and 125 i guess). I hope there is a solution here :D
My favourite quote is NOOT NOOT! (By comrade Pingu)
Which roughly translates to "The revolution will be swift and without mercy!"
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Post your mapgen questions here (modding or engine)

by Sergey » Mon Feb 06, 2017 16:37

burli wrote:I added the birch tree from ethereal (Lua schematic) to my mod base to test new trees. Works fine so far except that the trunk base is often removed by other decoration

When I saw aspen tree first time, I thought "wow, there are birches in the game!" After that, I opened english-russian dictionary and figured out that "aspen" mean this tree. I can't still understand why in-game trees with black-white-spotted thunks are aspen (that really looks like this — solid dark green and brown bark) but not birch (that looks like this).
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: Post your mapgen questions here (modding or engine)

by taikedz » Mon Feb 06, 2017 17:15

Sergey wrote:When I saw aspen tree first time, I thought "wow, there are birches in the game!" After that, I opened english-russian dictionary and figured out that "aspen" mean this tree. I can't still understand why in-game trees with black-white-spotted thunks are aspen (that really looks like this — solid dark green and brown bark) but not birch (that looks like this).


Again this interesting observation is not mapgen-related :-)

This is about content and design choices of mods. Maybe create a new thread on this topic in the modding forum.
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: Post your mapgen questions here (modding or engine)

by taikedz » Mon Feb 06, 2017 17:18

burli wrote:I added the birch tree from ethereal (Lua schematic) to my mod base to test new trees. Works fine so far except that the trunk base is often removed by other decoration

What can I do about it?

Image

Edit: A similar problem is, that trees grown from saplings don't remove the sapling


What code are you using for both integrating the tree into the mapgen, and growing it?

Ethereal actually removes the default biomes entirely, including flower decorations, and then redefines them itself, so you might find that adding a biome on top of existing biomes, instead of clearing them and re-defining them, may be the issue?

This is just a hunch...
 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Re: Post your mapgen questions here (modding or engine)

by burli » Mon Feb 06, 2017 17:40

taikedz wrote:What code are you using for both integrating the tree into the mapgen, and growing it?

Ethereal actually removes the default biomes entirely, including flower decorations, and then redefines them itself, so you might find that adding a biome on top of existing biomes, instead of clearing them and re-defining them, may be the issue?

This is just a hunch...

I don't use any ethereal code. Just the schematic because it is a lua schematic (I renamed the nodes) and the textures. I want to spawn birch trees in the default grassland biome

Might be a problem that I don't use default?

The default trees look like this
https://github.com/MarkuBu/minetest_gam ... mods/trees

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
birch = {}

local path = minetest.get_modpath("birch") .. "/schematics/"

dofile(path .. "birch_tree.lua")


local function grow_new_birch_tree(pos)
   if not tree.can_grow(pos) then
      -- try a bit later again
      minetest.get_node_timer(pos):start(math.random(240, 600))
      return
   end

   minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2},
      birch.birchtree, "0", nil, false)
end

minetest.register_decoration({
   deco_type = "schematic",
   place_on = {"default:dirt_with_grass"},
   sidelen = 16,
   noise_params = {
      offset = 0.01,
      scale = 0.001,
      spread = {x = 250, y = 250, z = 250},
      seed = 2,
      octaves = 3,
      persist = 0.66
   },
   biomes = {"grassland"},
   y_min = 30,
   y_max = 80,
   schematic = birch.birchtree,
   flags = "place_center_x, place_center_z",
})


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
-- birch tree

local ai = {name = "air", param1 = 000}
local tr = {name = "birch:trunk", param1 = 255}
local lp = {name = "birch:leaves", param1 = 255}
local lr = {name = "birch:leaves", param1 = 150}

birch.birchtree = {

   size = {x = 5, y = 7, z = 5},

   data = {

      ai, ai, ai, ai, ai,
      ai, ai, ai, ai, ai,
      ai, ai, ai, ai, ai,
      lr, lp, lp, lp, lr,
      lr, lp, lp, lp, lr,
      ai, ai, ai, ai, ai,
      ai, ai, ai, ai, ai,

      ai, ai, ai, ai, ai,
      ai, ai, ai, ai, ai,
      ai, ai, ai, ai, ai,
      lp, lp, lp, lp, lp,
      lp, lp, lp, lp, lp,
      ai, lr, lp, lr, ai,
      ai, ai, lp, ai, ai,

      ai, ai, tr, ai, ai,
      ai, ai, tr, ai, ai,
      ai, ai, tr, ai, ai,
      lp, lp, tr, lp, lp,
      lp, lp, tr, lp, lp,
      ai, lp, tr, lp, ai,
      ai, lp, lp, lp, ai,

      ai, ai, ai, ai, ai,
      ai, ai, ai, ai, ai,
      ai, ai, ai, ai, ai,
      lp, lp, lp, lp, lp,
      lp, lp, lp, lp, lp,
      ai, lr, lp, lr, ai,
      ai, ai, lp, ai, ai,

      ai, ai, ai, ai, ai,
      ai, ai, ai, ai, ai,
      ai, ai, ai, ai, ai,
      lr, lp, lp, lp, lr,
      lr, lp, lp, lp, lr,
      ai, ai, ai, ai, ai,
      ai, ai, ai, ai, ai,

   },

   yslice_prob = {
      {ypos = 1, prob = 127}
   },
}
 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Re: Post your mapgen questions here (modding or engine)

by burli » Mon Feb 06, 2017 18:07

It seems I solved the decoration issue. I forgot to depend on default. Now (I hope) trees are generated on the ground.

Edit: No, still the same *****

But they still grow on the sapling
 

User avatar
ExeterDad
Member
 
Posts: 1121
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad

Re: Post your mapgen questions here (modding or engine)

by ExeterDad » Mon Feb 06, 2017 18:32

I was dealing with this recently. I'm betting the flowers were there first. I think you need to add "force_place" to your lua table with nodes that will be placed no matter what. Without it, if there is something in the way, the tree trunk will be skipped to prevent overwriting existing nodes.

local T = {name = "default:aspen_tree", prob = 255, force_place = true}
This is a example from a aspen tree, see https://github.com/minetest-mods/savesc ... r/init.lua for more.
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: Post your mapgen questions here (modding or engine)

by taikedz » Mon Feb 06, 2017 19:31

the_raven_262 wrote:I really need help with this one :P
I tried registering a new biome (using the biome api), but since i'm making a game without starting from the default minetest_game, i have no biomes defined already.So, when i register this new biome (two of them, one for land and one for ocean), i get two biomes that are covered only in the "node_stone" node.There are traces of the nodes i placed as "node_top" and "node_filler", but only in cave entrances.There is no water, and i get strange void lines that cut the terrain at random heights (45 and 125 i guess). I hope there is a solution here :D


You're going to have to post the code or a link to a github for us to help you here... not sure how you've defined things, so cannot help at all....
 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Re: Post your mapgen questions here (modding or engine)

by burli » Mon Feb 06, 2017 19:33

ExeterDad wrote:I was dealing with this recently. I'm betting the flowers were there first. I think you need to add "force_place" to your lua table with nodes that will be placed no matter what. Without it, if there is something in the way, the tree trunk will be skipped to prevent overwriting existing nodes.

local T = {name = "default:aspen_tree", prob = 255, force_place = true}
This is a example from a aspen tree, see https://github.com/minetest-mods/savesc ... r/init.lua for more.


Thanks, that also helps with the sapling issue. And now the trees are dug into the ground one node deep like the default trees.

But I have to find a solution to load the tree registration before the other decoration. Maybe I have an idea, but it's a lot of work
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: Post your mapgen questions here (modding or engine)

by taikedz » Mon Feb 06, 2017 19:36

taikedz wrote:
Sergey wrote:When I saw aspen tree first time, I thought "wow, there are birches in the game!"


Again this interesting observation is not mapgen-related :-)


Second thought - would it be possible/desirable to split the trees into a "trees" mod within minetest_game, such that tree generation and ABMs could be overridden specifically, without needing to make a new subgme?

This means obviosuly that a tree-placement API spec needs defining, so that any new tree mod would be able to expose a compatible API.... maybe supply a base template in the distribution?

(on that note.... one wonders if the default game's mapgen should itself be a "mapgen" mod that can be overridden simply by defining an alternative "mapgen" mod ...?)
 

User avatar
the_raven_262
Member
 
Posts: 68
Joined: Mon Sep 22, 2014 09:30
GitHub: theraven262
IRC: the_raven_262 Raven262 Corvus262 corvus
In-game: the_raven_262 Raven262 Nevermore

Re: Post your mapgen questions here (modding or engine)

by the_raven_262 » Mon Feb 06, 2017 20:17

taikedz wrote:
the_raven_262 wrote:I really need help with this one :P
I tried registering a new biome (using the biome api), but since i'm making a game without starting from the default minetest_game, i have no biomes defined already.So, when i register this new biome (two of them, one for land and one for ocean), i get two biomes that are covered only in the "node_stone" node.There are traces of the nodes i placed as "node_top" and "node_filler", but only in cave entrances.There is no water, and i get strange void lines that cut the terrain at random heights (45 and 125 i guess). I hope there is a solution here :D


You're going to have to post the code or a link to a github for us to help you here... not sure how you've defined things, so cannot help at all....


Well then, here you are :D
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.clear_registered_biomes()
minetest.clear_registered_decorations()

minetest.register_biome({
   name = "grassland",
   --node_dust = "",
   node_top = "base:dirt_with_grass",
   depth_top = 1,
   node_filler = "base:dirt",
   depth_filler = 3,
   node_stone = "base:stone",
   --node_water_top = "",
   --depth_water_top = ,
   --node_water = "",
   y_min = 5,
   y_max = 31000,
   heat_point = 50,
   humidity_point = 50,
})

minetest.register_biome({
   name = "grassland_ocean",
   --node_dust = "",
   node_top = "base:sand",
   depth_top = 2,
   node_filler = "base:sand",
   depth_filler = 2,
   node_stone = "base:stone",
   node_water_top = "base:water",
   depth_water_top = 1,
   node_water = "base:water",
   y_min = -31000,
   y_max = 4,
   heat_point = 50,
   humidity_point = 50,
})

This is everything that I have in code that is mapgen related, i don't know if I am missing something :P
My favourite quote is NOOT NOOT! (By comrade Pingu)
Which roughly translates to "The revolution will be swift and without mercy!"
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Post your mapgen questions here (modding or engine)

by Sergey » Tue Feb 07, 2017 21:41

Very strange work of mapgen.

Snowy biome wedges into another using very strange way — by square blocks with explicit borders.

Image Image Image Image
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Post your mapgen questions here (modding or engine)

by Sergey » Tue Feb 07, 2017 22:08

Is it normal to generate map with such explicit straight borders of biomes?

Image
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: Post your mapgen questions here (modding or engine)

by taikedz » Tue Feb 07, 2017 22:14

the_raven_262 wrote:
Well then, here you are :D
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.clear_registered_biomes()
minetest.clear_registered_decorations()

minetest.register_biome({
   name = "grassland",
   --node_dust = "",
   node_top = "base:dirt_with_grass",
   depth_top = 1,
   node_filler = "base:dirt",

<snip ...>


This is everything that I have in code that is mapgen related, i don't know if I am missing something :P


Replace all instances of "base:" with "default:"

;-)
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: Post your mapgen questions here (modding or engine)

by taikedz » Tue Feb 07, 2017 22:16

Sergey wrote:Is it normal to generate map with such explicit straight borders of biomes?

Image


I personally would not expect that.... what seed + mapgen are you using?

(check in the worlds folder, name of your world, the map_meta.txt file for that world
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Post your mapgen questions here (modding or engine)

by Sergey » Tue Feb 07, 2017 22:19

taikedz wrote:
Sergey wrote:Is it normal to generate map with such explicit straight borders of biomes?


I personally would not expect that.... what seed + mapgen are you using?

(check in the worlds folder, name of your world, the map_meta.txt file for that world


mapgen: valleys
seed: 3766931956736304717
 

PreviousNext

Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 12 guests

cron