Ok, three things I bet you never thought you would hear together, Azure API Management, Azure Service Bus, and Minecraft. I’ll give you a minute to get over the WTF which I’m sure is going through your head about now but let’s see how we can use Microsoft Azure to do some cool stuff in Minecraft.
I know a little bit about Minecraft but compared to AJ (my 9-year-old son who is an expert) I know very little. Our conversations seem to revolve around hytale vs minecraft and which is better, but in reality, I don’t know much about either and he seems to be a whizz. There are various mods out there with free downloads, a variety of platforms, etc. that Minecraft players can access, and I have no doubt that my son knows about practically all of them as they are free to download from modmenuz.com, however, I still have some learning to do. The other day he wanted some help on Minecraft and I saw the below picture.
I was curious and he said “Oh im trying to build a door that you can only get in if you know the password but i need some help with the code”. I was pretty impressed at the way he had been playing with a mod for minecraft called ComputerCraft which lets you add various computer shapes to your world and then do cool stuff with them by connecting the parts and running code in them. When we were working on the sample I discovered that there was an http object available and this got me wondering what we might be able to do. I suggested to AJ that rather than just build a password which is inline and “easy to hack” why dont we pretend its a small office for a real company and use their proper security system to check if the characters are allowed access.
You can also connect to a minecraft server and play with friends, if you would like to learn more about minecraft and minecraft server hosting, you can learn more by visiting websites such as ggservers.com. Minecraft is a great game to play on your own and my little boy loves it!!! Playing with other players though is sooo much more fun!
The architecture we would try to build looks like the below diagram.
The key thing I guess from a Minecraft perspective is that if you can call a REST API then you can open up a lot of possibilities for external extensions to the game where you can put your complex code out on the web and just hook into it. What was pretty cool about this particular scenario is it took < 1 day to do the scenario. That really shows the power and speed of delivery that Azure offers you for these hybrid integration and API scenarios but from an interoperability perspective if a 9 year old can call it from Minecraft then it should be call able by most people. Im not sure how relevant the scenario above is in the real world, but maybe as Minecraft evolves in the future it might become relevant that organisations build stuff in public Minecraft worlds and allow the public to come into their buildings. I know there is a project attempting to build the British Museum in Minecraft so imagine if in the Minecraft British Museum you might want to build rooms that are for staff only so perhaps you could add a protected door like this so only people who authenticate with their credentials can access these private rooms. We all know integration is changing so fast these days so who is to say something like this might not be a relevant integration use case at some point in the future.
Walk Through
Rather than a long winded walk through I have created a video which will walk you through this scenario.
Code Sample
The code we used in Minecraft is shown below.
[snippet id=”454″ title=”Minecraft call API” height=”0″ line_numbers=”true”]
Links
[…] A nice example is : Azure API Management + Azure Service Bus + Minecraft […]