Is it necessary to understand how the Blocks source works to use it?


Recently I’ve wanted to make a voxel world (similar to MineCraft) but I have nowhere near the knowledge to do so. I landed upon Blocks and I understand about everything but on a very high level(abstracted). I have no idea how some of the stuff works( I don’t understand the implementation) similar to how I don’t know the implementation of a Geometer or a Node (how they are rendered, created, etc…) Will this create big problems in the future for me when working with blocks? Or does Blocks already cover most of the stuff for me? Should I take some time and study through all the source(and do weeks of research) or dive in?

Reading Blocks wiki page and taking a look at tests should be enough for one to use that library.

Also, the code base is not huge and is well documented, I think it took me a day or two to get a grasp of how things work.

These are JME stuff and not Blocks specific. You should know what is scene graph, spatial, node, geometry,…

If you want to use custom shapes in Blocks, then you should know how a Mesh is constructed and what are the vertex buffers,… these are kind of advanced stuff. You can read the Custom Mesh Shape for more info.

I would recommend reading SceneGraph docs and also beginner guides.

This was just my opinion, maybe Blocks library’s author can give you more advice.


Hi and thank you,

Yes, what I sort of ment is that, similar to how I’m not sure how a geometery /material is rendered(using OpenGL calls or something) sometimes I’m not exactly sure how the BlockRegistry works, ThreadPool, ect… Currently I’m not exactly sure what the repository parameter is for one of the ChunkManager… and many small things like that which fly over my head. I have no where near the knowledge to create a voxel library from scratch, and so understanding Blocks seems difficult (it uses other libraries such as Caffiene and Lemur which I never touched, I see in the source code, but I don’t think I need to know those and only need to mess around with some stuff)

Do not stress yourself with that stuff. You do not need to know how OpenGL works to use JME or Blocks. I myself do not know either, that is why I am using JME as it abstracts all those stuff for me. The same goes for Blocks library, it does all the hard stuff for you. It already does threading, paging, caching, mesh generating,… for you.

Caffeine is a caching library used by Blocks and you do not need to know how does it work.

Lemur is a GUI library for JME. It is used in examples for building GUI panels and input handling.

You can just clone the library and try to run some of the examples. And If you do not understand something in the examples you can ask it.

1 Like

Thanks for the response! Yes, that explains a lot more to me… I’ll first look through the examples and then maybe lemur if necessary…

You are welcome.

Yes, I would recommend to learn Lemur as you most probably going to need a GUI toolkit for your game anyway and Lemur is such a cool one.

You definitely want to go through the scene graph and math tutorials.

They’re not so much JME specific as basic game information that relates to virtually everything you do in any engine you use.

If you really want to learn you can read the nature of code. Highly recommended.

But the short of it is software development in general is a never ending learning process that becomes easier as you understand mathematics over time.

1 Like

Thanks! I’m a bit confused on how to install Blocks framework tho, I don’t have a build.gradle file( I only have build.xml file) and my installation is just from the SDK

Bottom left has the build option, maven is showing.

The JME 3.2 IDE comes with Ant build tools installed, but not Gradle.

In order to build a Gradle project in a JME 3.2 IDE, you must first install the “Gradle Support” plugin. Download and install it using the Plugins dialog in the IDE (Menu bar → “Tools” → “Plugins”).

You will need this to understand that.

Hi and thank you,

I just installed Gradle Support and did an Alt Shit O for build.gradle and nothing acme up. Where is the file located? I will read the gradle wiki/docs after I get it installed.

Simple, but I want to check, It sounds to me like you don’t yet have a Gradle project.
Just because you installed Gradle doesn’t mean you’ve created a Gradle project.
You must create a new project that uses Gradle as the build tool and then you’ll have a build.gradle

If you run into any problems using Blocks, don’t hesitate and post them here on the hub.

The wiki of Blocks is still a work in progress so if anything is missing or unclear let me know and I’ll edit it in.

Hi and thanks,

Yes, Mike, it seems I forgot to do so… I made a new gradle project however it still does not seem to work, as I get an error (described below).

I have ran .\gradlew build on Heart Library (as well as maven push to local), .\gradlew build on Stephen Gold’s physics library, and also your Blocks library (all in their folders in powershell) and all said “Build Sucessful”

I added the following code to my build.gradle

repositories {
    maven {
        url  '' 
dependencies {
    compile 'com.github.stephengold:Heart:5.5.0'
    compile 'com.github.stephengold:Minie:1.7.0'
    compile 'com.rvandoosselaer:blocks:1.5.1'

And I changed the gradle wrapper properties in Blocks to be gradle 6.3 (6.2 not work).

However, when I click clean and build, I get the following error:

Build failure (see the Notifications window for stacktrace): gradle clean build
Executing: gradle clean build
Arguments: [-c, C:\Users\myusername\Documents\MonkeyGame\settings.gradle]

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\myusername\Documents\MonkeyGame\build.gradle' line: 19

* What went wrong:
A problem occurred evaluating root project 'MonkeyGame'.
> Could not find method compile() for arguments [com.github.stephengold:Heart:5.5.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at


Build failure (see the Notifications window for stacktrace): gradle clean build

I have never used gradle and have no idea about how to combat such. Thanks much in advance.

Stacktrace in notifications:

Can you show the full build.gradle file?
Showing the full file is often very useful

Also, if you have not already, you should try @sgold’s jME gradle project template.

1 Like

build.gradle - is the build.gradle file

EDIT: I added the apply java from what I found online (it’s not there by default) and it seems to fix it, but I’m not sure if I’m suppose to do that

Since you are using Gradle for a Java project, applying the Java plugin was a step in the right direction :+1:

Alright, I think it works then. I’m attempting to use the BlockConfig from Blocks framework but it doesn’t recognize it. I started afresh with basic game on gradle (from SGold) and added the dependicies/compile. I clicked ctrl shift i (auto import) though nothing came up. Is there anything more I must do to get the libraries?

Since what you are speaking of is Blocks related, I’d reference @remy_vd.