Live data from Hacker News

Simple Minecraft Clone in 580 lines of Python

github.com

41–50 of 113 posts

Re: Simple Minecraft Clone in 580 lines of Python

#41
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).

You must be great fun at parties.

Re: Simple Minecraft Clone in 580 lines of Python

#43

Earlier quoted context omitted.

There's an awful LOT happening behind those 580 lines. I'm not sure whether it is a good thing to start at such an unrealistically high level of abstraction for a 3d game.

As something for beginners, this would be great. When you start learning a new skill, it's important to have that feeling of tangible achievement to keep students motivated. Anyone interested enough to pursue a career in game dev will dig into pyglet to understand what's happening, as they start to push the limits of the knowledge gained from this kind of exercise. And then here's the other nice lesson: students can…

Totally agree.

I remember writing this:

10 PRINT "LESSNONYMOUS"

20 GOTO 10

Seeing actual things happen was awesome. Now we have 3D games, seeing your name over and over wont enthrall, so being able to mod and extend a basic Minecraft world would be an incredible gateway.

The way to hook people is exactly like you say. Make a small change, see a huge difference. Suddenly ... YOU HAVE THE POWER!!!

10 PRINT "LESSNONYMOUS";

20 GOTO 10

Re: Simple Minecraft Clone in 580 lines of Python

#44
post #14

If someone were to make something like this a step-by-step tutorial/template appropriate for a classroom setting it would be huge. Imagine a class at High School where you start off learning the basics of Python for the first few weeks and the rest of the semester is spent writing the chunks of code into a template that has lots of notes for guidance. I'd image something like : def setDefaultBlockColor(color): # reca…

There's an awful LOT happening behind those 580 lines. I'm not sure whether it is a good thing to start at such an unrealistically high level of abstraction for a 3d game.

10 PRINT "LESSNONYMOUS";

20 GOTO 10

There was an awful lot happening behind my very first program too. And that was the available level of abstraction. Why start kids coding something so simple when they can mess with something so powerful?

Re: Simple Minecraft Clone in 580 lines of Python

#46

building penises out of dirt right now. I find this comment a bit distracting, and in poor taste. Everybody knows real minecraft users build castles. building castles in the sky.

I expect it's at least somewhat referencing this:

http://www.youtube.com/watch?v=4wgQvij3rVE#t=214s

Re: Simple Minecraft Clone in 580 lines of Python

#47
post #36

Just curious, what is it that makes the performance not so great? Could performance be significantly improved by doing a re-write in Lua, for example? (Probably not... it's probably something in Pyglet itself...) (FWIW, it's choppy compared to Minecraft, which is obviously much more complex and has a greater rendering distance.)

It's rather simple: you are proccessing huge grids of 3D data, it's always going to be less then-optimal unless you write parts of it in languages that can do this fast. (This also includes interaction between blocks if you are going to processing a lot of those.)

Re: Simple Minecraft Clone in 580 lines of Python

#50
post #15

Earlier quoted context omitted.

It was built with an old version of pyglet trying to run on 64bit python. Update.

Unless I'm just terribly mistaken, good luck getting pyglet to run on OS X right now. However, I really hope I am wrong, because that means I was just being a fool last week and will soon be using pyglet.

Pyglet is very slow for releases, it's almost always better to build it right out of hg (pip install hg+https://pyglet.googlecode.com/hg/). It's had Cocoa support for something like a year, at least.
Post reply on HN