Solving the Android Game Engine Synchronization Problem — FPS, UPS, and Refresh Rate

Joseph Rubin
5 min readAug 23, 2018

He shrugged off the heavy blanket to reveal a knapsack underneath.

Inside were his only possessions: a knife with a rusty, jagged blade, and a small necklace with a teardrop-shaped pendant. The pendant was his gift from Senroi day, but it was such a useless artifact that he didn’t know why he bothered to carry it around.

Still, there was something mystifying about the crystal-blue teardrop, a stark contrast with the soulless dagger that would be his only defense in the coming quest.

In this article, we’ll go into more detail about what we discussed last time.

The main task of our game engine is to provide an update loop and a render loop for the developer.

Abstractly, update() changes the state of the game entities, and render() visualizes that state to the screen. In terms of a Model/View/Controller architecture, this means that the game developer constructs the new model consisting of all of the game entities in update(), and then in render() reads the values from the model and projects them to a view. In this way, update() acts as the controller by turning the previous model into a new one in order to progress through the game.

This sounds somewhat simple, but there’s a bit more to it.

We actually have three different types of events that must be juggled in order to make the game appear smooth:

--

--