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

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

More from Linux Format

Linux Format1 min read
Wine For Wayland
2023 was a great year for the Wayland driver for Wine. The goal was to move forward from the experimental phase and make the driver a proper upstream component. A year later, after several merge requests, many people are now already able to use the l
Linux Format5 min read
Run The Microsoft Distro
Despite its easy integration with WSL, in October 2021 Visual Studio Code became the site of a battleground between Microsoft and the open source community. The controversy centred around the release of .NET 6. The tech giant had originally hinted it
Linux Format1 min read
Kaki Pi
Another Pi-like SBPC appears! From Yuridenk-Shokai in Japan, this packs a Renesas RZ/V2H Coretex-A55/R8/M33 MPU with 80 TOPS of AI. It’s aimed at robotics and has four CSI video inputs along with a PCIe 3 connection. Find out more in Japanese: www.ka

Related