Fix Braces

#1
I've noticed for a while now that braces have been screwed up, but I haven't been able to figure out exactly in what way, and i knew people would just say "you shouldn't use invincible then!" or whatever.

Warning: the following contains explanatory graphics created in mspaint. If you are a graphic designer with a weak heart, you may wish to avert your eyes.

We start with a long brace connected to an arbitrary machine represented by this brace-looking thing attached to this wood-block-looking rectangle.





Now, as we all know, the physics in besiege is a little bit "jittery", due to both the randomness of the Unity engine specifically and the way physics engines in general work. This means that small, semirandom torques happen all the time, and usually they are either a nonissue or are the physics engine, you know, working properly. However, they can be a big problem with any braces of decent size.





The block that the top part of the brace is attached to experiences the kind of small torque that happens all the time. In the real world, this wouldn't be an issue, but in besiege they are, for 2 reasons
  1. The brace in Besiege is perfectly rigid, and does not flex. Why this is part of the issue is kind of obvious.
  2. Large "tick" size. In real life, physical obstacles communicate that they are in the way at the speed of light for an effective "tick size" that is entirely inconsequential to the average mechanical engineer; in besiege it happens once of 1/100th of a second, which is approximately 50 bajillion times larger. So the bottom part does not resist the movement of the brace until the next tick, by which time it has already moved a significant amount.




At this point the game engine, which knows that the bottom part of the brace is supposed to be right up against the block, either breaks the block it is attached to, or, in invincible mode, responds with a force proportional to distance--and that proportion is very large indeed. This huge force then affects the entire machine drastically, which disturbs all the rest of the blocks, which causes them to move far from the blocks they are attached to, and ta-dah, we have the frustrating-yet-hilarious spazzing so familiar to anyone who more than dabbles in invincible mode.

So, how could the devs fix this? There are a couple options.

  • Make the brace non-rigid. This is pretty hard to do in Unity and would probably be pretty processor-intensive; I doubt it's feasible.
  • Have the two sides of the brace "check" with each other before doing any physics. I have no idea how feasible this is; my intuition says that it could end up being easy to code or stupidly difficult.
  • Cheat. Make the brace have two Rigidbodys, Which are attached to each other over a long distance. The visible between them (the "actual brace part") is just another object, with no mass or anything, that always runs between the two.


Attached Files
 
#3
I explain how braces, especially long ones, can break or go crazy when they shouldn't because of a fundamental imperfection in how Besiege works. I then propose potential workarounds for this imperfection.
 
#4
i have experimentet with this as well and came to a rather simmilar result but i was missing the math entirely. this might actually be useful for the devs. and then it might help me since it is rather tedious to work on a 4k + part machine which, when troubleshot, suddelny spazzes out of control, causing the entire game to freeze and thus deleting all progress made
 
#7
I have a ground machine and a flying machine, each with one end connected to the other by a single brace only, and I haven't had this problem. In any case, I wouldn't want them to make the braces too flexible or otherwise change them enough such that my present machines no longer work the same.
 
#8
The "frustrating-yet-hilarious spazzing" you refer to I like call the "bayformer effect" when i am trying to build a mech. I half expect my machine to turn into a car made by whatever manufacturer is partially financing the next transformer movie and a linkin park ballad to start playing. With legs especially. Add a bunch of blocks , suspension , pistons etc all at different angles that fight against each other and generally lead up to a single attachment point that bears the weight of whatever hull/body is on top and ya ......weird things start to happen. I had one chicken leg walker that would stretch the suspension over a block width from where it was mounted and then the friction pads on the feet would somehow turn into ice skates. could have been a cool concept if it didnt spaz out and become airborne shortly after
 
#9
If they are relatively simple machines you won't really notice this until you get into heavy articulation or machines with a lot of weight or other force being applied.
 
Top