Multimedia
  Home arrow Multimedia arrow Game Programming using SDL: Raw Graphics and Event Handling
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? 
MULTIMEDIA

Game Programming using SDL: Raw Graphics and Event Handling
By: A.P.Rajshekhar
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 5
    2007-02-05


    Table of Contents:
  • Game Programming using SDL: Raw Graphics and Event Handling
  • Raw Graphics: Writing Directly onto the Display
  • Putting the Functions to Use
  • Handling the Keyboard the SDL Way

  • 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


    Game Programming using SDL: Raw Graphics and Event Handling
    ( Page 1 of 4 )

    If you have found yourself struggling with pixel-level graphics and/or user input for your games, this is the article for you. You will learn how to handle these tasks using SDL. This is the second part of a series on game programming with SDL.

    Graphics and handling user inputs -- the combination that creates the symphony we call a game. A game world where these two are out of phase ends in cacophony.

    In the previous article I discussed the various parameters that go into creating a screen and loading bitmapped images onto the screen. That was pretty high-level as the work was done on structures that represent the actual screen and maps or sprites. But there are times when one has to get his or her hands dirty by working directly upon pixels.

    The creators of SDL had already anticipated this requirement and built the capacities to work at the raw graphics level into the core itself. Thus a developer is redeemed from understanding system, platform and architecture specific nitty-gritty about manipulating the pixels. The other aspect of gaming that gives sleepless nights to developers is handling the user input, as the handling of input devices changes from system to system. To remove this burden from the minds of the developers, SDL provides an object-oriented approach to handling the events.

    In this article, I will be discussing these two aspects of SDL. In the next two sections, the discussion will focus on pixel manipulation functions and their usages. The final section will focus on input handling. So now that the agenda for this article have been laid out, let's get started.



     
     
    >>> 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 4 hosted by Hostway
    Stay green...Green IT