Mass-based turning system

    What turning system do you want?


    • Total voters
      28

    Keptick

    Building masochist
    Joined
    Sep 26, 2013
    Messages
    4,062
    Reaction score
    1,841
    • Councillor 2 Gold
    • Railman Gold
    • Thinking Positive Gold
    The best solution is actually to just apply real life angular dynamics, which take dimensions AND mass distribution into account...
     
    Joined
    Jun 20, 2013
    Messages
    2,827
    Reaction score
    1,181
    • Video Genius
    • Legacy Citizen 4
    • Top Forum Contributor
    which is what it already does, mass does affect the turning rate to, but not at all as much as before the dimension option was implemented
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    With a ship >2km minimum radius, you can make a distance-holder like:
    H . . . H . . . H . . . H
    . . T . . . . . . . T . .
    . . . . . T . . . . . . .
    . . . . . . . . . . . . .

    H . . . H . . . H . . . H
    . . . . . . T . . . . . .
    . . . T . . . . . . . . .
    . . . . . . . . . T . . .

    H . . . H . . . H . . . H
    . . . . . . . . . . . . .
    . T . . . . T . . . . T .
    . . . . . . . . . . . . .

    H . . . H . . . H . . . H

    And use free floating drone-sized sniper turrets, as evasion with passive push is a viable strategy again ((as your core is just out of range))
    in just what way does this even remotely relate to the thread...
    If box size does not matter anymore... :p

    ---

    Imagine a cube:
    -- -- -- -- y: -- -- --| y blocks
    -- -- -- -- +3 -- -- --| 3
    -- -- -- -- +2 -- -- --| 7
    -- -- -- -- +1 -- -- --| 9
    x: -3 -2 -1 00 +1 +2 +3| 9
    -- -- -- -- -1 -- -- --| 9
    -- -- -- -- -2 -- -- --| 7
    -- -- -- -- -3 -- -- --| 3

    –––––––––––––––––––––––––-––––––––––––––––––––
    x: .3 .7 .9 .9 .9 .7 .3 mass in yz plane

    You could reduce the size of all blocks to just 1 number per plane.
    You have with + height + length planes (yes, + not *)

    But to find the Center of Mass (CoM) (Example plane-weights: 3799973) you have to calculate:

    aOriginal[] = 3,7,9,9,9,7,3 given (modified on block addition/loss)

    loop all "i"s
    > aFind1CoM = aOriginal + (aFindCoM[i-1] defaults to 0)
    > aFind1CoMReverse = aOriginal + (aFindCoM[i+1] defaults to 0)
    > aFind2CoM = aFind1CoM + (aFind2CoM[i-1] defaults to 0)
    > aFind2CoMReverse = aFind1Com + (aFind2CoM[i+1] defaults to 0)



    What the loop result is:
    > the closer to go away from the very rear or front, the heavier this plane is for rotating.
    > aFind1... fields contain the sum of plane-blocks from itself and all previous.
    > aFind2... fields goes one step further and contains the sum of it and all previous plane blocks + the sum of previous which also contains the sum of previous.
    > Thus aFind2 #2 adds #1 one time. aFind2 #3 adds #1 two times and #2 one time. Basically weight * distance without multiplications AND intermediate results in aFind1CoM

    The CoM is where aFind2CoM and aFind2CoMReverse is equal.



    Performance

    You have to do 2 additions * axis-planes count * axis count and access the array values.

    Each time it's modified, everything has to get calculated again.
    Maybe you can save some calculations by only updating it each second or at 10% blocks lost in a significant (outward) plane.
    Maybe you can save some calculations by calculating more details on outermost parts.​
    It is still a huge task each time significant amount gets modified.
    Especially since you have to update 3 plane weights per update-block-group-plane: each occupied {xz plane, xy plane, yz plane).​

    Why you should read the math above

    Maybe this is not the optimal solution for updating CoM (even though it is pretty fast calculating it from scrap) but it definitively can give you some insight into the complexity of CoM calculations.

    I still try to learn more about it - where are the good manuals when you need them?​
     
    Joined
    Aug 30, 2013
    Messages
    199
    Reaction score
    14
    I already explained why I'd prefer mass only based turning, but if calculating the center of mass and moment of inertia is the goal, the way I would do it is count the number of blocks (mass) in each chunk (16*16*16 area I believe) and treat them as a point mass in the center of the chunk. Then the center of mass is just the weighted average of the all the chunks, and the moment of inertia on each axis would be found using I = mass * distance^2 (perpendicular to the axis).

    Calculating the exact values would involve the same calculations on every single block, which is not practical.

    EDIT: because I stuffed up formula, also, as @ltmauve said, both these calculations need to be done on X, Y and Z axis.
     
    Last edited:
    Joined
    Aug 28, 2013
    Messages
    1,831
    Reaction score
    374
    • Legacy Citizen 2
    • Top Forum Contributor
    • Legacy Citizen
    Calculating the exact values would involve the same calculations on every single block, which is not practical.
    Actually, you need six new operations per block. For turning, you need the mass times the distance squared in each plane. For center or mass calculations, you need to multiply the mass by each coordinate and add it to the sum. Then you get the average by dividing it by the sum.
     
    Joined
    Apr 20, 2014
    Messages
    102
    Reaction score
    16
    Makacodor explained my physics based system well, he posted a link on the first page. I like this system better but it just doesn't work as good as doing the actual math which wouldn't be too intensive unless the code was completely devoid of optimization.
    Edit: Malacodor
     
    Last edited:
    Joined
    Sep 15, 2013
    Messages
    267
    Reaction score
    63
    ...but turning rate IRL is determined by a ship's moment of inertia, so the current system is more accurate

    and borg cubes aren't used because they turn faster, they're just easier/quicker to build for griefers
     
    • Like
    Reactions: Valiant70
    Joined
    Apr 21, 2013
    Messages
    1,714
    Reaction score
    650
    • Top Forum Contributor
    • Legacy Citizen 3
    • Councillor Gold
    I'm going to provide a veteran's view on the whole situation.


    The dimensional turning system was introduced a while back to help ships turn faster; when mass was the primary dictating factor in the turning formula, it became VERY easy to get a ship that couldn't turn for shit.


    I think schema should lower the minimum turn rate by default to something around 0.5. But that's just me.
     
    Joined
    Aug 30, 2013
    Messages
    199
    Reaction score
    14
    I'm going to provide a veteran's view on the whole situation.

    The dimensional turning system was introduced a while back to help ships turn faster; when mass was the primary dictating factor in the turning formula, it became VERY easy to get a ship that couldn't turn for shit.

    I think schema should lower the minimum turn rate by default to something around 0.5. But that's just me.
    That's kind of the effect I was going for with my logarithmic formula, but rather than hitting a minimum and having a 1 million block ship turn at the same rate as a 10 million block ship, the 10 million block ship would turn ~20% slower, giving the smaller ship a much needed advantage. The difference between a fighter and a titan would be smaller though.
     
    Joined
    Jun 20, 2013
    Messages
    268
    Reaction score
    70
    I'd like to see the rotational axis be moved from the ship's core and to the ship's center of mass. Having the core right at the back or right at the front on a large ship looks pretty weird when it turns.
     
    Joined
    Apr 25, 2013
    Messages
    1,076
    Reaction score
    186
    • Purchased!
    • Legacy Citizen
    • Legacy Citizen 2
    i'm not math-savvy so i'll let you guys handle the equations and stuff. honestly, i can't even begin to understand all that math stuff you guys are doing in the thread...
     

    Keptick

    Building masochist
    Joined
    Sep 26, 2013
    Messages
    4,062
    Reaction score
    1,841
    • Councillor 2 Gold
    • Railman Gold
    • Thinking Positive Gold
    i'm not math-savvy so i'll let you guys handle the equations and stuff. honestly, i can't even begin to understand all that math stuff you guys are doing in the thread...
    Mechanics course #1 :P
     
    Joined
    Apr 20, 2014
    Messages
    102
    Reaction score
    16
    i'm not math-savvy so i'll let you guys handle the equations and stuff. honestly, i can't even begin to understand all that math stuff you guys are doing in the thread...
    Ok, I meant that it takes a certain amount of force to move a certain weight (mass) and was talking about calculating the mass that was being moved when you turn the ship one way; then you take that and compare it to the amount of energy going into rotating the ship. I'm not very literate in physics so I'm not sure as to specific values on what is being moved and how much force is needed to move it.