Vizzy is a visual programming system that you can use to automate your craft to execute a wide variety of flight-oriented tasks. The easiest way to get started is to watch the tutorial video here:

Programs

You can create a program for your craft by opening the menu and clicking EDIT PROGRAM. This will attach the program to your craft's primary command pod however, you can attach programs to any part in your craft. This can be done by clicking on a part and then opening the Tinker Panel and clicking the "Add Flight Program" button.

Instructions

Instructions have square corners and are connected in a sequence. They are executed one after another and many have slots where you can type in parameters or where you can drop expression blocks.

Expressions

Expressions return a value. Expressions with angled edges return a boolean (true or false) and expressions with curved corners return a string, number, vector, or list. An expression is only evaluated when it is inside the parameter slot of an instruction that is executing.

If an expression returns a value of a type that does not match the expected type of the parameter slot it is in, then the value will be automatically converted to the correct type. If Vizzy cannot figure out how to convert a value, it will use a default value. For example, if an expression returns a string and the parameter slot is expecting a number, then the string will be converted to a number. If the string cannot be converted to a number, then a default value of 0 will be used.

Events

Events are orange blocks that initiate execution at the appropriate time and are the starting point for a series of instructions. The most common event is the On Start event, which is where programs typically start.

Variables

Variables allow you to store a value that can be retrieved and processed later.

Custom Instructions and Expressions

You can create your own instructions and expressions in Vizzy. This is very similar to writing functions in other programming languages.

Program Execution

When a program starts, it checks to see if there are any On Start event blocks in the program and if there are it will create a new (artificial) thread to start executing the attached instructions, one at a time. Before executing an instruction, it will first evaluate all expression blocks inserted into the parameter slots of the instruction to determine the values to be used to execute the instruction.

If the craft encounters another event that has a corresponding event block in the program then it will create a new thread to execute the instructions attached to that event block. A program can have multiple threads running at once, however these threads are not true background threads and they all run on the game's main thread. To simulate simultaneous execution of threads, the game will alternate between threads each game frame. The program will execute at most 25 instructions per game frame. This number can be configured by XML-modifying the FlightProgram modifier's maxInstructionsPerFrame attribute. There is no limit to the number of expressions that can be evaluated in a single frame.

It is advised to place a Wait 0 Seconds at the end of loops as it is often a good place for a thread to pause execution for that game frame and give a chance to other threads in the program to execute.

Funk

The new FUNK expression was introduced in version 0.9.700. It parses and evaluates a text-based expression and returns the result as a number.

There are several properties that are accessible from the FUNK expression, but these are not yet finalized as version 0.9.700 is still in beta.

You can find more information about the FUNK expression here.


17 Comments

  • Log in to leave a comment
  • Profile image

    @seventeen it is a career mode not a SR2 copy

    +1 22 hours ago
  • Profile image

    @Infinite17 cool

    +1 2 days ago
  • Profile image
    11.7k seventeen

    @FalconAerospaceFAS hahaha yeah Gozinya is working on it

    +1 2 days ago
  • Profile image

    Will vizzy os on mfd come in future? I can't wait to play sr2 inside sr2 on mfd ;)

    +1 3 days ago
  • Profile image

    Click on the link on the bottom of the post and scroll down tho the bottom of that page. There it describes how to get the properties of a part, including RPM for wheels. @BeamerBoy
    What I gathered from that is, you select a specific part in the PartSelector section of the expression by giving it the ‚exact part name‘ (you seem to be able to change this in the xml, as shown in the top of the page linked on the bottom of the linked page). The ModifierSelector specifies what part it is, based on its id. The Data part of the expression seems to specify where the numbers of the expression come from, refer to the table linked in the link form the post. The PropertySelector tells the expression what property of a part to get, again please refer to the table.
    As an example, you can get the value of a variable in a vizzy program by using: [name of part executing program].FlightProgram.[name of variable]; or a more more specific example: CockpitTest.FlightProgram.TimeToImpact
    These are just my thoughts and could be totally wrong. If someone with actual knowledge could correct me it would be appreciated.

    +1 5 days ago
  • Profile image

    @Kleesmilie how exactly could i read a wheel’s rpm in vizzy?

    5 days ago
  • Profile image

    @La1pista Anti-Lock Braking system stops wheels on a car from locking up and sliding while braking an Traction Control System prevents the powered wheels from Wheel-Spinning while under acceleration

    5 days ago
  • Profile image

    @BeamerBoy what is ABS and TCS?

    5 days ago
  • Profile image

    @Kleesmilie how can i do that?

    5 days ago
  • Profile image

    holllld up what

    8 days ago
  • Profile image

    Now you can read the rpm of a wheel, which is necessary for such systems. @BeamerBoy

    +1 10 days ago
  • Profile image

    @Kleesmilie omg, i was thinking about how cool it would be to program ABS and TCS. I thought it would be impossible. But you say it is?

    +1 10 days ago
  • Profile image

    Finally able to make ABS and TCS happen.

    10 days ago
  • Profile image
    4,687 Hannah1212

    That was a very useful explanation of how threads work, I didn’t know that before.

    12 days ago
  • Profile image
    11.7k seventeen

    no

    13 days ago
  • Profile image
    19.1k Rafaele

    preparing for incoming april fools o-o

    13 days ago
  • Profile image

    Hey @AndrewGarrison hi sorry for pinging but i have a suggestion to add Water and Dust particles when landing or launching and don't let it be too detailed for low performance devices

    +1 14 days ago

33 Upvotes

Log in in to upvote this post.
0 MAxoid
619 MercerAerospace
19.1k Rafaele
653 MisatoKATsuragi
Mod SupremeDorian
3,925 Thebapi
391 YaMomzBox420
11.7k seventeen
3,371 Elgaagung
2,743 DragonTech
4,687 Hannah1212
942 PointBreak
5,452 Vedhaspace
14.5k Rizkyman
129 Remedy31
4,144 ChuckSooyaaa
40.9k InfinityTechnology
5,093 SmurfResearchX
4,808 ahmad183
538 Kleesmilie
294 zeropol
5,600 iAEROSPACE
31.4k DASX
165 SpaceXindustry
6,608 Yoon
120 NACA
1,156 DARO
590 Ardee
195 Astrospace
4,252 FalconAerospaceFAS
Dev pedro16797
60 Brixxter
1,266 CaveatEmperor