Experiment to create air bubbles.

User avatar
googol
Member
 
Posts: 48
Joined: Mon Dec 09, 2013 09:23

Experiment to create air bubbles.

by googol » Wed Feb 01, 2017 11:48

HI.
I have a question.
This is a bug or a feature?
How can I get a stable operating node (bubble_sand) in my mod?
Thank you.

1.png
air bubbles
1.png (280.14 KiB) Viewed 1250 times

2.png
2.png (265.75 KiB) Viewed 1250 times


Video link:
https://youtu.be/sYw6Emfdumg

Sorry for my English
 

User avatar
ExeterDad
Member
 
Posts: 1121
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad

Re: Experiment to create air bubbles.

by ExeterDad » Wed Feb 01, 2017 14:50

Hah! That's pretty cool looking! Liked the video.
You may want to look into the code for the "under sea" mod that's out there. I believe the void was overcome with a fake water?
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

User avatar
googol
Member
 
Posts: 48
Joined: Mon Dec 09, 2013 09:23

Re: Experiment to create air bubbles.

by googol » Wed Feb 01, 2017 18:46

In video i demonstrate a piece of code where i'm doing a comment of one line:
liquid_alternative_flowing = "default:water_flowing",

In full code of node:
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("bubble_sand:bubbles", {
        description = "Bubbles",
        drawtype = "plantlike",
        tiles = {{ name = "bubble_basic_flame_animated.png",
                   animation = { type = "vertical_frames",
                                aspect_w = 16,
                                aspect_h = 16,
                                length = 0.5,
                              },
                },},
          -- New-style water source material (mostly unused)
        special_tiles = {{ name = "bubble_basic_flame_animated.png",
                           animation = { type = "vertical_frames",
                                         aspect_w = 16,
                                         aspect_h = 16,
                                         length = 0.5,
                                       },
                          backface_culling = true,
                        },},
        alpha = 255,
        paramtype = "light",
        walkable = false,
        pointable = false,
        diggable = false,
        buildable_to = true,
        is_ground_content = false,
        drop = "",
        drowning = 1, -
        liquidtype = "source",
        liquid_alternative_flowing = "default:water_flowing",
--        liquid_alternative_flowing = "bubble_sand:bubbles",
         liquid_alternative_source = "bubble_sand:bubbles",
--         liquid_alternative_source = "default:water_source",
        liquid_viscosity = 1,
   liquid_renewable = false,
   liquid_range = 0,
        post_effect_color = {a = 103, r = 30, g = 60, b = 90},
        groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1},
--       freezemelt = "default:water_source",
})


After this node air bubbles stay flooded
but i lose a possibility to generate new bubbles, it's like blocks are fulling with water (in my opinion)
Who can watch my full code and help me with this situation?
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: Experiment to create air bubbles.

by TenPlus1 » Wed Feb 01, 2017 19:55

Maybe this will help, place bubblesand node underwater around 5 deep and watch :)

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("bubble_sand:bubblesand", {
   description = "Bubble Sand",
   tiles = {"default_sand.png"},
   groups = {crumbly = 3, falling_node = 1, sand = 1},
   sounds = default.node_sound_sand_defaults(),

   on_timer = function(pos)

      local offset_x = math.random(-10, 10) / 20
      local offset_z = math.random(-10, 10) / 20
      local pos2 = {
         x = pos.x + offset_x,
         y = pos.y + 0.5,
         z = pos.z + offset_z,
      }

      minetest.add_particle({
         pos = pos2,
         velocity = {x = 0, y = 0, z = 0},
         acceleration = {x = 0, y = 1, z = 0},
         expirationtime = 2,
         collisiondetection = false,
         texture = "bubble.png",
         size = math.random(1, 2),
      })

      minetest.get_node_timer(pos):start(1)
   end,

   on_construct = function(pos)
      minetest.get_node_timer(pos):start(1)
   end,
})
 

User avatar
googol
Member
 
Posts: 48
Joined: Mon Dec 09, 2013 09:23

Re: Experiment to create air bubbles.

by googol » Thu Feb 02, 2017 07:16

Thanks, TenPlus1
May be your way is right.

I will not be regarded as a heretic for round objects in minetest?

Easy testing showed me a display problem Particle. I do not see them under water while in the air.
ImageImage
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: Experiment to create air bubbles.

by TenPlus1 » Thu Feb 02, 2017 08:49

Seems minetest has a few display glitches like this, especially when using node transparency in certain cases.
 

User avatar
googol
Member
 
Posts: 48
Joined: Mon Dec 09, 2013 09:23

Re: Experiment to create air bubbles.

by googol » Thu Feb 02, 2017 09:35

Ok i will continue experiment.
Maybe this bug need write to the bug reports?
 

User avatar
googol
Member
 
Posts: 48
Joined: Mon Dec 09, 2013 09:23

Re: Experiment to create air bubbles.

by googol » Sat Feb 04, 2017 05:50

So
What you think about this?

Video link:
https://youtu.be/vFjiG-FbZSw

------
Discussion move to https://forum.minetest.net/viewtopic.php?f=9&t=16587
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron