Game Loop Frame Rate.

Slides:



Advertisements
Similar presentations
Introduction to Macromedia Director 8.5 – Lingo
Advertisements

Categories of I/O Devices
Computer-Based Animation. ● To animate something – to bring it to life ● Animation covers all changes that have visual effects – Positon (motion dynamic)
BASIC CONCEPS OF ANIMATION The presentation source: Department of Educational Multimedia Faculty of Education, UTM MPT 1383: VIDEO AND ANIMATION TECHNOLOGY.
Multimedia Enabling Software. The Human Perceptual System Since the multimedia systems are intended to be used by human, it is a pragmatic approach to.
SE320: Introduction to Computer Games Week 8: Game Programming Gazihan Alankus.
 Refers to sampling the gray/color level in the picture at MXN (M number of rows and N number of columns )array of points.  Once points are sampled,
Object Oriented Analysis & Design SDL Threads. Contents 2  Processes  Thread Concepts  Creating threads  Critical sections  Synchronizing threads.
Spring /6.831 User Interface Design and Implementation1 Lecture 24: Animation HW2 out, due next Sunday look for your evaluation assignment on.
Reference: The Game Loop Animation / Game loop 1. Update variables 2. [Get input from the user] (GameLoop only) 3. Draw (using variables)
“ Animation Through the Ages” Camelia McCallion. Main tasks What is computer animation? Hand drawn (cel) Flick books Animated cartoon Animation process.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Folder Organisation Unit 31 Computer Animation
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Oman College of Management and Technology Course – MM Topic 7 Production and Distribution of Multimedia Titles CS/MIS Department.
GAM666 – Introduction To Game Programming ● DirectDraw, the 2D component of DirectX, uses the term “surface” to mean an area of memory in which pixel data.
Lecture 5: 11/5/1435 Computer Animation Lecturer/ Kawther Abas CS- 375 Graphics and Human Computer Interaction.
Fall UI Design and Implementation1 Lecture 13: Animation.
Multimedia. A medium (plural media) is something that a presenter can use for presentation of information Two basic ways to present information are: –Unimedium.
Output THE BASICS. What is Output? Output is the information that comes FROM a computer OUT to a user Sometimes this information is feedback to an action.
Chapter 1: Introduction to the Personal Computer
CPT 450 Computer Graphics 12th Lecture – Animation.
What is Computer Graphics?
3.02 Explain basic motion graphic programming.
3.02 Explain basic motion graphic programming.
Animation Frame Animation.
Animation Through The Ages
Activity 1 6 minutes Research Activity: What is RAM? What is ROM?
Requirements Spec Revisited
Animations.
3.02 Explain basic motion graphic programming.
GIF or Not GIF? Use GIF for animation:
Scientific Visualization V106.04
Lecture 8: Graphics By: Eliav Menachi.
Repetition Structures Chapter 9
Game Loops + Part II Reference:
“Animation Through the Ages”
Introduction to Animation
Web Programming– UFCFB Lecture 8
Artificial Intelligence Lecture No. 5
Computer Organization
Introduction to Computing
Instructor Materials Chapter 1: Introduction to the Personal Computer
Scientific Visualization I – Unit 6
Guilford County SciVis V106.04
2.02B Methods and Uses of Animation
Designing and Debugging Batch and Interactive COBOL Programs
Unit# 9: Computer Program Development
Test Driven Development
3.02 Explain basic motion graphic programming.
Common computer terminology
Fundamentals of Programming
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Cannon Game App Android How to Program
3.02 Explain basic motion graphic programming.
AN INTRODUCTION TO COMPUTER GRAPHICS Subject: Computer Graphics Lecture No: 01 Batch: 16BS(Information Technology)
Game Loop Update & Draw.
(c) 2002 University of Wisconsin
Computer Animation Displaying animation sequences raster animation
Web Programming– UFCFB Lecture 8
Current Research in VR Display Technology
- CHAPTER 2 – Hardware.
Lecture 8: Graphics By: Eliav Menachi.
The Advancement of Game Device
Chapter 1: introduction to multimedia
GIF or Not GIF? Use GIF for animation:
3.02 Explain basic motion graphic programming.
ECE 352 Digital System Fundamentals
Animation Techniques.
Animation Translation.
Presentation transcript:

Game Loop Frame Rate

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

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

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

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 0.016 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.