Live data from Hacker News

Minecraft clone in Python with Pyglet

slideshare.net

21–30 of 43 posts

Re: Minecraft clone in Python with Pyglet

#21
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.

A few years back it seemed that pyglet was dead. I am glad to see that this isn't the case.

Re: Minecraft clone in Python with Pyglet

#22
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've created a tutorial for making a 2D version of Minecraft using Python and Pygame. Obviously the end result is a _much_ simpler game than Minecraft, but it is useful in teaching things like 2D arrays and dictionaries.

http://usingpython.com/pygame-intro/

Re: Minecraft clone in Python with Pyglet

#23
post #12

Minecraft in 1 line of Windows Batch: start minecraft.exe

This is actually more relevant than one might guess. If you export about 90% of the heavy lifting into a library (that might not even be written by you) then of course you can write anything in a very small program. I would interpret that "Minecraft in 1 line of Batch" as very short note to that fact. Therefore it is a relevant criticism of the linked article.

Re: Minecraft clone in Python with Pyglet

#25
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've created a tutorial for making a 2D version of Minecraft using Python and Pygame. Obviously the end result is a _much_ simpler game than Minecraft, but it is useful in teaching things like 2D arrays and dictionaries. http://usingpython.com/pygame-intro/

Thanks. That will be fun to look at too.

Re: Minecraft clone in Python with Pyglet

#26
post #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.

Your logic simply disallow any meaningful discussion. After all, everything starts small.

Re: Minecraft clone in Python with Pyglet

#27
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.

Pyglet handles a lot of low-level drudgery involved in talking to OpenGL, setting up a window, dealing with input, etc. It's similar to SDL or GLFW in that regard.

I've written that code several times, and honestly nobody is any less of a programmer for using that instead of dealing with the bullshit themselves.

It's similar to complaining about using the Node abstractions for IO instead of manually adding that yourself--it's just being silly.

Re: Minecraft clone in Python with Pyglet

#28
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.

And if I cloned myself right now, my clone wouldn't have all my experiences or learning or history, so the description of cloning must be misleading.

Re: Minecraft clone in Python with Pyglet

#29

Earlier quoted context omitted.

I've created a tutorial for making a 2D version of Minecraft using Python and Pygame. Obviously the end result is a _much_ simpler game than Minecraft, but it is useful in teaching things like 2D arrays and dictionaries. http://usingpython.com/pygame-intro/

Thanks. That will be fun to look at too.

If you do try the tutorial, i'd love to see what you create! :)

Re: Minecraft clone in Python with Pyglet

#30
post #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.

Right. Many of these clones are basically Minecraft Classic, which I would call just Minecraft, I very much like it.

Though Minecraft Classic had multiplayer, which this does not.

Post reply on HN