Skip to content
Mostafa H edited this page Sep 5, 2023 · 2 revisions

PyBlock-3D 🎥🟩

Introduction

PyBlock-3D is essentially an attempt at creating graphics that look similar to those in Minecraft, just done in PyGame. Though that lacks optimization, it was a cool way to learn about projections and attempting to use sorting algorithms to improve performance.

Scope

The scope for PyBlock-3D was very simple, basically create something that works like Minecraft implementing basic controls for movement, moving cursor around and placing blocks. This was all done using the PyGame library, while referring to Wikipedia pages to learn how to project 3D shapes in 2D. Moreover, it also had to be usable, with more than 30 FPS average. This was done by ideating different optimization techniques, (did this back in Grade 11 so nothing too crazy), basically using sorting algorithms to hide textures that are hidden behind other blocks, as well as removing blocks that are out of the user's FOV and outside of a certain radius to the user, reducing what was being processed and rendered in the background. Furthermore, was also able to store maps for later use using CSV files to store the location of each block placed.

Constraints

The main constraint for this project was that it had to be done in Python!

Clone this wiki locally