Live data from Hacker News

Simple Minecraft Clone in 580 lines of Python

github.com

51–60 of 113 posts

Re: Simple Minecraft Clone in 580 lines of Python

#51
post #32
post #18

These seemingly "big" games written in a handful of lines of code always make me feel very, very stupid. I know if I made this, I could easily imagine writing 50,000 lines. How do people do this? How do their minds work?

Actually this demo lacks any of big or mid-sized features (as in implementation) of Minecraft, such as infinite world, terrain generation, mobs, mechanisms (pistons/redstone).

Most "Doom clones" just showed static maps and lighting too. They aren't really games at this point, the are just demonstrating the techniques to create some aspect of the game, usually a world view like in this project. Within this project you see voxels with textures, rudimentary world building, and interaction with the world controlled by the direction the camera is looking. I think that is sufficient to call it a "Minecraft clone." This still has a ways to go before it can be called a game, but that wouldn't make it less interesting as a teaching aid.

Re: Simple Minecraft Clone in 580 lines of Python

#52

More than 100 lines of this are textures! Got this error though. Any ideas? OSError: dlopen(/System/Library/Frameworks/QuickTime.framework/QuickTime, 6): no suitable image found. Did find: /System/Library/Frameworks/QuickTime.framework/QuickTime: mach-o, but wrong architecture /System/Library/Frameworks/QuickTime.framework/QuickTime: mach-o, but wrong architecture

I got it to work on OSX 10.8!

slunk's suggestion:

`arch -i386 python main.py`

got me halfway there

You also have to run it with python 2.6 like so:

`arch -i386 /usr/bin/python2.6 main.py`

If you only have pyglet for 2.7, you will have to install it for 2.6. Installing packages in python for 2.6 will require pip-2.6 which you get like this:

`sudo easy_install-2.6 pip`

then

`pip-2.6 install pyglet`

Walla!

Re: Simple Minecraft Clone in 580 lines of Python

#54
post #18

These seemingly "big" games written in a handful of lines of code always make me feel very, very stupid. I know if I made this, I could easily imagine writing 50,000 lines. How do people do this? How do their minds work?

The code I invent myself is almost always a big mess. When I'm working seriously, I research the answer to the problem.

This produces slower results, better code. The other trade off is I'm not working from direct memory or skill, so co-workers have less respect for me, even if "my" solution is better than theirs.

This makes me functional years ahead of my experience, but belies a true understanding of the concepts. As I methodically catch up with myself over time, this is less true.

Re: Simple Minecraft Clone in 580 lines of Python

#55

I remember being as excited about Liero as kids are about Minecraft today. Minecraft is great, but so was Liero.

Sigh, right in the nostalgia. Liero was better though, it had fluid simulation. You could flood a level with water and drown people, or better - oil and then set it aflame. And it had guided missiles, which you could spam, making one long queue of keyboard-guided death. It was basically Worms Quake.

Re: Simple Minecraft Clone in 580 lines of Python

#56
I have been teaching my 10 year old Python as an exercise. Recently I've noticed he's getting a little bored and I'm being very careful not to 'sicken' him, as this needs to be fun. I've just shown him the video for this and downloaded the code to show him that its possible in Python. He loves Minecraft (we watched the documentary movie about Mojang) and seeing this has given him a bit more of an interest again

Re: Simple Minecraft Clone in 580 lines of Python

#57
post #56

I have been teaching my 10 year old Python as an exercise. Recently I've noticed he's getting a little bored and I'm being very careful not to 'sicken' him, as this needs to be fun. I've just shown him the video for this and downloaded the code to show him that its possible in Python. He loves Minecraft (we watched the documentary movie about Mojang) and seeing this has given him a bit more of an interest again

Maybe you should let your 10 year old be bored.

http://www.amle.org/Publications/RMLEOnline/Articles/Vol29No...

Re: Simple Minecraft Clone in 580 lines of Python

#58
post #42

Can we get a JS answer to this in the browser? I'm curious if Three.js can match this level of terseness.

there already is http://voxeljs.com/

poxel rendering like in the python scribble is trivial, there many much more interesting problems to solve, like managing the geometry. If anyone is truly interested they should begin here: http://0fps.wordpress.com/2012/07/07/meshing-minecraft-part-...

Post reply on HN