LUA port of mg v7?

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

LUA port of mg v7?

by burli » Fri Dec 30, 2016 15:31

Hi,
has anyone ported mg v7 to lua yet?
 

red-001
Member
 
Posts: 126
Joined: Tue Jan 26, 2016 20:15
GitHub: red-001
IRC: red-001

Re: LUA port of mg v7?

by red-001 » Fri Dec 30, 2016 15:33

Why would you want that? Mapgens written in c++ are a lot faster then ones written in lua.
 

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

Re: LUA port of mg v7?

by burli » Fri Dec 30, 2016 15:54

Because it's difficult or impossible to add new features or modify specific parts of a c++ mg in lua. I want to modify the mg and maybe port it back to c++ later
 

red-001
Member
 
Posts: 126
Joined: Tue Jan 26, 2016 20:15
GitHub: red-001
IRC: red-001

Re: LUA port of mg v7?

by red-001 » Fri Dec 30, 2016 16:36

Well I'm pretty sure that no-one ported it. You will have to do it yourself or make your modifications in C++.
 

User avatar
fishyWET
Member
 
Posts: 145
Joined: Tue Jan 01, 2013 07:43
GitHub: fishyWET

Re: LUA port of mg v7?

by fishyWET » Sat Dec 31, 2016 15:43

There is a simple api for making biomes in v7/v5/valleys mapgen
https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L3947-L4077
Of which is used by mods such as ethereal.
LOTR Subgame
Some days you flip the table, (ノಥ益ಥ)ノ ︵┻━┻,
Other days, the table flip you, ┳━┳︵(ₒ⁻ₒ).
 

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

Re: LUA port of mg v7?

by burli » Sat Dec 31, 2016 17:46

I know, but I think it is pretty useless to write a c++ mapgen and than dump most of it and replace it with lua. And still there are things I can't add without lots of issues, for example I can't add caves without flying plants

The current mapgen system is damage by design and it's easier to write the mapgen completely in lua, which is a problem because of the memory limit of luajit
 

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

Re: LUA port of mg v7?

by paramat » Mon Jan 02, 2017 16:31

> I know, but I think it is pretty useless to write a c++ mapgen and than dump most of it and replace it with lua

? The biome API is accessed from Lua but is engine C++ code so is very fast.

Flying plants? What is the specific problem?

> The current mapgen system is damage by design

In what way?

You can use normal Lua instead of LuaJIT if you want to write complex Lua mapgens, i use normal Lua (i have to).
See my mods for good examples of Lua mapgen.
I could write a Lua mgv7 but am not interested.
 

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

Re: LUA port of mg v7?

by burli » Mon Jan 02, 2017 18:30

paramat wrote:> I know, but I think it is pretty useless to write a c++ mapgen and than dump most of it and replace it with lua

? The biome API is accessed from Lua but is engine C++ code so is very fast.

Flying plants? What is the specific problem?


Any mod I tried or I have written by myself that adds some kind of caves has the same problem. Any time, the caves hit the surface I have flying plants over that hole, even if I removed all the decoration and placed it again

paramat wrote:> The current mapgen system is damage by design

In what way?

You can use it "as is", maybe add/modify some decoration. But larger modifications are slow, have ugly glitches or are just impossible.

paramat wrote:You can use normal Lua instead of LuaJIT if you want to write complex Lua mapgens, i use normal Lua (i have to).
See my mods for good examples of Lua mapgen.

I know that I can use Lua instead of LuaJIT, but do I want that? I know that I can write the whole mapgen in Lua like the valleys mg. But more than a proof of concept is pointless.
 


Return to Minetest General

Who is online

Users browsing this forum: No registered users and 76 guests

cron