Blog Archives

How to get image dimensions in Python

Thanks to Pygame, there’s a quick and easy method to get the dimensions of an image. You just have to load it into a Surface and use the Surface methods get_height() and get_width().

Tagged with: , ,
Posted in Coding

Book: Python Phrasebook

Got this little book shortly after I started learning Python. The first book I bought was specific to game programming, and skimmed over the basics of the language a little too much. Rather than try to be a “bible” type

Tagged with: , , ,
Posted in Reviews

Book: Beginning Game Development with Python and Pygame

This is the first book I bought when I needed to learn Python.  I’ve always found it easier to learn a language against the backdrop of a game. Since this was the first experience with Python, I spent quite a

Tagged with: , , ,
Posted in Reviews

Scrolling Background in Python

This is a follow up to an earlier post where we created a scrolling background in Flash using ActionScript. This time we’re going to do the same thing, but using Python and Pygame. The Logic This animation is what we’re

Tagged with: , , ,
Posted in Coding

Distance formulas

It’s a pretty common task to get the distance between 2 points. Maybe you’re wanting to see if two points are close enough to have collided. Maybe you’re making a golf game and the closer the ball is to the

Tagged with: , , , , ,
Posted in Math