Presentation is loading. Please wait.

Presentation is loading. Please wait.

Game Loop Frame Rate.

Similar presentations


Presentation on theme: "Game Loop Frame Rate."— Presentation transcript:

1 Game Loop Frame Rate

2 Introduction Nearly every video game you have played implements what we call a Game Loop It is what drives the game and keeps it going until you decide to stop playing. Often times this Game Loop is repurposed for other uses, such as digital animation. In fact, the concept of the Game Loop was borrowed from traditional animation techniques

3 Traditional Animation
This is animation achieved through the display of images in a sequence that are slightly different than the previous image. Basically it follows a very simple process that is repeated: Draw an image (slightly different than the previous image) Display that image Terminology: Each image is a single frame of animation Traditional animation for TV and movies will loop through (repeat) this process 24 times per second. A speed that will convince our brain that what we are seeing is actually moving

4 Frame Rate The frame rate is the speed at which the sequence of images (frames) are displayed on the screen, or how fast the process repeats itself. We measure this speed using the term frames per second or FPS for you gamers out there Different mediums can and will run at different speeds to achieve different results. Traditional Animation and TV/Movies: 24 FPS Modern Video Games: 60 FPS (hopefully) Virtual Reality Devices (Oculus Rift, HTC Vive, etc.): 90FPS The general rule is this, the higher the frame rate the more smooth the result will look. But yes, there is an upper limit that our brain can see. The currently accepted peak is approximately 150 FPS

5 Back to the Game Loop As mentioned before, the Game Loop was derived from the traditional animation strategy and looks something like this: Update all game elements Draw the game screen These two operations are repeated (looped) until we are done playing. A few things to note: Many games will not allow the operations to occur unless enough time has passed to ensure a desired frame rate. For example to achieve 60 FPS, that means the game will wait for seconds (16 milliseconds) to pass before the next Update and Draw will occur. This is to ensure a smooth and consistent gaming experience Some games will only lock the drawing to the frame rate. This is because drawing is the most expensive operation and in something like fighting games, you cannot afford to miss an input from a user.


Download ppt "Game Loop Frame Rate."

Similar presentations


Ads by Google