Floating wood node?

petra2201
Member
 
Posts: 29
Joined: Fri Jun 05, 2015 14:42

Floating wood node?

by petra2201 » Mon Jul 06, 2015 14:20

Any suggestions to make a floating wood node? Like if you threw a piece of wood on some water what would I need to do to make a subtype of wood that would always stay on the top of water. Like if the water level rose or fell it would follow the top of the water.
Last edited by petra2201 on Mon Jul 06, 2015 19:52, edited 1 time in total.
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Floating wood node?

by ABJ » Mon Jul 06, 2015 19:33

You mean like how we throw? Drop or place?
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

Re: Floating wood node?

by Calinou » Mon Jul 06, 2015 19:44

You can use WorldEdit to place floating nodes.

  • Enable all WorldEdit mods (except GUI, you don't need it).
  • Type //1 then //2 while staying at the same location.
  • Type //set default:wood.
 

petra2201
Member
 
Posts: 29
Joined: Fri Jun 05, 2015 14:42

Re: Floating wood node?

by petra2201 » Mon Jul 06, 2015 19:48

What I was thinking was making a new type of wood that you could place on water and if the water level rose, the wood node would always stay on top of the water. Like the way the boat behaves.
 

petra2201
Member
 
Posts: 29
Joined: Fri Jun 05, 2015 14:42

Re: Floating wood node?

by petra2201 » Mon Jul 06, 2015 21:47

This is it what I had in mind but I'm hoping to expand it to a node type and not just an object.
viewtopic.php?f=9&t=12442&hilit=float+on+water
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

Re: Floating wood node?

by kaeza » Mon Jul 06, 2015 23:46

You could simply take the "floating" code from the boats mod, and replace the boat model with whatever you want (a full block, some kind of log, etc).
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

petra2201
Member
 
Posts: 29
Joined: Fri Jun 05, 2015 14:42

Re: Floating wood node?

by petra2201 » Tue Jul 07, 2015 00:10

Will is be all lua code?
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

Re: Floating wood node?

by kaeza » Tue Jul 07, 2015 00:13

Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

petra2201
Member
 
Posts: 29
Joined: Fri Jun 05, 2015 14:42

Re: Floating wood node?

by petra2201 » Tue Jul 07, 2015 01:19

Cool, ill compare that with the floaty mod I linked to above and see if I can copy it to a wood node.
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

Re: Floating wood node?

by Evergreen » Tue Jul 07, 2015 14:15

You could probably make a "floating" wood node that always moves up to the surface when under water. (and make it move any non water nodes above it upwards as well)
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Floating wood node?

by ABJ » Tue Jul 07, 2015 18:09

That would be funny.
/me floods MrGr8Builder's water bungalow.
:p

EDIT: Easy fountain in teh middle of teh ocean.
 

petra2201
Member
 
Posts: 29
Joined: Fri Jun 05, 2015 14:42

Re: Floating wood node?

by petra2201 » Tue Jul 07, 2015 18:20

Well it would let us build huge floating ships that we could build stuff inside of. That's what I'm aiming towards.
 

petra2201
Member
 
Posts: 29
Joined: Fri Jun 05, 2015 14:42

Re: Floating wood node?

by petra2201 » Tue Jul 07, 2015 19:06

I teased this out of the float mod, It uses a lua entity, that makes me think I can't apply it to a single node the way I'm thinking. In Minetest when we place two blocks beside each other they are seen as separate entities and unless we mark them as one entity they would all behave and float differently (I think). If you made a large wooden boat wouldn't it fall apart if the front hit water that was flowing in a different direction? Here's the code in case I'm wrong.

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
--make it float
   if minetest.get_item_group(node.name, "water") ~= 0 and y == 0 then
      if object:get_luaentity().in_water == false then
         --do sounds and particles for water bounces
         if velocity.y < 0 and velocity.y > -3 then
            minetest.sound_play("soft_splash", {
               pos = {object:getpos()},
               max_hear_distance = 20,
               gain = 0.01,
            })
            minetest.add_particlespawner({
               amount = 10,
               time = 1,
               minpos = {x=realpos.x-1, y=realpos.y, z=realpos.z-1},
               maxpos = {x=realpos.x+1, y=realpos.y, z=realpos.z+1},
               minvel = {x=0, y=0, z=0},
               maxvel = {x=0, y=0, z=0},
               minacc = {x=0, y=0, z=0},
               maxacc = {x=0, y=1, z=0},
               minexptime = 1,
               maxexptime = 1,
               minsize = 1,
               maxsize = 1,
               collisiondetection = false,
               vertical = false,
               texture = "bubble.png",
            })


         elseif velocity.y <= -3 and velocity.y > -10 then
            minetest.sound_play("medium_splash", {
               pos = {object:getpos()},
               max_hear_distance = 20,
               gain = 0.05,
            })
            minetest.add_particlespawner({
               amount = 15,
               time = 1,
               minpos = {x=realpos.x-1, y=realpos.y, z=realpos.z-1},
               maxpos = {x=realpos.x+1, y=realpos.y, z=realpos.z+1},
               minvel = {x=0, y=0, z=0},
               maxvel = {x=0, y=0, z=0},
               minacc = {x=0, y=0, z=0},
               maxacc = {x=0, y=2, z=0},
               minexptime = 1,
               maxexptime = 1,
               minsize = 1,
               maxsize = 1,
               collisiondetection = false,
               vertical = false,
               texture = "bubble.png",
            })

         elseif velocity.y <= -10 then
            minetest.sound_play("big_splash", {
               pos = {object:getpos()},
               max_hear_distance = 20,
               gain = 0.07,
            })
            minetest.add_particlespawner({
               amount = 20,
               time = 0.5,
               minpos = {x=realpos.x-1, y=realpos.y, z=realpos.z-1},
               maxpos = {x=realpos.x+1, y=realpos.y, z=realpos.z+1},
               minvel = {x=0, y=0, z=0},
               maxvel = {x=0, y=0, z=0},
               minacc = {x=0, y=0, z=0},
               maxacc = {x=0, y=3, z=0},
               minexptime = 1,
               maxexptime = 1,
               minsize = 1,
               maxsize = 1,
               collisiondetection = false,
               vertical = false,
               texture = "bubble.png",
            })
         
         end
      end
      object:get_luaentity().in_water = true
      object:setacceleration({x=x,y=4,z=z})
      --slow down boats that fall into water smoothly
      if velocity.y < 0 then
         object:setacceleration({x=x,y=10,z=z})
      end
   end
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Floating wood node?

by ABJ » Sun Jul 12, 2015 15:01

Boat?
Ohhhhhh this is getting interesting.
I actually at first thought this was actually rather dumb.
 

User avatar
texmex
Member
 
Posts: 226
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: Floating wood node?

by texmex » Thu Jan 19, 2017 23:15

Also looking for this. Perhaps a simpler version that checks for water above a new type of buoyant block, and rises it until water is not above it anymore. I can't program but I've seen the mechanic in other mods such as vines and also the builtin falling.lua feature.
I spend all my days going down to the mines. Under the ground where the sun never shines. Breaking my back I put heat in your house. I’ve got the roar of a digtron, the breath of a mouse.
 

Fred Brighton
New member
 
Posts: 6
Joined: Wed Feb 08, 2017 13:52

Re: Floating wood node?

by Fred Brighton » Wed Feb 08, 2017 14:04

I have just recently gotten on board MineTest. I am 67 years old, retired drafting tech and ex-Norse recreationist, used to making things like armor, chainmail, kilns etc as I love to duplicate old tech. Years ago I built a clinker-built boat in the style of the Norse karfi... basically a small version of the dragon ship. I loved that thing and now that I have moved out of the desert to upstate NY I have lots of lakes and rivers which would have been great for building a bigger one. But I am now disabled with broken back parts and fibronyalgia. So it is I decided that building a dragonship in Minetest would be a fine project. I do a lot of time on the raft exploring my worlds in single player mode... I love the design and build aspects but have no interest in combat, engagement, monsters etc. I use it as a clunky CADD program. I am also a sculptor in ceramics/stone/wood/metals and want to be able to sculpt the wood in such a way as to create credible dragon heads for the prow of the boat, given the chunky nature of the blocks. So, with floating wood knitted together to form ship sides and sculpted heads/tails, we should be able to produce a decent ship.
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Floating wood node?

by ABJ » Wed Feb 08, 2017 14:42

Sculpting blocks? Not needed. You've got a 20 by 20 by 20 mile world - why not just build the ship on a gigantic scale?
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: Floating wood node?

by twoelk » Wed Feb 08, 2017 17:40

in the "moving attached nodes" section of Vehicle Mods we list:
some of these should contain some ideas how to code a collection of attached nodes on water.
The biggest problem would probably be how to handle displacing water nodes.
When you would build some thing bigger that actually swims in the water and not only floats right on top, you would want to replace the water nodes that are under the waterline with nodes of your structure so that you might indeed be able to venture under deck. Once you move your structure the nodes behind you will of course have to turn to water again. So how will you manage that when your ship makes a nice smooth turn with all them in between angles? Sounds like some heavy calculating to me, at least for a voxel based game.
 

petra2201
Member
 
Posts: 29
Joined: Fri Jun 05, 2015 14:42

Re: Floating wood node?

by petra2201 » Wed Feb 08, 2017 18:42

Based on the behavior of water I've seen before I'd think that the water would take care of itself. We'd have to use an abm to remove the water. The original mod I linked to the node just always positioned itself on the top of the water. Now that I think about it it would only work to make a flat bottom boat.
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Floating wood node?

by ABJ » Thu Feb 09, 2017 08:45

turning the ship would cause holes in the floor.
 

petra2201
Member
 
Posts: 29
Joined: Fri Jun 05, 2015 14:42

Re: Floating wood node?

by petra2201 » Thu Feb 09, 2017 15:40

So we'd need deeper oceans and maybe an if block for collision detection with not water nodes?
 

User avatar
Wuzzy
Member
 
Posts: 2161
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: Floating wood node?

by Wuzzy » Fri Feb 10, 2017 22:00

Are you looking for something like walkable lily pads from MineClone 2?

For coders who are interested, here is the relevant code section:
http://repo.or.cz/MineClone/MineClone2. ... t.lua#l279

I'm pretty sure this can be turned to floating wooden planks or whatever with little modifications.
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
texmex
Member
 
Posts: 226
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: Floating wood node?

by texmex » Fri Mar 03, 2017 14:48

texmex wrote:Also looking for this. Perhaps a simpler version that checks for water above a new type of buoyant block, and rises it until water is not above it anymore. I can't program but I've seen the mechanic in other mods such as vines and also the builtin falling.lua feature.

This now exists in the pontoons mod, but the whole featureset is not finished yet.
Last edited by texmex on Wed Mar 08, 2017 14:27, edited 1 time in total.
I spend all my days going down to the mines. Under the ground where the sun never shines. Breaking my back I put heat in your house. I’ve got the roar of a digtron, the breath of a mouse.
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Floating wood node?

by Sergey » Sun Mar 05, 2017 20:44

Floating wood node?

Sorry for off-topic, but "wood node" reminded me Mr. Woodnote and this.

https://www.youtube.com/watch?v=WhBoR_tgXCI

Mr. Woodnote with saxophone
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 4 guests

cron