Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

Make floating blocks


  • Please log in to reply
15 replies to this topic

#1

sjstack
    sjstack

    Tree Puncher

  • Members
  • 18 posts
  • Location: Boston, MA

Posted 07 January 2011 - 09:24 AM

The most basic idea is making things float in water.

So first I thought it'd be cool to be able to build larger boats out of blocks like wood or something. But that idea lead me to the idea of simply adding buoyancy values to each block. The values can be relative so that wood will float in water but not in air, etc... Also it's really simple physics, so once you've come up with appropriate buoyancy values you could just implement the correct equations (in reality you'd be assigning density values to each of the blocks and coming up with the correct equations based on real world physics so that the game is as realistic as possible).


This could immediately lead to building things like large floating barges in water, floating islands, and so on. Eventually you could use the same idea to make modifications like rising hot air (which might even lead to something like a hot air balloon, or air ships of some sort).
It might be implemented like such: a wood block on fire causes the x number of blocks above it to be less dense because of the heat, those blocks rise up into the sky and eventually cool off and new air blocks are generated in their place which are then made less dense by the on fire wooden block. This process continues until the wooden block is eventually put out. Maybe if you build a cloth enclosure around enough heated air then the overall density of the cloth enclosure would be small enough to make it rise up into the sky, thus creating a hot air balloon.


Even more down the road would be the creation of air currents due to density imbalances in the sky. This combined with floating objects would give the possibility of sailing ships or airships. I know it'd be tough, especially when you start to expand the idea to air densities.

Still it would be pretty cool to have a simple implementation of blocks that could float/sink in water. Even then though there's still complications with where to put the displaced blocks and how to account for the buoyancy of multiple blocks together (how does the game know that certain blocks should be considered connected, how to calculate the total buoyancy of a large complex object,...). But; I think if people like the idea than there are definitely talented enough programmers playing this game that could make it happen.

Comments, suggestions, ideas?
A work in progress:   http://craftserverdevl.wordpress.com/

Register or log in to remove.

#2

zombie_killer
  • Location: Oslo, Norway
  • Minecraft: Zombie_killer

Posted 07 January 2011 - 09:28 AM

Add buoyancy to the player! I am sick of sinking ingame and floating IRL!
Posted Image

#3

hardway155

Posted 07 January 2011 - 09:35 AM

Well, if you add buoyancy to the player, it wouldent hurt to add a hunger system in which you get fat if you eat too much, ergo you move slower and flot like styrofoam, or the inverse could be possible , you get skinny as a supermodel and can move fast , but you sink like a rock. If this was implemented i would make a rock boat or something just so i could see myself sink, on this topic you could make submarines with a little work, just add weight to sink and lose weight to float and lose more to surface, the only problem is you would need a method of propulsion. As to the weight management, you could go about it two ways:  
1) Put a treadmill and lots of cake in your suba nd eat to get lower and run to get higher,
2) have stone blocks somewhere that you can destroy to get lighter and place to get lower, kind of like the oxygen tanks on real subs, come to think of it, if redstone were more precise we COULD use air if that was given a buoyancy value that allowed air trapped underwater to try to rise.
Posted ImageClick it!
Or the Creepers Slimes will attack you Posted Image Posted Image Posted Image

#4

zombie_killer
  • Location: Oslo, Norway
  • Minecraft: Zombie_killer

Posted 07 January 2011 - 09:46 AM

hardway155 said:

Well, if you add buoyancy to the player, it wouldent hurt to add a hunger system in which you get fat if you eat too much, ergo you move slower and flot like styrofoam, or the inverse could be possible , you get skinny as a supermodel and can move fast , but you sink like a rock.
Since the body is 70% water and 30% lighter materials, you cant sink whatsoever without wights.

hardway155 said:

1) Put a treadmill and lots of cake in your suba nd eat to get lower and run to get higher.
If you hold a cake wile standing on a weight and then proceed to eat it will not make you lighter.

hardway155 said:

2) have stone blocks somewhere that you can destroy to get lighter and place to get lower,
This would work with the current physics.

hardway155 said:

kind of like the oxygen tanks on real subs, come to think of it, if redstone were more precise we COULD use air if that was given a buoyancy value that allowed air trapped underwater to try to rise.
Too advanced...? Kinda...
Posted Image

#5

hardway155

Posted 07 January 2011 - 09:55 AM

zombie_killer said:

Since the body is 70% water and 30% lighter materials, you cant sink whatsoever without weights.
Yeah i know, i wasnt being literal here just saying that a fitness level could be a fun idea that affects jump height and run speed.

zombie_killer said:

If you hold a cake while standing on a weight and then proceed to eat it will not make you lighter.
not sure i understand what you are saying here, but just to clarify, we are assuming that ingame weight transfer is immediate , it would be complicated to addd a timer system. But if you eat food or anything, you "weight" increases which would make the submarines buoyancy less, allowing it to sink, and the inverse is the opposite, and if they added fitness levels to the game (yes its too advanced) but it would be an interesting idea id they added treadmills or something of the less to shed those kilos.(thus making you lighter and allowing you to rise)

zombie_killer said:

Too advanced...? Kinda...
Oh, heck yeah thats too advanced, but it comes down to what players can make with what they have, theoretically air should ALWAYS have a buoyancy level in water so it should be very easy (if they made redstone wireing more accurate) to use air to SINK but for going up , it would require notch to add a lighter than air block that you can store in your inv so you can rise up on command.(this could possible be found in the Aether if it was ever made, otherwise it would have to be a rare block only found in deep caves)
Posted ImageClick it!
Or the Creepers Slimes will attack you Posted Image Posted Image Posted Image

#6

Piejamas
    Piejamas

    Lapis Lazuli Collector

  • Members
  • 1081 posts
  • Minecraft: Piejamas

Posted 07 January 2011 - 10:14 AM

Nice idea, but not really possible. Blocks are fixed to a grid, and can't just move around.
('w')b

#7

hardway155

Posted 07 January 2011 - 10:26 AM

Piejamas said:

Nice idea, but not really possible. Blocks are fixed to a grid, and can't just move around.


*points to gravity affecting sand/gravel*, wouldent be too much of a stretch to make a floating objects move horizontally
Posted ImageClick it!
Or the Creepers Slimes will attack you Posted Image Posted Image Posted Image

#8

sjstack
    sjstack

    Tree Puncher

  • Members
  • 18 posts
  • Location: Boston, MA

Posted 07 January 2011 - 10:27 AM

Piejamas said:

Nice idea, but not really possible. Blocks are fixed to a grid, and can't just move around.

Except that carts can move, and sand and gravel can fall. Also, obviously there's already a crude version of gravity so if you have density values for each block you can calculate a buoyancy force according to Archimedes principle. I actually think that implementing buoyancy only for blocks in water would be fairly simple. The math is certainly easy and it only requires that you know the density of each block which is only one extra descriptor. Really the hardest part is dealing with the displaced water and what happens when you connect blocks together. Would the float together? is there an elegant way to program in that if the surrounding blocks aren't water than the game will assume that they should be "cemented" together or will it require a complicated solution in order to avoid problems with other aspects of the game?

The real hard part is dealing with possible bad consequences of implementing a simple idea without giving it limitations. Then once you figure out the limitations you need on floating blocks, how to program that into the game.
A work in progress:   http://craftserverdevl.wordpress.com/

#9

hardway155

Posted 07 January 2011 - 10:38 AM

I could not understand half of what the guy above me said , but i ge tthe gist and agree with him.
i hope Notch incudes buoyancy.
Posted ImageClick it!
Or the Creepers Slimes will attack you Posted Image Posted Image Posted Image

#10

zombie_killer
  • Location: Oslo, Norway
  • Minecraft: Zombie_killer

Posted 07 January 2011 - 11:03 AM

hardway155 said:

zombie_killer said:

If you hold a cake while standing on a weight and then proceed to eat it will not make you lighter.
not sure i understand what you are saying here, but just to clarify, we are assuming that ingame weight transfer is immediate , it would be complicated to addd a timer system. But if you eat food or anything, you "weight" increases which would make the submarines buoyancy less, allowing it to sink, and the inverse is the opposite, and if they added fitness levels to the game (yes its too advanced) but it would be an interesting idea id they added treadmills or something of the less to shed those kilos.(thus making you lighter and allowing you to rise)
No, I meant, if you have something (like a cake) and move it or change it (eating it) you still have the same mass and weight as you started it. For example, but a log in a big box, light the log on fire. The collected weight of the ashes and sot equals to the weight of the log you burnt.
Posted Image

#11

hardway155

Posted 07 January 2011 - 11:21 AM

Ohhh, right i get you now, well, that would only be applicable if the items in your inv had a weight value , if your inv made items "weightless" then you can see where im coming from right?
Posted ImageClick it!
Or the Creepers Slimes will attack you Posted Image Posted Image Posted Image

#12

zombie_killer
  • Location: Oslo, Norway
  • Minecraft: Zombie_killer

Posted 07 January 2011 - 11:23 AM

Yeah, i gotcha. But per now, sub and such wont work.
Posted Image

#13

sjstack
    sjstack

    Tree Puncher

  • Members
  • 18 posts
  • Location: Boston, MA

Posted 08 January 2011 - 09:08 PM

So I just realized that boats already float and players already sink. Does anyone know if it's possible to use the code that does that to apply it to floating and sinking blocks?
A work in progress:   http://craftserverdevl.wordpress.com/

#14

Pilb
    Pilb

    Iron Miner

  • Members
  • 285 posts

Posted 09 January 2011 - 02:27 AM

Hey, Someone already made floating wood-
Posted Image

#15

sjstack
    sjstack

    Tree Puncher

  • Members
  • 18 posts
  • Location: Boston, MA

Posted 09 January 2011 - 03:08 AM

Nice. Does anyone know if you build a structure out of wood and put it in water if it will retain it's shape or will the blocks float separately?
A work in progress:   http://craftserverdevl.wordpress.com/

#16

Pilb
    Pilb

    Iron Miner

  • Members
  • 285 posts

Posted 10 January 2011 - 12:45 AM

sjstack said:

Nice. Does anyone know if you build a structure out of wood and put it in water if it will retain it's shape or will the blocks float separately?
I think it would be fixed to the grid but it's altitude would increase. So, every block would stay in the same place, just move up. If that makes sense. xD Since in the vid I linked to, the block slots nicely back into it's hole.
Posted Image