Live data from Hacker News

Simple Minecraft Clone in 580 lines of Python

github.com

111–113 of 113 posts

Re: Simple Minecraft Clone in 580 lines of Python

#111
post #6

I used a variant of this code for a project for my students. Just had to clean it up a bit and organize the code into parts they should be reading (game logic) and parts they should ignore unless they're really curious (mostly the OpenGL stuff).

Please put this online, it'll be a very very valuable resource.

Re: Simple Minecraft Clone in 580 lines of Python

#113
Software has a habit of becoming exponentially complex as the featureset increases, so I am not that impressed by small code if you cut features aggressively.

To prove a point, I wrote a minecraft clone in about 60 lines of code (10x less than the Python version). It cuts a few more corners (no textures, no gravity), but has the basics of world generation, rendering, and most importantly, adding and removing blocks in front of the crosshairs to build (see the little arch I made in the middle):

http://i.imgur.com/ZZWFkXn.jpg

It's written in Lobster in about 1.5hrs, which is quite similar in features to Python + pyglet. Yes it uses a few high level calls like simplex() and camera_FPS_view(), but these have been part of the Lobster standard library for a while, so I believe that's fair. All code I created for this demo are in that screenshot.

Post reply on HN