Linux Format

Interact with your 3D game environment

PYTHON

Credit: https://github.com/jtmfam/Gh0stenstein

Part Two

Missed Part One? Turn to page 62 to get hold of it

OUR EXPERT

Andrew Smith is a software developer for NHS Digital, has a bachelors degree in software engineering and a master’s degree in computer networks.

For this tutorial we’re continuing from last issue’s Python tutorial. Don’t worry, you’ll have access to the full code. In the previous instalment we gave an overview of the mechanics and mathematics, explaining how the player (featured in first-person view) could move and navigate around the game world we created. As much as this was done to some level of detail, it still left our 3D world looking a little blank and boring.

We’ll now focus more on building objects in the game world rather than further explaining the mathematics and mechanics of how the program works.

In this article we’re going to populate our 3D generated game world with game objects. We’ll also start adding collision detection so that you (as a player) will have to walk around the objects presented in the game world or be stopped by them. To help us do this we’ll also be modifying parts of the existing code to help build our game world more easily. Modifying the code will also help us to manipulate

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

More from Linux Format

Linux Format5 min read
Some Ansible Advice For Around The Home!
Of late, this writer has been busy creating new virtual hosts for different things and decided that it would be an ideal time to get stuck into Ansible. Things have evolved in system management since Bash. Ansible is a great way to deploy software c
Linux Format14 min read
Ubuntu at 20
Without Ubuntu, the current Linux landscape would be unrecognisable. Back in October 2004, the first 4.10 (2004.10) release of Ubuntu, with its intriguing Warty Warthog code name, leapt from obscurity to being one of the most downloaded Linux distrib
Linux Format3 min read
Kernel Watch
Linus Torvalds announced the fourth RC (Release Candidate) for what will become Linux 6.9 in another few weeks. In his announcement, he noted that there was “Nothing particularly unusual going on this week – some new hardware mitigations may stand o

Related