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.
Start your free 30 days