Blog Posts

Google Summer of Code 2016: Drools & Minecraft

Blog: Drools & jBPM Blog

Another successful Google Summer of Code program took place this year. We worked together with Samuel Richardson from the USA to get the first integration between the Drools Engine and the popular game engine Minecraft. The scope of the project was to experiment how Drools can be used to declaratively define a game’s logic. I initially thought about modelling point & click games such as Escape The Room, Monkey Island, Maniac Mansion, etc but after looking at how to work with Minecraft I’ve opened the concept to wider game definitions. 
gsoc
We worked with Sam into creating a generic game engine that will take the Rules Definitions and drive the game (the Minecraft Mods) . Sam created a couple of Minecraft MODs that provides a scenario for the game which interacts and delegate to Drools the game’s logic.
You can find the work for the Drools Game Engine here: https://github.com/salaboy/drools-game-engine
And the two mods projects here: https://github.com/youthfulIdealism/minecraft-horse-race-mod and
https://github.com/youthfulIdealism/minecraft-capture-flag-mod
These two games are using the rules described here:
https://github.com/Salaboy/drools-game-engine/blob/master/drools-game-engine-capture-flag-kjar/src/main/resources/rules/game/game-rules.drl
and here:
https://github.com/Salaboy/drools-game-engine/blob/master/drools-game-engine-horserace-kjar/src/main/resources/rules/game/gamerules.drl
We spent a lot of time in trying to get the separation right, so now you can consume the game server itself indepentendly of the UI. This opens up the doors so you can use the engine withoug Minecraft. For that reason we have created also a set of services that exposes the Game Engine via rest in case that you want to interact with it remotely.
You can take a look at the main GameSession interface which is in charge of defining how to create new game sessions and enables the UI to register callbacks so actions can be executed when the logic of the game says so.
https://github.com/Salaboy/drools-game-engine/blob/master/drools-game-engine-core-api/src/main/java/org/drools/game/core/api/GameSession.java
Because of this separation you will see that each game has its own test suite where both, the Rules and the GameSession API is tested to make sure that new games can be created and the rules are behaving as expected.
There is a lot of things to improve still, both in the Game Engine and in the MODs, so feel free to get in touch with us if you want to participate on the project. Hopefully we can build enough features to include it in the Drools Project.

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="https://www.businessprocessincubator.com/content/google-summer-of-code-2016-drools-minecraft/?feed=html" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples

BPMN.org

XPDL.org

×