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).
Simple Minecraft Clone in 580 lines of Python
51–60 of 113 posts
Re: Simple Minecraft Clone in 580 lines of Python
#52More 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
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
#53* You need Python2 virtualenv,
* You need to install `pyglet` in it,
* Start it with `bin/python main.py`;
Re: Simple Minecraft Clone in 580 lines of Python
#54These 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?
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
#55I remember being as excited about Liero as kids are about Minecraft today. Minecraft is great, but so was Liero.
Re: Simple Minecraft Clone in 580 lines of Python
#56Re: Simple Minecraft Clone in 580 lines of Python
#57I 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
http://www.amle.org/Publications/RMLEOnline/Articles/Vol29No...
Re: Simple Minecraft Clone in 580 lines of Python
#58Can we get a JS answer to this in the browser? I'm curious if Three.js can match this level of terseness.
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-...