Open source cube world projects

I’ve been looking for some well designed projects that I can use to learn off of but can’t seem to find any decent ones.

Are there any good ones that you guys know of?

There’s this small game called minecraft ;D

“Well designed” :stuck_out_tongue:

Also not technically open source.

Minecraft isn’t open-source.

There are de-obfuscated versions of the game’s code, but to redistribute any versions of it would be illegal regardless of what modifications are made to it.

There wouldn’t be anything to learn from its code either way.

  • Jev

When you want to “learn off” something having the full source has the same effect as the project being open source. Also what do you mean there would be nothing to learn? If op wants to see how one voxel engine works then minecraft is good to look at.

The Spout-Project (Or Flow-Project), ArdorCraft, and many more: http://www.reddit.com/r/voxelgamedev

Terasology is a nice open source clone.

If you are looking to learn then the best way would be to start from scratch rather than learning from an already complex code base. Learn to draw a simple opengl textured cube. Thereafter its mostly just about implementing voxel optimisations to allow you to draw lots of them. There are plenty of tutorials covering such techniques.

Why not using ArdorCraft?
You can find a working example here.

Now yes, couple of years ago no.

No idea how minecraft looks now in terms of code but years ago it was quite “spaghetti” like, but Mojang has been working on refactoring the code for quite a while now and make it easier to access certain aspects of the game for user friendly modding. Before it relied on (don’t quote me) on mod loader using reflection to essentially get access to hidden methods and fields that were necessary for certain mods to work.

The particular part of the code that I really could not make ends with was the chunk generator code, lots of math in that…lol.

Even if they did, it is really hard to learn from “completed code” and even harder, if it is such a big game. It would take weeks or even month to find and understand the parts, even if the code is clean.
I think it would be a lot easier to read a few tutorials, which often contain some code parts, and then try those things out.

Anyways: In the Libgdx Tests, there is a VoxelEngine (https://github.com/libgdx/libgdx/tree/master/tests/gdx-tests/src/com/badlogic/gdx/tests/g3d)

The ancestor of my main game (written by Vincent Stahl) is composed of 4 classes, I took me several weeks to understand it a bit and the source code is quite dirty. I admit that understanding a completed code can be very hard for a beginner. That’s why I suggest to use ArdorCraft. There are 3 working examples in ArdorCraftAPITest, a very basic example, an intermediate example and the most complete example, it allows to understand the concepts step by step. Those examples are designed for learning purposes. Terasology is a lot better and richer than ArdorCraftAPITest but in my humble opinion, it seems to be harder to understand.

Thank you, it’s an excellent example.

Minecraft won’t do me much, I’m pretty new to the LWJGL scene in general so I don’t think I’d be able to learn too much with the deobfuscated code.

Some great tutorials here about how to render blocks/chunks would also help me a lot.

I really should go and write a tutorial for voxel-engine’s.
Having ~4 years knowledge of how voxel-engine’s work, this could be a really good idea.
Too bad I don’t know how to start with writing a tutorial.

Have a nice day.

  • Longor1996

You asked a question about higher level wrappers above OpenGL last month, why don’t you give a try to the voxel engine based on LibGDX or ArdorCraft (based on JogAmp’s Ardor3D Continuation)?

I’d do that if I was just interested in making a voxel game, but I’m really just interested in OpenGL and how it works. I’m just creating a voxel engine as a way to learn it as I also have an interest in them.