Saving the planet’s all very well, but it’s not always the most fun thing in the world. Games, however, are fun. Why not combine the two?
Luckily, AMEE can support both! One of our developer’s favourite games at the moment is Minecraft, which (amongst other things) involves using resources to make things, and quite often burning them to do so. Seems like it might be a good fit…
When you burn some wood in a furnace, the mod calls out to AMEEconnect to do a calculation, and adds the result to a tracker in-game. As the carbon ticks up, the environment gets more and more polluted as the skies go dark and the clouds come down. OK, not entirely accurate, but an effective visual indicator!
Of course, it’s not just wood. Loads of things burn, and not just in furnaces. The hack supports combustion of almost anything in Minecraft; wood, planks, coal, tree saplings, and so on. We even put in some calculations for setting fire to cows (as any Minecraft player knows, an effective way to quickly get cooked beef). Even the hostile mobs like creepers have their emissions mapped (mostly to generic food waste calculations). We also added redstone (like electricity) emissions using AMEE’s realtime UK national grid data.
Of course, there are also ways to remove carbon from the atmosphere. Plant a tree, and AMEEconnect will work out how much carbon was taken up by the tree growing and reduce the tracker by that amount. After a long day of mining and smelting, you’ll have to go plant a few trees to keep the weather nice.
The source code is available now, and a downloadable mod will be available in the near future, for those of you who want to have a play with it yourselves.
How it works
Using the decompiled Minecraft source code from the Minecraft Coder Pack, we add a bunch of new classes that map items and blocks in Minecraft to particular data items in AMEE. For instance, coal maps to the anthracite, residential data item in the IPCC stationary combustion category. Then, we insert a line of code into the Minecraft source that calls a release method when an item (or block, or entity) is burnt. We find the right mapping using the name of the item, and then use the AMEE Java SDK to perform the actual calculation, using something very similar to the Java code generated by AMEEdiscover.
The output of that calculation gets added to the total which lives in an Atmosphere class, and which has methods for things like cloud height, colour, and so on. Those are called at the appropriate points in the rendering process, again just by changing a couple of lines in the Minecraft source.