I've been working on the Automated Flight Planner task for a couple of weeks now. I started the project with the intention of making a simple flight planner with a set of instructions that would be executed one-by-one until finished. That quickly grew into much bigger plans for a visual programming system with support for loops, conditions, and variables. Now, the more accurate name for this would be a Visual Programming System for Flight Automation, which I have nicknamed Vizzy. I've also held onto the original inspiration for simplicity so that players that don't want to assemble a complete program can simply snap blocks together to make a simple flight plan. However, advanced players can take advantage of the additional complexity to create very complicated programs.

Here's a snapshot of a prototype of "Vizzy" the visual programming system I'm working on. Obviously, highly influenced by Scratch, Snap! and Turtles:

I've still got quite a bit of work to do, but with any luck, this will make it in the next update. We'll see.

Edit: Here are some of the instructions, properties, etc I have in mind. Do you have any suggestions?

Craft Properties

  • AltitudeAboveGroundLevel
  • AltitudeAboveSeaLevel
  • OrbitalVelocity
  • SurfaceVelocity
  • CurrentEngineThrust
  • CurrentMass
  • MaxActiveEngineThrust
  • RemainingBattery
  • RemainingFuelInStage
  • RemainingMonopropellant
  • InContactWithPlanet
  • SolarRadiationIntensity

Inputs

  • Brake
  • Yaw
  • Pitch
  • Roll
  • Slider1
  • Slider2
  • Throttle
  • TranslateForward
  • TranslateRight
  • TranslateUp

Instructions

  • Set Input to {x}
  • Lock Heading to {Angle}
  • Lock Pitch to {Angle}
  • Lock Prograde, Retrograde, Target
  • Wait for {x} seconds
  • Wait until <condition>
  • Repeat {x} times
  • Activate Next Stage
  • Enable Activation Group {x}
  • Disable Activation Group {x}
  • Toggle Activation Group {x}
  • Show Message {text}

Basic Operators and Functions

  • Boolean operators: AND, OR, NOT, XOR
  • Numeric operators: +, -, *, /
  • Comparison Operators: <, >, =
  • Math functions: Abs, Floor, Ceiling, Sqrt, Sin, Cos, Tan, Acos, Asin, Atan

Comments

  • Log in to leave a comment
  • Profile image
    1,732 neodynamic

    @KellyNyanbinary I know. But Vizzy looks nothing like it.

    3.4 years ago
  • Profile image

    Turtle is a programming language @NebulaX

    3.4 years ago
  • Profile image
    1,732 neodynamic

    How does this have anything to do with Turtle?

    3.4 years ago
  • Profile image
    14.2k CardZlol

    @pedro16797 it would be amazing. Maybe even, just load the physics and colisions (no textures) to make it land. If this already happens, im totally learning how to use Vizzy.

    5.1 years ago
  • Profile image
    3,143 speediplayz

    It would be nice to be able to make instances of a certain part such as a piston or a landing leg, then access its properties to extend or contract, or with rotors/hinges set their angles/properties to certain values

    5.1 years ago
  • Profile image
    320 imadium

    can we have Angle-of-attack available to vizzy so that we can program automated gravity turn maneuver? or at least lift forces over the rocket?

    5.1 years ago
  • Profile image
    21.4k Rafaele

    @SupremeDorian Soory, but people need to understand that some things won't be added right now, they could just put suggestions, but not comment it in a random dev post.
    __
    I'm just saying that this game is in early dev, so these things will not be putted right now.

    +1 5.1 years ago
  • Profile image
    1,132 OswaldRelax

    @AstronautPlanes Ok🤙

    5.1 years ago
  • Profile image

    @AstronautPlanes dude he's just asking for a french option in-game

    +1 5.1 years ago
  • Profile image
    21.4k Rafaele

    @OswaldFunky SR2 is a game in early development, so there are some things that will NOT be introduced on the next update.


    For example, KSP has almost a decade of development so they have languajes, but this game is still in development.

    5.1 years ago
  • Profile image
    1,132 OswaldRelax

    French please

    5.1 years ago
  • Profile image
    Dev Pedro

    @CardZlol the main problem is that the craft won't be rendered if it gets too far, I hope they will let us force the rendering of the two crafts through the code

    5.1 years ago
  • Profile image
    14.2k CardZlol

    Would Vizzy still work if im not currently using That craft?
    Like, i make lets say a automatic landing script to the booster. When the booster separates, would Vizzy still work if im currently on the second stage?
    It would make for some cool automatic landings, maybe even a FH double landing.

    5.1 years ago
  • Profile image
    585 GDAAI

    You should add a function to cancel velocity relative to target at closest approach

    +2 5.1 years ago
  • Profile image

    Woot

    +1 5.1 years ago
  • Profile image

    Not sure if this’ll be too easy for players, but getting this to work around maneuver nodes so as to do a lunar transfer or target the launch pad so one stage of the craft could return to earth spacex style would make this 100x better. That way players wouldn’t have to multitask, and would be able to consistently get a lunar encounter or even a interplanetary encounter without input. The real challenge of that would be the programming itself, but looking at all the current functions a wait until <condition> Instruction specifies the craft’s properties and not necessarily where it is relative to planets. Even the Apollo space program used computers to program the maneuvers; the people at NASA had to do the calculations and input them into the flight computers.

    +2 5.1 years ago
  • Profile image
    26.8k Nicole412

    I hope i can do some really unstable fly by wire planes ;)

    +1 5.1 years ago
  • Profile image
    5,769 SelectAKey

    sweet!

    5.1 years ago
  • Profile image
    Dev Pedro

    @AndrewGarrison go to 1x, if you disable Vizzy under time warp and you let Vizzy increase it then it won't be able to exit it.
    Another benefit of going 1x is that you can automatically exit time warp under certain events

    +1 5.1 years ago
  • Profile image

    Add time warp control to Vizzy :) @AndrewGarrison

    +1 5.1 years ago
  • Profile image

    @pedro16797 That brings up an interesting problem. How should Vizzy handle instructions that require non-time-warp modes, such as activating a stage? I think there are two options: 1) Vizzy should exit time-warp to 1x speed to activate the stage. 2) Vizzy should be disabled during time-warp.

    5.1 years ago
  • Profile image
    8 yopo

    @AndrewGarrison This is amazing! Keep up the great work, and thanks so much for going the extra mile to make a functional visual-programming system, that's difficult to code! :)

    5.1 years ago
  • Profile image
    Dev Pedro

    @AndrewGarrison it would be really nice to have access to warp time from vizzy

    5.1 years ago
  • Profile image
    Dev Pedro

    @AndrewGarrison great! I pity you, this is getting huge so fast hahahaha

    +2 5.1 years ago
  • Profile image

    @pedro16797 I added some additional stuff to the main post. I do plan to include basic math functions and operators. Part interaction is definitely something I would like to consider. Good ideas, thanks!

    +1 5.1 years ago
  • Log in to see more comments

63 Upvotes

Log in in to upvote this post.