This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
In Unity game development, there is a function called Update(). It runs once every frame. This changes the way we program alot. Somethings like inputs must be taken into account every frame. Then we also have to thing about not overloading the Update() function such that too much heavy code is running each frame
Even the way for loops work are different. In "normal" programming, we think of for-loops being the most "live" part of the code. And anything before the loop only affects it one time per entire run of the loop
When we put a for-loop in the Update function, it's like having another for-loop that contains the original for-loop - but the outer for-loop changes variables much faster (each frame) and is far more unpredictable.
What are other fields of programming that have a similar style of coding where each frame is important? And what are some of the things to keep in mind?
Subreddit
Post Details
- Posted
- 5 months ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/AskProgramm...