So what to start with...
I was making a new plane and as far as I don't really like SimplePlanes vanilla jet engines I decided to make my own custom one.
It all started with a bunch of fuselages and some cosmetic things:
Then I decided to add some movement and add custom flaps. 45 custom flaps that was 3 parts each. 135 parts in total.
And that's where our journey begins.
After placing three of them:
I was already bored. fourty two more to go. So I decided to forget about workability for a moment and place them inaccurate way.
After adding some I decided to test if that works and the result was...
Funny.
But not satisfying.
Finally, i placed all of the flaps, but they were not connected to anything at all, so when you load it just felt to the ground.
And oh God I WAS NOT GOING TO CONNECT 135 PARTS MANUALLY.
So I thought it's time to connect my love to programming and my love to the SimplePlanes.
So I loaded up the visual Studio and started searching for information on how to read .xml files using C#.
As far as I had experience with DOM at my college JS classes it was pretty easy to understand the structure of an XML document.
The first thing was the list of all the rotators and their ID's. Flaps has to move, remember?
Then just making it XML-readable:
And copypasting it to an .xml document of an engine.
And that's where the hard things began to destroy me from the inside.
You see, you can't just connect parts with the closest ID, you have to measure the distances between ALL of the parts and connect them to each other. So just a little bit of trigonoometry and distance measuring between the small piston (red) and an engine flap (green)
And we've got a list of all of the flaps and their IDs, the distance to the closest piston and an ID of the closest piston:
Then making it XML readable again:
And copypasting it to an XML document.
And doing the same with a flap and a closest rotator.
Aaaaaand.
BEHOLD: SOLVING PROBLEMS SMART WAY: THE GIF(tm).
@ForeverPie just a bit maybe.
But it gave me experience and a knowledge and a powerful tool and each of them i'm already using to solve problems with complicated connections.
You gotta wonder if this took more time than connecting 135 parts manually
Yeah this is big brain time
:O
When you need to manually connect 135 parts but you hit it up with your programming skills instead
My goals are beyond your understanding
Awesome, smart solutions to problems.
Can't wait for it to be done! Tag me on it!
Awesome! I cant wait to see it
@BeryllCorp it's only 163 parts total so far.
RIP part count. Lol
.
Good job tho!
@RedVine it's fine
Guys, sorry for poor English. It's not my first language, as you can see from this post.
modern problems require modern solutions