O'Reilly logo

Adventures in Minecraft by Martin O'Hanlon, David Whale

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

9781118946916-co0901.tif

YOU HAVE ARRIVED at your last big adventure! You will be using all the skills you have learned on your journey to create your own fully functional mini-game in Minecraft. You will realise just how versatile the Minecraft world is, as well as how you can achieve remarkable things just by using simple commands to get and set a block, and get and set the players’ positions.

You will also learn a new program skill and use threading to make your program do more than one thing at once.

This project can be extended in many ways, and once you’ve finished, it doesn’t mean you’re at the end of your adventure: instead, you will have arrived at the starting point for creating even more creative, sophisticated and challenging games.

A Game within a Game

The game you’re going to create here is called Crafty Crossing. The objective of the game is to collect diamonds and get to the other side of the arena before the timer runs out, all the time navigating past a series of pesky obstacles that are designed to slow you down.

You score points for each diamond you collect, and your points are then multiplied by the number of seconds left on the clock when your player reaches the other side.

To get across the arena in the shortest time possible, your player will need to jump onto a moving platform over a river, get under a wall that moves up and down, and avoid holes that randomly appear in the arena ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required