Linux Format

Managing game objects with Python

This issue we’re going to add to an already developed game platform, fully created in the Python scripting language using the PyGame library module. The theme of the project was inspired by an isometric video game in the early 1990s called HeroQuest (http://bit.ly/lxf277dwarf). This project first started off as an experiment in video game construction over one weekend when the question was asked: What if the game world moved around the main game character instead of moving the main game character around the game world?

The Dwarf Game Project that we’ll be modifying as part of this month’s tutorial consists of a constructed game map made up of interconnected rooms, game objects and enemy game characters (hostile dwarfs). The player of the game will control the main game character (a green dwarf), around the map disposing of all the enemy players to complete the game or until the main game character is killed by any of the enemy dwarf characters.

To get started, we’ll need a few things: Python, PyGame and the Dwarf Game Project.

To install Python, open a terminal window (Ctr-Alt-T) and module by typing pip3 install PyGame .

You’re reading a preview, subscribe to read more.

More from Linux Format

Linux Format2 min read
Installation Options
Moonlight has an extensive set of supported platforms, reflecting its gaming origins. It can be installed on all the major desktop platforms, and there are homebrew ports for the major consoles and some handhelds, along with single-board computers su
Linux Format13 min read
HotPicks
Version: 1.46.2 Web: http://roland65.free.fr/xfe/ If you aren’t using Linux on a well-endowed machine, you can scrape off some load from the hardware using the X File Explorer (XFE). This lightweight file manager is an interesting mix of the classic
Linux Format5 min read
X Marks The Apps
If you want to transfer files from another machine on your local network, Mint includes the ever-so-useful Warpinator. You can download it for Windows (from https://winpinator.swisz.cz) and it’s available on other flavours of Linux. When you start it

Related