Multimedia
  Home arrow Multimedia arrow Animation in OpenGL for Game Programming using SDL
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
MULTIMEDIA

Animation in OpenGL for Game Programming using SDL
By: A.P.Rajshekhar
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 10
    2007-08-28


    Table of Contents:
  • Animation in OpenGL for Game Programming using SDL
  • The Basics Continued: Coordinate Spaces
  • Animation APIs in OpenGL
  • Animation: a Basic Example

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Animation in OpenGL for Game Programming using SDL
    ( Page 1 of 4 )

    Animation is the backbone of immersive experience in any game. This applies to both 2-D and 3-D games without exception. Hence, in order to create a seamless and immersive game environment, one must first understand the whys and wherefores of animation. One of the advantages that OpenGL has over other graphics and gaming toolkits is that in OpenGL, animation APIs are not low-level.

    In other words, the APIs of OpenGL follow the nomenclature of trigonometry and motion used by physics and mathematics. It also means having a good base in math (especially co-ordinate geometry and trigonometry) and physics is also a requirement.

    Therefore, in this discussion the first two sections will focus on the basic coordinate geometry essential for understanding animation APIs. In the third section, I will focus on the core APIs and techniques for animation and the four section will be used to demonstrate the basic animation in action. These are the issues to be discussed in this article.

    2D/3D Prerequisites: the Basics

    The basis of animation is performing either rotation or translation without stopping. In other words if either rotation or translation is done continuously, the resulting effect is animation. But before going into details of these operations, let me give you a quick overview of common terminology and concepts used in co-ordinate geometry. The most common terminology and concepts in 2-D as well as 3-D are:

    • Origin
    • Axes 
    • Coordinate Spaces
    • Transformations

    Of these, the first three are the founding concepts of 2-D/3-D whereas the fourth is the basis of all the operations in 2 as well as 3-D effects. Let's have a look at them.

    Origin is the center of the coordinate system in every Cartesian coordinate space. This is true for both 2-D as well as 3-D. It is a special location. If the coordinate space is thought to be a city with square boundaries, then the origin would be the center of the city.

    As for axes, every 2-D Cartesian space has two straight lines that pass through the origin. Each line is known as axis and extends indefinitely in opposite directions. Both of them are opposite to each other. These two axes are named the x-axis (the horizontal axis) and the y-axis (the vertical axis).

    When the coordinate system is extended to 3-D space, then a third axis comes into the picture, named the z-axis. One thing to keep in mind is that in 3-D space, a plane can be defined by a pair of axes. For example the plane defined by x-axis and y-axis is the xy-plane;  it is perpendicular to the z-axis. Pictorially it looks like this:

    The positive and negative position of an axis is based on the coordinate system, which I will be describing next. 



     
     
    >>> More Multimedia Articles          >>> More By A.P.Rajshekhar
     

       

    MULTIMEDIA ARTICLES

    - Basic Lighting in OpenGL and SDL Game Progra...
    - Working with Colors in OpenGL for Game Progr...
    - Animation in OpenGL for Game Programming usi...
    - Game Programming with SDL: Getting Started w...
    - Using OpenGL with SDL for Game Programming
    - Learning Sound for Game Programming using SDL
    - Game Programming using SDL: Raw Graphics and...
    - Game Programming using SDL: Getting Started
    - Network Radio With Icecast
    - Learning To SMILe





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek