Dustley / VS_tournament-Vintage

VS2 Compitition mod
Apache License 2.0
5 stars 2 forks source link

Ship is left tilted when one of the powered balloons gets destroyed #6

Open 19PHOBOSS98 opened 1 year ago

19PHOBOSS98 commented 1 year ago

javaw_FikKr9JNFu

https://youtu.be/njpYg_iC5Iw

It would still act like this even though I broke all of the balloons. Even Eureka's helm auto-stabilization couldn't get it up right: javaw_kQlO3eeERT

alex-s168 commented 1 year ago

there a 2 bugs in the video:

19PHOBOSS98 commented 1 year ago

there a 2 bugs in the video:

  • the thing with breaking them
  • why tf does it have so much lift with a second balloon

I thought the second one was a feature, lol... its the redstone. The second balloon took in the redstone power signal. Manually calculating the forces, the math checks out.

Moreover, doing a bit more experimenting and a bunch of manual math I found out that the "appliedinvariantForce" still persisted even thought the second balloon was broken but only then, the "ghost" balloon didn't retain its redstone power.

Probably worth checking out the Balloons mutable list over at the tournamentShipControl.kt

da math... if anyone want's to know: Balloon_force = (redstone_sig+1) * (configured_balloon_power) * (configured_base_height-(ship_world_y^2/1000.0)) (its based from how you guys calculate it)

The test ship comprised of Oak_Plank blocks (mass=600 ; weight = 600 * 9.8 = 5880KN) a balloon above them and a Create Analog Lever on top of that

I was on a flat world so the ground is at y = -60

the ship was 3 blocks tall (the analog lever counts apparently) and so the center was located at y=-59

Balloon_force = (15+1) * (30) * (100-((-59)^2/1000.0))
Balloon_force = 46'329.12KN

min number of oak blocks to neutral buoyancy (or at least weigh it down) = 46'329.12KN / 5880KN ~8

total counter acting force of oak planks = 5880KN * 8 = 47'040KN

that means with a fully on analog lever (15 redstone strength) on a single balloon, it should take at least 8 oak planks to weigh it down to the ground.

without shifting the ship's center point (and ultimately the starting ship y position) I place the 8 oak planks around the balloon and it only ever starts to rise if I break one of them.

I tried scaling the same ship up. 3 balloons in a row with an analog lever at the top of the center balloon and 23 oak planks around, again, without shifting the ships center point. As calculated it didn't start flying until I break one of the blocks:

starting ship y world position = -59:
2 balloons (redstone strength 14) = 86867.1KN
1balloon (redstone strength 15) = 46329.12KN

total lift = 133'196.22KN

23 OakPlanks = 135'240KN

it fell slow but it was basically neutrally buoyant

Everything went well until I tried scaling the same ship back down to it's original form. I broke the two side balloons and noticed that the math was off.

It now took 9 blocks to weigh it down instead of 8 like the first time. The two side "ghost" balloons were gone but still imparted force and this time without redstone... so basically their redstone strength attribute is set to 0.

starting ship y world position = -59:
2 ghost balloons (redstone strength 0) = 5791.14KN
1balloon (redstone strength 15) = 46329.12KN

total lift = 52'120.26KN

8 OakPlanks = 47'040KN

9 OakPlanks = 52'920KN

now with 8 oak planks it still had enough upward force to lift it thanks to the phantom balloons. It now needed 9 oakPlanks to weigh it down properly

test ships: image

19PHOBOSS98 commented 1 year ago

apparently it happens only when you PLACE a balloon for the first time right next to a powered block: https://youtu.be/mvb3Y-8QgKk