Topics › Pygame


Image Processing with Pygame

Tutorial for how image processing works, using Pygame (and Numpy) as an example.

Pygame particle simulation in 3D

Below is a video of my first attempt to move my Pygame particle simulation into the third dimension (thus combining it with my Pygame 3D tutorial). I meant to write about it a while ago, but got distracted trying to work out how to display an image rotated in three dimension (for the walls). I still haven't worked it out.

Cell evolution game - basic interface

Today I started to make a game that I've been thinking about for a quite a while now (I mention it here). The general idea is that you play as a single-celled microbe which evolves ever more complex metabolic and regulatory systems as it moves to ever more challenging environments.

Pygame Landscape generator

Today I came across this page, which contain many interesting things, including some sections on generating landscapes in a procedural way. I'd been meaning to try this for a while and I finally got around to it.

Sex in Sugarscape

Since the last time I wrote about Sugarscape, I've made a bit of progress. The biggest improvement is the introduction of sexual reproduction. I can therefore recapitulate more of the results of the original simulation, and test a number evolutionary ideas.


Pygame 3D Graphics Tutorial

An introduction into how to create 3D graphics using Python and Pygame.

Pygame 3D wireframe viewer

I've been thinking about moving some of my simulations into the third (spatial) dimension for a while now. Actually creating a 3D simulation is relatively easy, it's just a matter of giving each point in space an additional coordinate. The difficulty is visualising the simulation. There's no easy way to transfer a 3D simulation to a 2D screen (or our 2D retinas).

Sugarscape revisited

Screenshot of my Sugarscape simulation

I can't believe it's over a year since I last wrote about creating a Sugarscape simulation in Python and Pygame. The page attracted a fair number of views, but I suspect several visitors were looking for the teen magazine. However, at least some of the visitors were genuinely interested and a couple of weeks ago I was contacted by someone interested in recreating Sugarscape in Python.

Hyphae simulation

I've started work on a simulation of fungus-like hyphae, based on project I saw called Mycelium.


Environment Simulation

A simulation of an environment and weather system in which cells might live.