code vs lua and custom worldgen

alien58
New member
 
Posts: 7
Joined: Tue May 29, 2012 14:08

code vs lua and custom worldgen

by alien58 » Tue Jul 03, 2012 10:23

on this fourm there have been a few and i'm 1 that have been trouble with block gen in lua mainly the speed of script. I think there should be few different forms of block gen that are implement in the minetest code that lua can acess.

The lua api that should be added to minetest
1. chunk gen ( a function that has basic position limits, block limits , replaces , etc )
2. remove nodes from block
3. place nodes in block
4. replace nodes in block

2-4 are allready in the lua script but i only work for one node at a time. There should be a way of doing it in a space so that we could remove the for next loops in lua that are very slow.

my idear for a way of customizable worldgen that is flexible design is to break up the worldgen / chunk code in to a work order list that can be edit. The items in the list range from gen perln noise to placing trees. there are 3 main types of items in the list that are gen 2d 3d perlin noise , gen nodes that do not need to know the nodes next to it and nodes that do ( torches / tree are a good examples ). with a bit of management you can stop problems of tree leaves missing by only gen them when all block around have been gen/loaded.

if the custom worldgen list is used with a bit of work you could have a normal map with floating islands at the same height or even a dozen of different styles of map gen.
 

lkjoel
Member
 
Posts: 778
Joined: Wed Feb 29, 2012 19:27

by lkjoel » Tue Jul 03, 2012 17:05

That'd be awesome! And if all of the functions on mapgen could be hooked up to the LUA API (I made a custom tree generator that might help).
My mods: The Nether | Doctor Who (WIP)

I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
 


Return to Minetest Engine

Who is online

Users browsing this forum: No registered users and 4 guests

cron