Home arrow Multimedia arrow Game Programming using SDL: Raw Graphics and Event Handling

Game Programming using SDL: Raw Graphics and Event Handling

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.

TABLE OF CONTENTS:
  1. Game Programming using SDL: Raw Graphics and Event Handling
  2. Raw Graphics: Writing Directly onto the Display
  3. Putting the Functions to Use
  4. Handling the Keyboard the SDL Way
By: A.P.Rajshekhar
Rating: starstarstarstarstar / 7
February 05, 2007

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

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
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

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

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: