[Mod] Forest

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

by paramat » Thu Mar 13, 2014 20:13

Gael de Sailly, my 'noise23' example mapgen mod shows how to use the fast 2D perlin noise maps, i have managed to get my head around perlin maps now so if you get stuck i can help out.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

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

by paramat » Sat Mar 15, 2014 02:13

... but then, seeing as your computer time is limited i might convert this to perlin maps myself.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Sat Mar 15, 2014 03:58

paramat wrote:... but then, seeing as your computer time is limited i might convert this to perlin maps myself.

I think he would very much appreciate that, paramat.
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

by Gael de Sailly » Mon Mar 17, 2014 13:56

I've tried to convert the ores and trees from set_node() to voxelmanip, but it was not faster. I use the function find_nodes_in_area() to find the places in which ores can be placed, and also for the third step of the mapgen (trees) to find the grass blocks on which trees can grow. And for the grass blocks which are selected to support a tree, it chooses the tree which grows on it according to numerous criteria, including water proximity, for which I use minetest.find_node_near().
So I have to write voxelmanip to the map 3 times :
  • After the base map generation, because ores uses find_nodes_in_area()
  • After the ore generation, because for the water proximity trees uses find_node_near() to detect the sea, and also the mud or water holes, which are generated as ores.
  • And finally after the trees.
I have not thought about perlin maps yet. I use 17 noises in my mapgen. 8 in the function get_elevation() and 9 in the register_on_generated(). I think the slowers are N1 to N4 of the register_on_generated(). They are calculated for each node in 3D to define caves contrary to the others which are calculated for each node in 2D. I will think about minimizing the number of noises and rework the mapgen and especially the function get_elevation().
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Mon Mar 17, 2014 15:51

You could present this mod to Freeminer too, a fork of Minetest:
http://freeminer.org/
 

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

by paramat » Mon Mar 17, 2014 23:15

Okay so i converted the main mapgen loop to use perlin maps, much faster now, but still slow, i'll see what i can do about the get elevation function, im going to try a few other improvements.
Last edited by paramat on Tue Mar 18, 2014 20:59, edited 1 time in total.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

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

by paramat » Tue Mar 18, 2014 00:15

Image
Last edited by paramat on Tue Mar 18, 2014 03:09, edited 1 time in total.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

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

by paramat » Tue Mar 18, 2014 04:14

http://www.mediafire.com/download/lyyiw47ou3219w7/forestpm2.zip
Converted everything i could to use perlin maps, so the initial mapgen loop only takes 2-3 seconds per chunk, but the oregen and treegen is still slow, perhaps due to number of trees and complexity of the code, so in total 10 seconds to a minute per chunk.
Last edited by paramat on Tue Mar 18, 2014 21:00, edited 1 time in total.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

by Krock » Tue Mar 18, 2014 16:42

paramat wrote:Converted everything i could to use perlin maps, so the initial mapgen loop only takes 2-3 seconds per chunk, but the oregen and treegen is still slow, perhaps due to number of trees and complexity of the code, so in total 10 seconds to a minute per chunk.

Yes, your generation made it faster, but the speed is still at 30s per chunk.
I hope this can get even faster because I like this mod :)
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

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

by paramat » Tue Mar 18, 2014 22:14

Okay so ive looked through the rest of the code, i found an abm on water source with chance 3, i changed that to 64. Other than that there's nothing else i can do to speed it up. As far as i can see it is slow due to the complexity of the code, and the use of 'find nodes in area' and 'find node near', these get very slow with even a medium radius, having each tree check for water proximity is awesome but slow :)
Also, i found an abm on group:tree with interval 10 chance 1, not sure what this did, possibly removing floating trees? That might cause a lot of processing i'm going to try disabling that.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

by Gael de Sailly » Wed Mar 19, 2014 16:14

Thank you for your contribution, paramat.

paramat wrote:I found an abm on water source

I had forgotten this one ! My code is very untidy. There are remnents of my old codes, and experimental programs like it I have forgotten to delete. You can remove it. I've deleted most of these stuffs when I published my mod, but I retains the original, with all of these codes, disabled or not. I'm going to clean it.
paramat wrote:I found an abm on group:tree with interval 10 chance 1, not sure what this did, possibly removing floating trees?

Yes, it removes floating trees. But it is not very important.

In the near future, I will publish a new version, in which vegetals change their appearance according to the season.
Last edited by Gael de Sailly on Wed Mar 19, 2014 16:15, edited 1 time in total.
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

celeron55
Member
 
Posts: 430
Joined: Tue Apr 19, 2011 10:10

by celeron55 » Thu Mar 20, 2014 19:24

Gael de Sailly wrote:So I have to write voxelmanip to the map 3 times :
  • After the base map generation, because ores uses find_nodes_in_area()
  • After the ore generation, because for the water proximity trees uses find_node_near() to detect the sea, and also the mud or water holes, which are generated as ores.
  • And finally after the trees.


Hmm... it should be very well possible to implement a fast find_nodes_in_area and find_node_near to VoxelManipulator. If someone can do a prototype and test its performance for eg. this mod, that would be useful.
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

by Gael de Sailly » Fri Mar 21, 2014 12:02

Yes, it's a good idea. It will make my mod very faster.
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Fri Mar 21, 2014 15:21

celeron55 wrote:
Gael de Sailly wrote:So I have to write voxelmanip to the map 3 times :
  • After the base map generation, because ores uses find_nodes_in_area()
  • After the ore generation, because for the water proximity trees uses find_node_near() to detect the sea, and also the mud or water holes, which are generated as ores.
  • And finally after the trees.


Hmm... it should be very well possible to implement a fast find_nodes_in_area and find_node_near to VoxelManipulator. If someone can do a prototype and test its performance for eg. this mod, that would be useful.

Celeron55, it is so wonderful to see you giving helpful advice for this mod.
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

by Gael de Sailly » Thu Apr 03, 2014 19:21

FOREST 1.2 NOW !
The changes are the flowers apportionment and their seasonnal disappearance and appearance.
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Thu Apr 03, 2014 21:12

I sincerely hope that there is a server out there that will kindly host this mapgen, because it really does deserve it.
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Sat Apr 05, 2014 17:08

I think it might be a good idea to change the name of this mod. People are pretty much ignoring it, considering how much attention the bacon mod is getting.
Last edited by Inocudom on Sat Apr 05, 2014 17:09, edited 1 time in total.
 

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

by paramat » Sun Apr 06, 2014 01:03

Don't worry Inocudom, i don't think it is being ignored, it is an impressive mapgen.

Gael de Sailly, i am impressed with your spawn player function that calculates elevation and searches for a good spawn point, this inspired me to do a similar thing in my singlenode version of watershed mapgen, i ended up using the voxelmanip and perlinmaps to generate elevation maps of multiple chunks looking for a good spawnpoint on low land.
Last edited by paramat on Sun Apr 06, 2014 01:05, edited 1 time in total.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

by philipbenr » Mon Apr 07, 2014 14:36

Inocudom wrote:I think it might be a good idea to change the name of this mod. People are pretty much ignoring it, considering how much attention the bacon mod is getting.


I think that a lot of mods get attention, but the kinda shall I say stupid (not to be offensive, but really) mods get more attention and posts because it is bizarre. These still get attention. Whenever I see a new post, I almost always click on it :P
"The Foot is down!"
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Mon Apr 07, 2014 15:07

I actually glanced over this mod's title a few times, skipping it. I wish I hadn't, it looks amazing!
 

User avatar
Linxx
Member
 
Posts: 401
Joined: Wed May 16, 2012 00:37

by Linxx » Mon Apr 07, 2014 15:27

with this mod the map looks more alive and natural really good :)
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Mon Apr 07, 2014 15:31

How about

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
[Mod] Forest and related mapgen [forest]


or something like that.
 

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

by paramat » Mon Apr 07, 2014 19:20

Tried out the latest version last night, this mapgen has seasons that run in real time, the flowers, snow and ice change through the year. There is a 'clock block' that when placed and pointed at displays time and date on the screen.
Gael de Sailly, what are the 'sand way' 'gravel way' etc. nodes? Mysterious ...
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
hoodedice
Member
 
Posts: 1372
Joined: Sat Jul 06, 2013 06:33

by hoodedice » Mon Apr 07, 2014 19:22

paramat wrote:-snip-


Does it?!

Mod testing scheduled tonight!
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Mon Apr 07, 2014 21:34

rubenwardy wrote:I actually glanced over this mod's title a few times, skipping it. I wish I hadn't, it looks amazing!


I tried it out after reading this. It's indeed a beautiful mod.
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

by Gael de Sailly » Tue Apr 08, 2014 14:02

paramat wrote:Gael de Sailly, what are the 'sand way' 'gravel way' etc. nodes? Mysterious ...

These nodes have raillike drawtype. When you put them on the ground, they connect automatically, like rails. They are decorative and can also help the player to find his way. Try to make a path with sand or gravel ways (the small heaps, in inventory), I think it's very beautiful in forests and... give a pastoral look that I like.
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [Mod] Forest

by Inocudom » Wed May 21, 2014 05:03

This fatal error appeared:
01:01:16: ERROR[ConnectionSend]: con(1524/2)RunTimeouts(): Peer 1 has timed out. (source=peer->timeout_counter)
01:01:16: ERROR[main]: ServerError: attempt to index a nil value
01:01:16: ERROR[main]: stack traceback:
01:01:16: ERROR[main]: [C]: in function 'set_node'
01:01:16: ERROR[main]: ...netest-0.4.9-x64-dev20140517\bin\..\mods\forest\init.lua:124: in function <...netest-0.4.9-x64-dev20140517\bin\..\mods\forest\init.lua:107>
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [Mod] Forest

by Inocudom » Sun May 25, 2014 04:21

Please consider having this mod support mods that add additional plants and ores to worlds. Below are four great mods that add plants:
https://forum.minetest.net/viewtopic.php?f=9&t=7207-undergrowth modpack
https://forum.minetest.net/viewtopic.php?f=9&t=7143-dryplants modpack
https://forum.minetest.net/viewtopic.php?f=11&t=6921-ferns mod
https://forum.minetest.net/viewtopic.php?f=11&t=3898-plantlife modpack
Doing this task could make your forest mod more customizable and more popular in the end.

To anyone that reads this, how could custom mapgens be capable of such a thing? What would have to be done?
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [Mod] Forest

by Inocudom » Sun Jun 08, 2014 20:44

Well, it looks like Gael de Sailly might not be coming back for... Quite some time.

Bas080, Sokomine, and MirceaKitsune, what do you think of this mod? I recommend giving paramat's version of it a try:
http://www.mediafire.com/download/lyyiw47ou3219w7/forestpm2.zip
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: [Mod] Forest

by Sokomine » Mon Jun 09, 2014 00:19

Inocudom wrote:Bas080, Sokomine, and MirceaKitsune, what do you think of this mod? I recommend giving paramat's version of it a try:
http://www.mediafire.com/download/lyyiw ... estpm2.zip

I can't download from Mediafire as that site is broken. It does require Javascript for something that does not need Javascript.

It would be really nice to have the trees and forrests from this mod/mapgen together with mods like undergrowth etc. - they'd fit together very well. As for the spawning of the trees, perhaps less complex code might also do. Plantslib comes with some code that also spawns saplings for moretree trees (which then grow into those giants).
 

PreviousNext

Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 17 guests

cron