[Mod] Moon realm [0.9.2] [moonrealm]

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

by Inocudom » Tue Jun 25, 2013 04:12

How do you intend to make it so that the sky always looks like the player is in space, even during the daytime?
 

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

by paramat » Tue Jun 25, 2013 04:26

Inocudom wrote:The mod below is a good basis for creating alien ruins above ground and below ground.
http://forum.minetest.net/viewtopic.php?id=5524

The new fast schematics functions will be excellent for structures, 0.4.6 totally blew my mind but 0.4.8 is another huge improvement. Those who left just don't understand what they're missing, distracted by cosmetic changes to minetest_game. This game is far beyond minecraft but also free and open source.
Last edited by paramat on Tue Jun 25, 2013 04:26, 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 Jun 25, 2013 04:35

Inocudom wrote:How do you intend to make it so that the sky always looks like the player is in space, even during the daytime?

Oh haha i don't intend, that's why this is a large moon / small planet with a thin atmosphere (which just happens to be blue).

But then, you could make it always night and make the surface nodes glow ... ? might slow generation but sounds fun to try once. You only get night sky during day when there is no atmosphere, lots of moons have thin atmospheres.
Last edited by paramat on Tue Jun 25, 2013 04:48, edited 1 time in total.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

Nore
Member
 
Posts: 468
Joined: Wed Nov 28, 2012 11:35
GitHub: Ekdohibs

by Nore » Tue Jun 25, 2013 04:59

We need a function to change the time for only one player, and to change his stars/moon/sun background... We could get real space...
 

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

by paramat » Tue Jun 25, 2013 08:42

Someone could run a space server with time stationary and set to night. In space the sun is actually blinding yellow-white so you could consider the 'moon' to be the sun.
Last edited by paramat on Wed Jul 16, 2014 14:15, edited 2 times in total.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
Mossmanikin
Member
 
Posts: 599
Joined: Sun May 19, 2013 16:26

by Mossmanikin » Thu Jun 27, 2013 06:21

Looks awesome

Noob 4 life!
My stuff
 

Nore
Member
 
Posts: 468
Joined: Wed Nov 28, 2012 11:35
GitHub: Ekdohibs

by Nore » Thu Jun 27, 2013 06:44

Is it water at the top of the map? That looks strange on a moon...
@mauvebic: were you finally able to finish your code for an atmosphere? If so, I'd like to see it.

paramat: If you want faster generation for those who have the indev release, without affecting the generation time for the others, use that code:
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
if minetest.place_schematic==nil then
    function minetest.place_schematic(pos, schematic)
        local x = pos.x
        local y = pos.y
        local z = pos.z
        local set_node = minetest.set_node
        local scmdata = schematic.data
        local j2, k2
        for k = 0, schematic.size.z-1 do
            k2 = k*schematic.size.x*schematic.size.y
            for j = 0, schematic.size.y-1 do
                j2 = j*schematic.size.x
                for i = 0, schematic.size.x-1 do
                    if scmdata[i+j2+k2+1].name~="ignore" then
                        set_node({x=x+i,y=y+j,z=z+k}, scmdata[i+j2+k2+1])
                    end
                end
            end
        end
    end
end

with a modfied ces function that will set "ignore" to all locations instead of air.
Last edited by Nore on Thu Jun 27, 2013 07:34, edited 1 time in total.
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Thu Jun 27, 2013 17:44

Nore wrote:@mauvebic: were you finally able to finish your code for an atmosphere? If so, I'd like to see it.


I did get it to work but the results were disappointing with a test dome. It simply took too long for oxygen to be produced and move (or at least, one of the two processes was slowing things down). After an evening (few hours) my test dome still didn't have a full breathable atmosphere. On the flipside, increasing the speed through the abm's made the server slower (--FPS,++cpu usage).

Another avenue might be to implement the lua drowning mod in reverse (make players suffocate above a certain Y threshold w/o the spacesuit) though that comes with it's own caveat of not knowing when a player is indoors or not (they would suffocate in bases). One solution to that might be to add atmospheric generator nodes. Register/poll the position of these gens and give them an effective radius. Then the suffocation (reverse drowning) mod could simply check if the player is within range of said generator.

Anyways, here's the code (if someone can make it work more smoothly):
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_node(":air", {
    description = "Air",
    inventory_image = "unknown_node.png",
    wield_image = "unknown_node.png",
    drawtype = "airlike",
    paramtype = "light",
    sunlight_propagates = true,
    walkable = false,
    pointable = false,
    diggable = false,
    buildable_to = true,
    air_equivalent = true,
    drop = "",
--    groups = {not_in_creative_inventory=1},
})
minetest.register_node(":void", {
    description = "Void (you hacker you!)",
    inventory_image = "unknown_node.png",
    wield_image = "unknown_node.png",
    drawtype = "airlike",
    paramtype = "light",
    sunlight_propagates = true,
    walkable = false,
    pointable = false,
    diggable = false,
    buildable_to = true,
    air_equivalent = true,
    drop = "",
    groups = {not_in_creative_inventory=1},
    damage_per_second = 2,
    post_effect_color = {a=64, r=255, g=148, b=0},
})
for i=1,8 do
    minetest.register_ore({
        ore_type       = "scatter",
        ore            = 'void',
        wherein        = 'air',
        clust_scarcity = 1,
        clust_num_ores = 1,
        clust_size     = 1,
        height_min     = 14000,
        height_max     = 30000,
    })
end


minetest.register_abm({
    nodenames = { "air"},
    interval = 2,
    chance = 10,
    action = function(pos, node, active_object_count, active_object_count_wider)
        if pos.y > 14000 then
            for _, cp in pairs({{x=pos.x+1,y=pos.y,z=pos.z},{x=pos.x-1,y=pos.y,z=pos.z},{x=pos.x,y=pos.y+1,z=pos.z},
            {x=pos.x,y=pos.y-1,z=pos.z},{x=pos.x,y=pos.y,z=pos.z+1},{x=pos.x,y=pos.y,z=pos.z-1},}) do
                if minetest.env:get_node(cp).name == 'void' then
                --    print('moving air')
                    minetest.env:remove_node(cp) -- air dest
                    minetest.env:add_node(pos,{name='void'}) -- air source
                    break
                end
            end
        end
    end
})
minetest.register_abm({
    nodenames = { "group:leaves"},
    interval = 5,
    chance = 6,
    action = function(pos, node, active_object_count, active_object_count_wider)
        if pos.y > 14000 then
            for _, cp in pairs({{x=pos.x+1,y=pos.y,z=pos.z},{x=pos.x-1,y=pos.y,z=pos.z},{x=pos.x,y=pos.y+1,z=pos.z},
            {x=pos.x,y=pos.y-1,z=pos.z},{x=pos.x,y=pos.y,z=pos.z+1},{x=pos.x,y=pos.y,z=pos.z-1},}) do
                if minetest.env:get_node(cp).name == 'void' then
                --    print('making air')
                    minetest.env:remove_node(cp) -- air dest
                end
            end
        end
    end
})
]]--


This is my rebuilt base using paramat's 020 version:
Image
"Fuck the hat." - Paulie Gualtieri
 

Nore
Member
 
Posts: 468
Joined: Wed Nov 28, 2012 11:35
GitHub: Ekdohibs

by Nore » Thu Jun 27, 2013 19:57

Did you try to add a neighbors = {"void"} field to the ABM ? It will avoid unecessary operations.
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Thu Jun 27, 2013 20:55

I was thinking of using minetest.find_nodes_in_area(minp, maxp, 'void')

leaves could replace more voids with air (current limit: 6 nodes or radius 1). It might help speed up air movement too.

Adding neighbours field would also improve performance as the dome fills up (fewer voids).
Last edited by mauvebic on Thu Jun 27, 2013 20:57, edited 1 time in total.
"Fuck the hat." - Paulie Gualtieri
 

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

by paramat » Fri Jun 28, 2013 00:23

This idea of turning vacuum / poison atmosphere nodes into air nodes is interesting and inspiring. Nice base.
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 » Fri Jun 28, 2013 05:48

Nore wrote:Is it water at the top of the map? That looks strange on a moon...

paramat: If you want faster generation for those who have the indev release, without affecting the generation time for the others, use that code

That's water on the normal surface below :)

Thanks but no point me using that code 0.4.8 is coming soon and i'll then be concentrating on using hmmm's voxel map manipulator, also he recommended not using schematics for large scale realm generation.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
prof-turbo
Member
 
Posts: 518
Joined: Mon May 07, 2012 17:02

by prof-turbo » Fri Jun 28, 2013 10:03

---Idea---

When arriving to a x level of depht, you fall in space

Exemple :
| between -500 and -450, there's space :
|
|spawn
|___________________________
|moon |
|___________________________|
|blank
You should take a look at http://www.xorhub.com
 

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

by paramat » Fri Jun 28, 2013 12:36

prof-turbo, yeah that already happens in this mod, by default dig 1km down to reach realm bottom.
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 » Fri Jun 28, 2013 16:16

Have you had any luck with creating abandoned alien ruins yet? They could be made out of the same ores that could be found within the moon. Maybe mauvebic could help out with this, since he is very good at making gargantuan structures.
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Fri Jun 28, 2013 16:27

Well, i have ships and bases from ST and BSG, and buildings from SW, though i have no idea what the new schematics in plaintext look like, id likely have to convert my models.
"Fuck the hat." - Paulie Gualtieri
 

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

by paramat » Fri Jun 28, 2013 19:02

Version 0.3.0.
Link, details, screenshots in edited first post.
Last edited by paramat on Fri Jun 28, 2013 20:28, 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 » Fri Jun 28, 2013 20:29

Now on github, link in first post.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Fri Jun 28, 2013 21:02

updated shots of moonbase Titan I. Residential building is up, got water, plasma & beer distrubtion running :-)

Image
Image
Image
Image
"Fuck the hat." - Paulie Gualtieri
 

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

by Inocudom » Sat Jun 29, 2013 01:08

mauvebic wrote:updated shots of moonbase Titan I. Residential building is up, got water, plasma & beer distrubtion running :-)


Good to see you back with us again, Mauvebic.
 

BadWolf
Member
 
Posts: 42
Joined: Thu Jun 27, 2013 17:27

by BadWolf » Sat Jun 29, 2013 14:20

I'm slightly confused, I'm trying to learn and understand the code here, mauvebic, did your code create air inside the structures only?

I ask because I'm inspired to possibly try my hand at recreating the planet 'Diamond' where the sunlight is toxic, and people must be protected by thick sheets of glass. is it possible to have the toxic atmosphere flow downward, and have air generator blocks that would allow the building of structures in a toxic environment?
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Sat Jun 29, 2013 14:48

Inocudom wrote:Good to see you back with us again, Mauvebic.


Im just building though. Considering ive been waiting two years for a genuine space map, it's hardly surprising this mod piqued my interest :p As for development, that requires more patience for rudeness and politics than what i got lol

I'lll keep posting shots of my base as it progresses (unless paramat asks me to move them) :-)
Last edited by mauvebic on Sat Jun 29, 2013 14:49, edited 1 time in total.
"Fuck the hat." - Paulie Gualtieri
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Sat Jun 29, 2013 15:00

BadWolf wrote:I'm slightly confused, I'm trying to learn and understand the code here, mauvebic, did your code create air inside the structures only?


Naw it doesn't matter where the leaves are (indoor or outdoors), they just create air by replacing neighbouring voids. The other abm' moves the air nodes towards (neighbouring) void. So a dome is only there to keep the air in. Without a dome, the air nodes would scatter in every direction.
"Fuck the hat." - Paulie Gualtieri
 

BadWolf
Member
 
Posts: 42
Joined: Thu Jun 27, 2013 17:27

by BadWolf » Sat Jun 29, 2013 15:32

Thanks for the reply. I see now in the code where you have the trees generating air. So it would be possible to add on an atmosphere generating machine, rather than trees.

I really need to read up on the minetest API.
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Sat Jun 29, 2013 15:38

yeah if you want a machine to do the air-generating, just change the leaves abm so that it works on your generator node instead :-)
"Fuck the hat." - Paulie Gualtieri
 

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

by paramat » Sat Jun 29, 2013 16:19

mauvebic wrote:I'lll keep posting shots of my base as it progresses (unless paramat asks me to move them) :-)

No problem i don't mind :)
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 Jun 29, 2013 18:04

Version 0.3.0 was released with some experimental parameters:
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
local HEXP = 1.5
local LEXP = 3

Now i'm not sure i like the terrain, so, if you want the classic moonrealm terrain from versions 0.1.0 and 0.2.0 (screens below) you should edit these to:
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
local HEXP = 2
local LEXP = 2

These are the 'crazyness' parameters for the higher and lower terrain, and define the cliffs ... set to 1 results in standard 3D perlin noise landscape, 2 and above for cliffs, overhangs, 'floaty bits', tunnels, spikes. Remember this can be set to fractional values and below 1 ... it should be fine tuned to your taste.
Last edited by paramat on Mon Jul 01, 2013 11:29, 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 » Sat Jun 29, 2013 18:38

I was inspired by mauvebic's use of air generation to experiment ... managed to clear a small room in about 2 minutes. Its funny i hadn't thought of trees duh ...
First time i tried i managed to get an air leak through a diagonal corner situation ... its scary once my air gets out it spreads quick ... the game quickly headed for abm meltdown.
So yeah this'll be in 0.4.0.
Also, the dust colours were not carefully chosen i assumed most of you would change the textures to your taste?
Anyways code.
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_node("moonrealm:airgen", {
    description = "Air Generator",
    tiles = {"moonrealm_airgen.png"},
    groups = {dig_immediate=1},
    sounds = default.node_sound_stone_defaults(),
    on_construct = function(pos)
        local env = minetest.env
        local x = pos.x
        local y = pos.y
        local z = pos.z
        for i = -1,1 do
        for j = -1,1 do
        for k = -1,1 do
            if not (i == 0 and j == 0 and k == 0) then
                local nodename = env:get_node({x=x+i,y=y+j,z=z+k}).name
                if nodename == "moonrealm:atmos" then
                    env:add_node({x=x+i,y=y+j,z=z+k},{name="moonrealm:air"})
                end
            end
        end
        end
        end
       
    end
})

-- On dignode. Atmosphere flows into a dug hole.

if ATMOS then
    minetest.register_on_dignode(function(pos, oldnode, digger)
        local env = minetest.env
        local x = pos.x
        local y = pos.y
        local z = pos.z
        for i = -1,1 do
        for j = -1,1 do
        for k = -1,1 do
            if not (i == 0 and j == 0 and k == 0) then
                local nodename = env:get_node({x=x+i,y=y+j,z=z+k}).name
                if nodename == "moonrealm:atmos" then   
                    env:add_node({x=x,y=y,z=z},{name="moonrealm:atmos"})
                    return
                end
            end
        end
        end
        end
    end)
end

-- Abm.

if ATMOS then
    minetest.register_abm({
        nodenames = {"moonrealm:air"},
        neighbors = {"moonrealm:atmos"},
        interval = AIRINT,
        chance = 9,
        action = function(pos, node, active_object_count, active_object_count_wider)
            local env = minetest.env
            local x = pos.x
            local y = pos.y
            local z = pos.z
            for i = -1,1 do
            for j = -1,1 do
            for k = -1,1 do
                if not (i == 0 and j == 0 and k == 0) then
                    local nodename = env:get_node({x=x+i,y=y+j,z=z+k}).name
                    if nodename == "moonrealm:atmos" then
                        env:add_node({x=x+i,y=y+j,z=z+k},{name="moonrealm:air"})
                        print ("[moonrealm] Air spreads ("..i.." "..j.." "..k..")")
                    end
                end
            end
            end
            end
        end
    })
end
Last edited by paramat on Mon Jul 01, 2013 11:29, 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 » Sat Jun 29, 2013 19:17

Lots of new screens in first post.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Sat Jun 29, 2013 20:05

You need generators in the beginning anyhow, trees won't spawn in atmosphere, though i'd still use both (large structures need the help). If my code had been less laggy, i would have also made air and/or water turn moondust to dirt, essentially terraforming.
"Fuck the hat." - Paulie Gualtieri
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 20 guests

cron