Skip to content

Repository files navigation

Minecraft Python Edition

image

Python NumPy OpenGL

Minecraft Python Edition is a Minecraft-inspired voxel game written in Python, using Pygame, PyOpenGL, Pyglet, and NumPy. The project focuses on experimenting with voxel rendering, procedural terrain generation, game physics, entities, and Minecraft-style gameplay systems.

✨Features

  • Dirty chunk loading

  • zombie mob

  • cow mob

  • sheep mob

  • simple zombie ai

  • Better water texture

  • Better grass texture

  • Water physics (sort of)

  • Fast terrain generation

  • Player mining

  • Spectator mode(sort of)

  • tnt explosion

📸In game screenshots

屏幕截图 2026-08-26 075310 屏幕截图 2026-08-26 075317

Pre Classic 0.48

屏幕截图 2026-08-28 233745 屏幕截图 2026-08-28 233627 屏幕截图 2026-08-28 233757 屏幕截图 2026-08-28 233722 屏幕截图 2026-08-28 233641

pre Classic 0.67

屏幕截图 2026-08-30 050545 屏幕截图 2026-08-30 050552

⚙️ Technical Details

Rendering

  • OpenGL-based 3D rendering
  • Textured voxel blocks
  • First-person and third-person cameras
  • Frustum/camera handling

World

  • Procedurally generated terrain
  • Chunk-based world
  • Multiple biomes
  • Block placement and destruction

Entities

  • Custom mob system
  • Zombie entity
  • Basic zombie AI
  • Entity collision

Physics

  • Player movement
  • Gravity
  • Jumping
  • Sneaking
  • Sprinting
  • Water interaction

📈 Development Progress

  • Basic voxel rendering
  • Terrain generation
  • Block interaction
  • Inventory
  • Crafting
  • Water
  • TNT
  • Zombie
  • Basic mob AI
  • Spectator mode
  • grass blending
  • Third-person camera
  • Improved chunk loading
  • More entities
  • Improved physics
  • More world generation

🧱Blocks

Grass
Dirt
Stone
Bedrock
Sand
Sandstone
Gravel
Coal Ore
Iron Ore
Gold Ore
Redstone Ore
Diamond Ore
Emerald Ore
Oak Log
Oak Leaves
Birch Log (from debug inventory)
Taiga Leaves (mentioned in alpha textures)
Tall Grass (mentioned in alpha textures)
Sapling (drops from leaves)
Cactus (generated in deserts)
Cobblestone (drops from stone)
Oak Planks (crafted from logs)
Crafting Table (crafted from planks)
TNT (from debug inventory, can explode using Oak Log)
Ancient Debris (from debug inventory)
Debug Block (placeholder)
Clouds (rendered in the sky)
Water (fluid, but placed as a block)

🧟Mobs

  • zombie

🎮Keyboard Controls (24 Keys)

Movement & Actions

W Move forward

S Move backward

A Strafe left

D Strafe right

Space Jump / Fly up (spectator)

LShift Sneak (prevents falling off edges) / Fly down (spectator)

LCtrl Sprint (run faster)

Inventory & UI

E Open/Close inventory

1 – 9 Select hotbar slot (1–9)

Esc Pause game / Open game menu

Debug & Tools

F3 Toggle debug HUD (shows coordinates, biome, FPS, etc.)

F5 Cycle camera view (1st person → 3rd person → etc.)

T Open command input (type /clear or /exit)

P Toggle spectator mode (free flight, no clipping)

L Debug: Fill inventory with random blocks (grass, stone, TNT, etc.)

F11 Toggle fullscreen mode

Mouse Controls (5 Interactions)

Left Click (hold) Break / mine blocks

Right Click Place blocks / Open crafting table / Interact

Scroll Up Cycle to previous hotbar slot

Scroll Down Cycle to next hotbar slot

Mouse Movement Look around (camera rotation)

🖥️ Performance

Performance depends heavily on render distance, terrain complexity, visible blocks, entities, and hardware.

The project is actively being optimized, with a focus on:

  • Chunk loading
  • Terrain generation
  • OpenGL rendering
  • Block rendering
  • Entity rendering
  • Frame-rate consistency

REQUIREMENTS:

pyopengl==3.1.5

pyglet==1.5.28

numpy==1.19.3

pygame==2.0.1

🚀 Installation

Requirements

  • Python 3.8–3.12 recommended (This game is developed in python 3.12)
  • Windows 10+
  • OpenGL-compatible graphics hardware

Install the required Python packages:

pip install -r requirements.txt

Or install them manually:

pip install pyopengl==3.1.5 pyglet==1.5.28 numpy==1.19.3 pygame==2.0.1

Running the Game

Clone the repository:

git clone https://github.com/happyleibniz2/Minecraft-Python-edition.git
cd Minecraft-Python-edition

Then start the game:

python start.py

Do not use the included run.bat on Windows.


📜 License

This project is licensed under the MIT License.

See the LICENSE file for the full license text.

Minecraft is a trademark of Mojang Studios. This project is an independent, fan-made Minecraft-inspired project and is not affiliated with or endorsed by Mojang Studios or Microsoft.

About

Official port of the original happyleibniz/Minecraft_python_Edition using pygame

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages