Live data from Hacker News

Simple Minecraft Clone in 580 lines of Python

github.com

71–80 of 113 posts

Re: Simple Minecraft Clone in 580 lines of Python

#71
post #24
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?

Take a look at the code, it's not THAT hard when you have the right tools (language, libraries, knowledge...) though it's quite awesome nonetheless. IMHO the game actually shows how powerful Python + Pyglet (OpenGL actually) are. Wanna get your mind blown even harder? Check some 4kb demos[1]... and that's binary size! No JVM/Python runtime supporting it. [1] http://www.youtube.com/results?search_query=4kb+demo&pag...

While demoscene stuff is seriously impressive most are using a shit load of DirectX to do what they do in such a small size. They are not bare metal demos.

Re: Simple Minecraft Clone in 580 lines of Python

#72
post #24
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?

Take a look at the code, it's not THAT hard when you have the right tools (language, libraries, knowledge...) though it's quite awesome nonetheless. IMHO the game actually shows how powerful Python + Pyglet (OpenGL actually) are. Wanna get your mind blown even harder? Check some 4kb demos[1]... and that's binary size! No JVM/Python runtime supporting it. [1] http://www.youtube.com/results?search_query=4kb+demo&pag...

I still remember how I was blown away when seeing .kkrieger[1][2] for the first time, introducing me to the potential of procedural assets in games.

[1] http://en.wikipedia.org/wiki/.kkrieger [2] http://www.youtube.com/watch?v=2NBG-sKFaB0

Re: Simple Minecraft Clone in 580 lines of Python

#73

[rant mode on] 1. 80% of the bang takes 20% of the time 2. Writing games is 99% fine tuning and game play 3. It's just a rendering exercise, certainly not a "clone" FYI: The above is "the internet" in three lines! :-) [rant mode off]

To be fair, he did say 'simple'. I'm assuming he meant clone in terms of the overall physical characteristics, and not so much that it was a full clone.

Re: Simple Minecraft Clone in 580 lines of Python

#74
post #57

Earlier quoted context omitted.

Maybe you should let your 10 year old be bored. http://www.amle.org/Publications/RMLEOnline/Articles/Vol29No...

Ooh, a sample size of one! Sounds compelling!

Not only that, it's not even to do with "boredom" in any sense that I understand the word:

"participants limited TV, computer and video games, music, and telephone time to 30 min per day; in the time made free thereby, they were to read, sit quietly, write in their journals, meet with friends, and so on"

Calling that "boredom", says more about whoever wrote the title "Why Kids Need To Be Bored" than it says about kids' performance and boredom.

Then, the result of this study seems to be: out of 3 participants, 1 showed improvement, the other 2 dropped out. No data on 2 out of 3 test subjects, really, statistically proves nothing at all. It could go either way, or completely different. And it's bad science to not clearly point this out in the abstract. There's no shame in a failed experiment, but there is a lot of shame in pretending that it shows a trend that you didn't actually measure.

I'd be very surprised if research points out that more boring study material leads to improved results. Actually, with N=1 I won't be surprised no matter what.

Re: Simple Minecraft Clone in 580 lines of Python

#75

I wrote down the basic steps to get this running on windows at https://github.com/fogleman/Minecraft/wiki

This probably needs floated towards the top a bit. I thought I couldn't get it to work, but then I saw step 6 ...

Actually you should just write it in the project's README.md :)

Re: Simple Minecraft Clone in 580 lines of Python

#77
post #35

Pyglet is vastly more pythonic than pygame for writing games. I have found it much easier to teach pyglet for newcomers and the code is easier to read too. Since it uses ctypes, it is very easy to port pyglet to a platform that supports OpenGL. Unfortunately there is very little momentum in the project. Last year an alpha version was released after a gap of two years. I truly hope that pyglet gets the popularity it d…

PyOpenGL is by far the most pythonic of them all, though this comes at the cost of being around 4x slower than pyglet. Pyglet is a good compromise between the two.

Re: Simple Minecraft Clone in 580 lines of Python

#78
post #20

Earlier quoted context omitted.

I got a similar error. "arch -i386 python main.py" solve the problem for me.

I'm running OS X 10.8 and ran into the same problem as the OP. This workaround unfortunately didn't resolve the problem.

try forcing python into 32-bit mode? defaults write com.apple.versioner.python Prefer-32-Bit -bool yes

Re: Simple Minecraft Clone in 580 lines of Python

#80

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 had to use this command:

arch -i386 /System/Library/Frameworks/Python.framework/Resources/Python.app/Contents/MacOS/Python main.py

Someone should update Pyglet... Why does it need QuickTime?

Post reply on HN