11 August 2009 ~ 23 Comments

PyGame – Event Handling

PyGame – Event Handling

Introduction
To continue further into my PyGame exploration articles and tutorials,  I’ll try to come up with a complete Shmup game as example. I already covered Animated sprites and Parallax Scrolling in 2D games as a start you can look at the PyGame tutorials list page to see them all.
The goal of this article is [...]

Continue Reading

08 August 2009 ~ 5 Comments

PyGame – Parallax Scrolling in 2D games

PyGame – Parallax Scrolling in 2D games

Hi fellow reader, to start this article let me define what Parallax Scrolling is :
Parallax scrolling is a special scrolling technique in computer graphics, seen first in the 1982 arcade game Moon Patrol. In this pseudo-3D technique, background images move by the “camera” slower than foreground images, creating an illusion of depth in a 2D [...]

Continue Reading

22 July 2009 ~ 5 Comments

PyGame and Animated Sprites – Take 2

PyGame and Animated Sprites – Take 2

I made a demo to better illustrate the topic covered in my previous post : PyGame and Animated Sprites
Here’s a screenshot of the application :

Download the Source code of the demo :
explosion-spritetar.tar.gz

Continue Reading

21 July 2009 ~ 2 Comments

PyGame and Animated Sprites

An animated sprite is a serie of the same image slightly modified and displayed at a certain framerate per second.

Sample 5 frames Sprite representation:
—————————————–
|   1   |   2   |   3   |   4   |   5  |
| 16×16 | 16×16 | 16×16 | 16×16 | 16×16 |
|       |       |       |       |      |
—————————————–
For a  given framerate set [...]

Continue Reading