Go to file
GreenXenith 79f8168375 Change entry point to __main__ 2021-01-29 14:33:29 -08:00
media Use more... legal media 2021-01-29 14:29:58 -08:00
src Add unit tests 2020-05-21 13:43:59 -07:00
.gitignore Basic renderer works, camera almost works 2020-05-11 20:11:00 -07:00
DESIGN.md Basic map class and perlin noise 2020-05-21 11:30:24 -07:00
LICENSE.txt Add license 2021-01-29 14:30:38 -08:00
README.md Change entry point to __main__ 2021-01-29 14:33:29 -08:00
__main__.py Change entry point to __main__ 2021-01-29 14:33:29 -08:00
screenshot.png Comments and tweaks 2020-05-21 12:07:48 -07:00
test.py Add unit tests 2020-05-21 13:43:59 -07:00

README.md

PyCraft

Minecraft written in PyGame. Because why not.

Usage

python3 . to run the game.
python3 test.py to run unit tests.

Controls

Key Action
WASD Movement
Mouse Rotate camera
ESC Free/grab cursor

Notes

  • It's slow. Such is the way of loops in Python.
  • On my machine runs at 8FPS with 4 blocks, and at 3FPS with 64 blocks.
  • Drawing could be sped up using Numpy vectorization, but drawing textured triangles with that would be rather difficult to figure out.
  • The closer you get to blocks, the slower it will be. You may need to hold down ESC longer to free the cursor.

32x32 map I managed to render:
32x map

Thank you to Javidx9's 3D renderer tutorials. A portion of the matrix code was derived from his.
Media from Hugues Alexandre Ross' RPG16 texturepack, licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.