top of page
Writer's pictureDavid Flores

The Update Method

Updated: Jan 21, 2019

In most game engines, there is a master game loop that runs every frame. A key part of this loop is the Update Method, which, as its name suggests, updates everything every frame. As a side project, we decided to implement our own Update Method. In the below animation, everything is being run using our own custom Update Method instead of Unity's built-in version.

Updating
Look at all those things updating.

Now, you may be wondering why we implemented our own Update Method when Unity already has one built-in that works just fine. Well, why not?


Other than being intentionally slowed down for demonstration purposes, the only differences between our version and Unity's is that ours doesn't have proper and complete handling for objects being disabled or going to sleep. Maybe in a future update...


The Update Method is a deceptively simple pattern. Though easy to initially implement, there are a number of minor intricacies that have to be understood and properly handled to get it working just right. To learn more, I'd suggest reading this chapter, which is what we referenced when designing our Update Method.

 

Fun fact of the day:

A game engine's master game loop is basically just a while(true) loop.


20 views0 comments

コメント


bottom of page