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,417 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.

    10 months ago
  • Profile image
    2,734 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

    10 months ago
  • Profile image
    283 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?

    10 months ago
  • Profile image

    @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 10 months ago
  • Profile image

    @AstronautPlanes Ok🤙

    10 months ago
  • Profile image

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

    +1 10 months ago
  • Profile image

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

    10 months ago
  • Profile image

    French please

    10 months ago
  • Profile image

    @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

    10 months ago
  • Profile image
    1,417 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.

    10 months ago
  • Profile image
    570 GDAAI

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

    +2 10 months ago
  • Profile image

    Woot

    +1 10 months 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 10 months ago
  • Profile image

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

    +1 10 months ago
  • Profile image
    5,334 SelectAKey

    sweet!

    10 months ago
  • Profile image

    @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 10 months ago
  • Profile image

    Add time warp control to Vizzy :) @AndrewGarrison

    +1 10 months 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.

    10 months ago
  • Profile image
    6 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! :)

    10 months ago
  • Profile image

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

    10 months ago
  • Profile image

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

    +2 11 months 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 11 months ago
  • Profile image

    Closest approach to target would be epic too and an option to change target to a planet, a craft or a launch location, that could make self landing rockets aiming for a landing pad a thing, and even programs to make automatic transfers and approaches

    +1 11 months ago
  • Profile image

    @AndrewGarrison and about the trial and error for automatic launch and target approach with orbital parameters for active craft and target it may be possible to make a general code

    +1 11 months ago
  • Profile image
    2,431 SNSA

    @AndrewGarrison oh ok...

    11 months ago
  • Log in to see more comments

63 Upvotes

Log in in to upvote this post.