ME FIRST GAMES
Menu

games for me and you

What is Control Flow?

9/3/2020

0 Comments

 
Picture
The Control Flow of a program is the order in which the program's code executes.
As a competent programmer, you NEED to understand where you are in the Control Flow and where it can lead you.

📌 By default, your program will execute instructions in a linear order, executing each line of code after the next.
📌 This linear flow can be broken up using conditional statements and function calls.
📌 It's easy to represent the Control Flow of your program using a graph.
📌 If using GCC, you can use tools like Trucov to print the Control Flow of your program.
📌 The If-Statement and Switch-Statement will cause your Control Flow to branch.
📌 Loops will cause your Control Flow to go back to a previous node.
📌 Function calls will jump to an entirely separate part of your control flow.
✅ When you are writing lines of code, you are defining the Control Flow of your program.
✅ Where it can branch, loop, jump, break; essentially what it can do and where it can go.
✅ The cool thing about the Control Flow is that you don't have to understand the entire graph at once.
✅ The graph can be broken up or "encapsulated" into a single section.
✅ This makes it easier for us to understand; that's why we separate code into different functions and classes.
🎮 In Unity, you can think of the entire Control Flow as a huge massive graph.
🎮 But we only need to worry about the Control Flow in our own MonoBehaviors. ➡️ Follow @mefirstgames for more game dev tips.
➡️ Free Unity Tools: https://www.mefirstgames.com/hierarchy-comments.html 

0 Comments



Leave a Reply.

    Picture
    Me First Games is an independent game studio dedicated to creating unique and bizarre video games.
    GAMES HERE

    Red Matter

    Star Impact is an upcoming adventure platformer coming to PC, Mac, and Linux.

    Archives

    April 2021
    February 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    June 2020
    May 2020
    April 2019
    March 2019
    December 2018
    April 2018

    Categories

    All

    RSS Feed

Copyright (c) 2020 Me First LLC
  • STU the First AI
  • Blog
  • Contact
  • Unity Tools
    • Hierarchy Comments
  • STU the First AI
  • Blog
  • Contact
  • Unity Tools
    • Hierarchy Comments