ME FIRST GAMES
Menu
games for me and you
![]() 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. |
Me First Games is an independent game studio dedicated to creating unique and bizarre video games.
Red MatterStar Impact is an upcoming adventure platformer coming to PC, Mac, and Linux.
Archives
April 2021
Categories |
Copyright (c) 2020 Me First LLC
|