Page 1 of 1

Flying Objects?

PostPosted: Thu Nov 24, 2011 23:43
by dnywna
What I'd really like to see is propellers, balloons and sails. I want to be able to, with enough propellers and energy, lift my castle into the sky.

It wouldnt be that hard to code either - just calculate a "mass" of every structure then use high school physics to calculate then energy needed to lift it. You could even have the mass value increase by x for every y distance it travels to simulate the effects of gravity and balance of forces! You could also make it so that anything touching the ground will never move at all, allowing you to anchor things to the ground with blocks.

Stolen from /v/:

Image

PostPosted: Fri Nov 25, 2011 03:08
by xyz
It is quite easy if you don't want to use smooth moving

PostPosted: Fri Nov 25, 2011 03:31
by randomproof
just calculate a "mass" of every structure


That would be the hardest thing to do. How would you determine if a block is part of a structure? I've thought of the idea of calculating weight of blocks and how much they could carry with the thought that large caves and structure could collapse if not properly designed. The problem I have is that the program would end up scanning huge amounts of blocks to try and find "ground level."

PostPosted: Fri Nov 25, 2011 03:50
by xyz
randomproof wrote:
just calculate a "mass" of every structure


That would be the hardest thing to do. How would you determine if a block is part of a structure? I've thought of the idea of calculating weight of blocks and how much they could carry with the thought that large caves and structure could collapse if not properly designed. The problem I have is that the program would end up scanning huge amounts of blocks to try and find "ground level."

DFS? With maximum depth predefined.

PostPosted: Fri Nov 25, 2011 13:20
by Staffs
Just make your castle above block called *start* or smth :D.. So you cant lift that *start* And lifts everything which isnt *start*. I hope you get my point :D

PostPosted: Fri Nov 25, 2011 21:26
by Heinrich
dnywna wrote:It wouldnt be that hard to code either


If it is that easy why don't you just write a patch over the weekend?

PostPosted: Fri Nov 25, 2011 22:36
by fake
I think calculating of mass is not the most difficult. First of all you need to remove all the blocks that belong to the castle, after that you need to create active object, and connect it to ballons.But now it is very hard, may be later.


Sorry for my bad english.

PostPosted: Sat Nov 26, 2011 13:10
by dnywna
randomproof wrote:
just calculate a "mass" of every structure


That would be the hardest thing to do. How would you determine if a block is part of a structure? I've thought of the idea of calculating weight of blocks and how much they could carry with the thought that large caves and structure could collapse if not properly designed. The problem I have is that the program would end up scanning huge amounts of blocks to try and find "ground level."


Simplest way to do it would be to have any collection of blocks that isnt touching the generated ground be single structure maybe.
Or you could just allow users to designate them themselves?
Of course, neither of these would work at all for what you had in mind.

If it is that easy why don't you just write a patch over the weekend?


I might give it a go, but I'm not familiar at all with the Minetest code.

PostPosted: Sun Nov 27, 2011 20:14
by BetaKing
In order to keep the flight of possibly large multi-block craft smooth, (IE not having the world track every single block as it moves) what If you had your flying - object as sort of an entity.

Image

-world shown as yellow,
-entity shown as red.

basically the blocks on/in the flying-object are not tracked by the same process/function/script as the rest of the world is, rather only the location and/or orientation of the entity is tracked.

The blocks in the entity are tracked by a script tied to the entity.

PostPosted: Tue Jan 10, 2012 21:13
by sycam
well if it's so easy why doesn't write b patch an post it under mods

PostPosted: Tue Jan 10, 2012 21:32
by sapier
In my opinion a clean way to implement moving large structures would be to shift them into their own cooridnate sytem and then only move center of that system.

Problems
1) need to detect which objects and nodes need to be shifted
2) implement child/parent coordinaion system
3) movement support for multiple child systems
4) nested coord system support?? (probably optional)

That AINT a small and easy change not difficult either but lots of work!