Building a Python Game

Posted by Neville Dinning
10
May 25, 2016
234 Views
Image This article is a follow-up of the Grappling with Python article published a few weeks before this one. The article attempts to outline some of the steps taken in building a game that is coded in Python.

The Game
The game that is being produced (it's not done yet!) is based on a playing surface that looks like a chess board. The rules and details of play will not be disclosed here as they are still in development, as is the final format for the game.

The Process
The aim of this activity has been to extend skills in coding beyond developing text-based games to those that have a graphic element, and ability to play in a GUI environment.
So first, a resource that provides some basic instruction in how that can be done was sourced, and the coding process was able to begin. That source was a free ebook that can be downloaded from several places. use your favourite search engine to look for "making Games With Python & Pygame."

To add to the modules provided in a basic Python installation it was necessary to import some others that have been specifically developed for game designers to use.

The initial coding activity then involved using and adapting examples in the training resource to build and display the playing surface. I then decided that some of the learning from a Data Management using Python course could be useful for building the game. Specifically that meant creating classes and methods for those classes to use for the board and the players.

After many attempts, with lots of debugging and trial runs the game has developed to the point where the players can be moved around the board using the limits that the rules will eventually dictate.

And so it continues.....
1 people like it
avatar
Comments
avatar
Please sign in to add comment.
Advertise on APSense
This advertising space is available.
Post Your Ad Here
More Articles