Profile image

Solving problems: the smart way.

2,436 RedVine  4.9 years ago

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).

  • Log in to leave a comment
  • Profile image
    2,436 RedVine

    @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.

    4.9 years ago
  • Profile image
    101k Wallaby

    You gotta wonder if this took more time than connecting 135 parts manually

    4.9 years ago
  • Profile image
    28.0k Armyguy1534

    Yeah this is big brain time

    4.9 years ago
  • Profile image

    :O

    4.9 years ago
  • Profile image
    13.1k CruzerBlade

    When you need to manually connect 135 parts but you hit it up with your programming skills instead

    My goals are beyond your understanding

    +2 4.9 years ago
  • Profile image
    67.1k SnoWFLakE0s

    Awesome, smart solutions to problems.

    +1 4.9 years ago
  • Profile image
    9,275 UraniumOxide

    Can't wait for it to be done! Tag me on it!

    4.9 years ago
  • Profile image
    32.3k CRJ900Pilot

    Awesome! I cant wait to see it

    4.9 years ago
  • Profile image
    2,436 RedVine

    @BeryllCorp it's only 163 parts total so far.

    4.9 years ago
  • Profile image
    8,632 BeryllCorp

    RIP part count. Lol
    .
    Good job tho!

    4.9 years ago
  • Profile image
    3,391 PhoenixZeMan

    @RedVine it's fine

    4.9 years ago
  • Profile image
    2,436 RedVine

    Guys, sorry for poor English. It's not my first language, as you can see from this post.

    4.9 years ago
  • Profile image
    3,391 PhoenixZeMan

    modern problems require modern solutions

    +5 4.9 years ago