Live data from Hacker News

Minecraft clone in Python with Pyglet

slideshare.net

11–20 of 43 posts

Re: Minecraft clone in Python with Pyglet

#13
post #10
post #2

Isn't "import minecraft" enough?

Yes, this 500 lines statement is somewhat misleading. This program isn't written on Python, rather on a large specific library which does a lot of heavy lifting. It's better than nothing, though, to be able to look at an app dissected even to a few large blocks. Kudos.

When there are libraries to do the heavy lifting for you, I would still say that the 500 lines is rather accurate. I have never taken the "X lines of code" to refer to all the libraries included, but rather to the lines of code necessary for a new user to write in order to make something that works.

I agree that it can be distorted, by defining everything as an external library, but it does give a good measure of how quickly one can pick up a new tool and make something useful.

Re: Minecraft clone in Python with Pyglet

#14
post #9
post #3

Thanks. My son has been asking me how to write games, and has spent some time looking around in the code for the Raspberry Pi version of Minecraft. Maybe we can make some headway in this version because even dumb old Dad can handle 500 lines.

I cannot recommend pyglet strongly enough for learning graphics and game programming, it is so quick to get started with. I wonder if anyone has written some learn to code tutorials with it.

My wife recently began learning python with the book "Hello Python." It seems like a solid intro from what I read. The book uses hunt the wumpus as its starting example. If you combine that with Steve Johnson's excellent Pyglet tutorial[1] you could probably get to writing games pretty quick.

[1] http://steveasleep.com/pyglettutorial.html

Re: Minecraft clone in Python with Pyglet

#15
post #3

Thanks. My son has been asking me how to write games, and has spent some time looking around in the code for the Raspberry Pi version of Minecraft. Maybe we can make some headway in this version because even dumb old Dad can handle 500 lines.

HTML5 games! They're easy, quick to set up, the feedback is instant and they're fun to play! I've been making HTML5 games as part of short, two hour collaborative coding exercises at work and it's awesome. Here's a recent one we did based on Flappy Bird [1].

I made a few bootstrap scripts here [2] to make it easier to get up and running.

1. https://github.com/hoorayimhelping/Flabby-Bird 2. https://github.com/hoorayimhelping/HTML5-GameKit

Re: Minecraft clone in Python with Pyglet

#16
What bothers me here is that people claim to program "Minecraft in X lines", when in fact all they create is a block (voxel) game engine. Minecraft is much more than that, it has redstone circuits, farming, mobs, structures, biomes, potion brewing, netherworld, fire, etc... Mind you, I don't want to belittle anyone's efforts. I think this is an awesome programming project. But its description is misleading.

Re: Minecraft clone in Python with Pyglet

#17
post #16

What bothers me here is that people claim to program "Minecraft in X lines", when in fact all they create is a block (voxel) game engine. Minecraft is much more than that, it has redstone circuits, farming, mobs, structures, biomes, potion brewing, netherworld, fire, etc... Mind you, I don't want to belittle anyone's efforts. I think this is an awesome programming project. But its description is misleading.

Line count is always misleading.

Re: Minecraft clone in Python with Pyglet

#19
post #16

What bothers me here is that people claim to program "Minecraft in X lines", when in fact all they create is a block (voxel) game engine. Minecraft is much more than that, it has redstone circuits, farming, mobs, structures, biomes, potion brewing, netherworld, fire, etc... Mind you, I don't want to belittle anyone's efforts. I think this is an awesome programming project. But its description is misleading.

Don't forget that Minecraft was originally just a game where you could walk around and place or destroy blocks. None of the fancy stuff you're talking about was added until the game started taking off.

Re: Minecraft clone in Python with Pyglet

#20
post #16

What bothers me here is that people claim to program "Minecraft in X lines", when in fact all they create is a block (voxel) game engine. Minecraft is much more than that, it has redstone circuits, farming, mobs, structures, biomes, potion brewing, netherworld, fire, etc... Mind you, I don't want to belittle anyone's efforts. I think this is an awesome programming project. But its description is misleading.

Line count is always misleading.

I think scales of magnitude are informative. The difference between 100 and 200 lines or 10,000 and 20,000 are probably not useful, but you can get an idea of the scale of a project when you compare orders of magnitude. At the smallest scale, the recent ray caster was an example where the amount of code mattered a great deal.
Post reply on HN