Experiment to create air bubbles.

Post Reply
User avatar
googol
Member
Posts: 83
Joined: Mon Dec 09, 2013 09:23

Experiment to create air bubbles.

by googol » Post

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.
air bubbles
air bubbles
1.png (280.14 KiB) Viewed 270 times
2.png
2.png (265.75 KiB) Viewed 270 times
Video link:
https://youtu.be/sYw6Emfdumg

Sorry for my English

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: Experiment to create air bubbles.

by ExeterDad » Post

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?

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

Re: Experiment to create air bubbles.

by googol » Post

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:

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: 3722
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: Experiment to create air bubbles.

by TenPlus1 » Post

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

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: 83
Joined: Mon Dec 09, 2013 09:23

Re: Experiment to create air bubbles.

by googol » Post

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: 3722
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: Experiment to create air bubbles.

by TenPlus1 » Post

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

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

Re: Experiment to create air bubbles.

by googol » Post

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

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

Re: Experiment to create air bubbles.

by googol » Post

So
What you think about this?

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

------
Discussion move to viewtopic.php?f=9&t=16587

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests