Minecraft in BGE?

Is it possible to set up a voxel like building and removing system in the bge without python? And if not are there any python scripts for it? :eyebrowlift2:

I think not, you have to use python to adjust the position of a block, but even with python you can’t get a efficient block terrain(because the perfomance), if you want to have a voxel system, I think the best way is edit the blender’s source code, but I’m not really sure.

There is resources about this in the resources forum.

No way to use culling for performance? :frowning: KK Ill check it out. I really would rather make my idea th the bge than anything else. :stuck_out_tongue: I dont mind a script for the placing.

can you create a C++ script with a python wrapper for bge?
http://intermediate-and-advanced-software-carpentry.readthedocs.org/en/latest/c++-wrapping.html ?

I don’t understand enough about it to actually do it though or if it’s possible… in the bge.

The BGE isn’t the engine for you if you’re going for a voxel world. It can’t handle that much going on at once, on top of things like AI, dungeons, and whatnot.

I’d recommend Unreal Engine, if you’re willing and able to buy a license.

Darn… Does Unreal cost 20 bucks a month or is it possible to pay 20 bucks for a month once and keep your verison? :stuck_out_tongue: If its 20 bucks a month, I can do that for my messing around projects.

Edit: Is there a student license? :confused:

UE4 license:
Not sure about the student license. You can pay $20 for one month of subscription (and then cancel it), and you will keep full access to any versions that were made available during that month of your subscription, even after your subscription is over. I’m currently on v4.1 from my old (canceled) subscription, while the latest version is 4.6.

Minecraft in the BGE:
Minecraft generates its worlds in chunks, which are 16x16x16 blocks in dimension. Think of each chunk as an individual object in Blender. (The blocks themselves are not individual objects, but one single optimized mesh.) Each time a block is modified in a chunk, the mesh data of that chunk has to be dynamically rebuilt to reflect the changes the player made to it. This is opposed to simply adding/deleting a single object, as you would in Blender, if all of the blocks were individual objects.

Blender currently has no way to add or remove mesh data of objects. All it can do is change vertex positions, although that isn’t even helpful in this case. What you’re looking for is dynamic mesh generation (adding/subtracting polygons to/from an object). The closest Blender can get to mimicking Minecraft block behavior is having each block be an individual object in Blender. This is extremely inefficient, as Blender can’t handle that many objects at once. There are also sides of blocks that aren’t visible to the player, because they’re surrounded by adjacent blocks. This excess geometry adds more weight to Blender’s performance. The point of dynamic mesh generation is to optimize the mesh of a chunk by removing this unseen geometry.

As others have mentioned, it would be [theoretically] possible to modify Blender’s source code to give Python code a way to dynamically generate mesh data. However, this is impractical. Last I heard, the BGE’s source code was disorganized and disjointed. I imagine it would be a nightmare to try to implement dynamic mesh generation in that kind of code. My guess is that modifying Blender’s source code isn’t the option you’re looking for - and I wouldn’t blame you.

I’ve tried my hand at making a Minecraft-esque voxel world generator in Blender with Python. It didn’t go anywhere due to Blender’s limitations, but I did have fun with it. If you’re interested in it, then by all means, give it a try. You can still write the general algorithms for generating a world using cube objects as your blocks. Just keep in mind that Blender isn’t designed to support this type of game.

p.s.: If you are going to give it a try, be aware that it will involve Python :wink:

The Godot engine may or may not be able to do something like you want already (it’s completely free software), however there’s no engine out there that will make it an easy job.

I’m not familiar with Godot, but these documentation pages seem to be relevant to mesh manipulation:


I’m not sure if this could be applied to on-the-fly mesh generation. As Ace Dragon said, there is no game engine (yet) that will make this task an easy one, let alone free of programming.

I think voxel system is not so hard in Blender. Just make 3-dimensional python list containing block numbers and object number if allready drawn from blender objects.
Few functions:
Load and save that list…
Update world (generates cubes only when it is surface block, voxel that is surrounded every side not drawn. Call this once in beginning)
Dig(Delete one block, and check surrounded blocks and drawn them)

Yeah Godot has allready cubemap, but I think it does not maintain hidden blocks, but small maps may work.
There are allready Minecraft styled examples in Blender.

UE4 has a student license, this is a link for a github student pack, which has a student license for UE4

@@VegetableJuiceF, WOOT instant grab! Thanx

Thank you everyone! I pretty much figured that it would involve coding, but since Im leanifng Java right now for modding MC I cant really stop and learn python. :stuck_out_tongue: I’ll probably try out Godot and UE though and see what they can do.