Biome support in the API

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

Biome support in the API

by PilzAdam » Wed Oct 24, 2012 10:11

Hello everyone!
I think it would be great if there where some functions in the API that mods can define biomes.
Here are some ideas how these functions could look like:
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_biome("desert", {
    rarity = 0.1,
    stone_like_node = "default:desert_stone",
    dirt_like_node = "default:default:desert_sand",
    dirt_with_grass_like_node = "default:desert_sand",
    generate_trees = true,
    tree_rarity = 0.01,
    leaves_like_node = "air",
    tree_like_node = "default:cactus",
}

This is an example for the desert biome.
There should be also a global table that cotains all definitions ordered by name:
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.registered_biomes

If this would be implemented into upstream, the API would be much more powerful and mod creators could create variet maps.
Please post what you think about it and what you would add/remove to the functions.
 

jin_xi
Member
 
Posts: 165
Joined: Mon Jul 02, 2012 18:19

by jin_xi » Wed Oct 24, 2012 10:19

i agree, this would be great. but i think some more degrees of control would be good, esp for placement of biomes.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Wed Oct 24, 2012 10:35

Another idea: In minetest.register_on_generated() there should be the biome as one param:
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_on_generated(minp, maxp, seed, biome)

"biome" should contain the name of the biome or a table with all biomes in that block.
So the mod developers can check if they are in a desert and create some oasis there.
 

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

by Topywo » Wed Oct 24, 2012 10:43

Good idea.

Would it also be possible to let the mod makers use more 'like' nodes and use other than the minetest_game mods?

For example:
stone_like_node = "default:desert_stone",
stone_like_node_a = "modmakersmod:granite"
 

User avatar
BrandonReese
Member
 
Posts: 836
Joined: Wed Sep 12, 2012 00:44
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

by BrandonReese » Wed Oct 24, 2012 14:17

Topywo wrote:Good idea.

Would it also be possible to let the mod makers use more 'like' nodes and use other than the minetest_game mods?

For example:
stone_like_node = "default:desert_stone",
stone_like_node_a = "modmakersmod:granite"


for something like that it would be better to make stone_like_node an array

stone_like_node = { 'default:desert_stone','modmakersmod:granite' }

In the biome definition should it include a size range. So you could make the desert biome rare, but you could make it very large. If it's just rare it could end up being small too.
Last edited by BrandonReese on Wed Oct 24, 2012 14:18, edited 1 time in total.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Fri Oct 26, 2012 13:31

Another idea: Different types of trees.
New fields in the definition table:
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
tree_small = true,
tree_medium = true,
tree_big = false,
 

User avatar
kotolegokot
Member
 
Posts: 131
Joined: Mon Jul 02, 2012 17:03

by kotolegokot » Sat Oct 27, 2012 05:43

This is very great idea! I have some amendments. I think trees must be generated separately. I mean it must be generated by minetest.register_on_generated function. Also, we need function, that get biome name from position. Example: minetest.env:get_biome_name(pos).
Last edited by kotolegokot on Sat Oct 27, 2012 05:52, edited 1 time in total.
I'm creator of these mods: Locked sign, Locked furnace, Money. And I'm a developer of The RealTest Game.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sat Oct 27, 2012 11:03

kotolegokot wrote:Also, we need function, that get biome name from position. Example: minetest.env:get_biome_name(pos).

I already had the idea to pass the biome to minetest.register_on_generated(). But this would be cool too, to use it in abms.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sat Oct 27, 2012 16:40

2 new ideas:
1) A new layer above_dirt (for snow biomes)
2) Some params to control the mapgen (e.g. high mountains or flat).
 

OdnetninI
Member
 
Posts: 38
Joined: Sun Oct 21, 2012 08:20

by OdnetninI » Sun Oct 28, 2012 16:09

I think the same that you, we need more control of mapgen (like mines). +3
 

sky
Member
 
Posts: 152
Joined: Tue Oct 16, 2012 11:59

by sky » Sun Oct 28, 2012 16:36

I like this biome idea i can make a jungle biome a snow biome and plains biome if it will work
Last edited by sky on Sun Oct 28, 2012 16:36, edited 1 time in total.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Oct 28, 2012 16:37

Maybe textures that depend on the biome would be nice. When you place a grass block in a swamp biome it looks different than in a grass biome.
 

User avatar
jmf
Member
 
Posts: 164
Joined: Mon Nov 05, 2012 18:13

by jmf » Sun Dec 09, 2012 12:44

A height parameter would be nice, so for example snow biomes are only generated at great heights.
My ingame name is "john", my IRC name is "john_minetest".
I am chef mod on this server: minetest.org : 30015(see here)
"I am immune to signature virus." <-- Add this to your signature to gain immunity!!!
 

User avatar
0gb.us
Member
 
Posts: 841
Joined: Sun Sep 16, 2012 01:55

by 0gb.us » Tue Dec 11, 2012 16:31

PilzAdam wrote:Maybe textures that depend on the biome would be nice. When you place a grass block in a swamp biome it looks different than in a grass biome.


That sounds like it would requite work on the client side.

Or on the server side, it could be implemented as a separate node that gets switched in.
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 1 guest