Hi, a few years ago I started working on some sort of block/voxel engine: YAVE – Yet Another Voxel Engine [Dev blog.]. I got sidetracked (oh look a squirrel!) with other game ideas and tech demos and never continued working on it.
A few weeks ago I checked out the sources again, rewrote it from the ground up and planning to release it in the coming days. I want to include some more fleshed out examples and I need to re-read the wiki pages I wrote, with a more ‘fresh’ head.
So, what is Blocks? It’s a framework to create and render block worlds. It organises block elements in chunks. Each chunk has a node holding one or more geometries. A geometry is created for each block type in the chunk.
The mesh generator also creates a collision mesh for a chunk.
Not limited to cube shape blocks, also support for slabs, pyramids, wedges, stairs, … It’s very easy to add new shapes.
Theming support, Thanks to themes it’s very easy to change the default images/textures (diffuse textures, normal map textures, parallax map textures).
Pager implementation, Blocks comes with a pager implementation to easily create ‘endless’ terrain. Set your location, and the surrounding chunks will be attached.
I haven’t looked at PBR yet, I kinda avoided it on purpose to avoid getting side-tracked. Again… But it is definitely on my todo list.
It is however possible to add a PBR material and use it on a block:
// register the PBR material
TypeRegistry typeRegister = BlocksConfig.getInstance().getTypeRegistry();
// create block that uses the PBR material and register it
Block pbrBlock = Block.create("my-pbr-block", "my-pbr-material");
BlockRegistry blockRegister = BlocksConfig.getInstance().getBlockRegistry();
In the end the MeshGenerator will create a geometry of the mesh with the PBR material. You will still need to to whatever light calculations you need to do to render it, but I guess it should be possible! Feel free to try it out and let me know
Putting it on the store is on my checklist once released.
I have some items on my list to investigate like, LOD, texture atlas support, greedy meshing, etc. I won’t promise that they will make it to the lib at some point, as I do not know yet how feasible they are.
But I definitely plan to improve or add stuff to Blocks. At the moment I’m improving the meshing algorithm to look ‘beyond’ the chunk boundaries. Now when 2 blocks are adjacent to each other, but are in different chunks, the face between them get’s rendered. This improvement will be in the next release of Blocks.
Apart from bug fixes, I expect that new features will mostly come from my own needs in small games or tech demos.
But I really do hope to receive input from people using it, things that work, things that don’t work, things that could be improved, … I guess it’s the same as with your particle library
I’m planning on releasing one more version of Blocks in the coming weeks before moving on to something new. This next version will probably contain some changes to the BlocksManager and Pager implementations. I’m also playing around with the rounded blocks concept, but I don’t know if this will make it in the next release.
Regarding theming, it might be a good idea to provide an automatic texture packing tool.
So rather than packing the top, side and bottom images into one image in an image editor, we can provide each texture separately and let the texture packer does this automatically using texture atlas.
(Note, I do not mean to pack these into a new image file to be exported to hard disk, I mean that we can register images separately into BlocksTheme builder so it can generate atlas at runtime. The benefit is we can, for example, reuse the side texture with different top textures and also we won’t need to deal with an external image editor tool )
Note, I am not sure if this would be feasible to do in JME, but anyway I hope you find the idea useful.
I love how this voxel engine looks, and therefore I would like to use it in my own project. My problem is that I don’t use Gradle. Is it possible for you to get a .jar version, or tell me how I could get one myself? I completely understand that this may be really annoying, but I would love to use this project!
Even if you don’t make a .jar version, still looks amazing!