Looking at the preliminary material the first thing I noticed is that we have an array which goes just beyond the two dimensions that we’re used to. Hex Baron uses hex agonal tiles which may at first look confusing however if you look at the X&Y coordinates they could just as easily be in squares to create a standard 2 dimensional array. The Z coordinate tells us how many tiles upwards we could go in order to create a 3 dimensional terrain .
The index simply tells us where in a 1 dimensional list the tile data would appear.
Our next task would be to see if this game relates to anything that we might be able to visualise as a similar game. Bear in mind that the exam board is not allowed to use anything which might be considered Copyright. Previous skeleton codes have included more obvious links such as the skeleton code named ‘AQA with Friends’ which was a simplification of the Scrabble game Words with Friends . In this instance, I am detecting a very clear Minecraft theme!
If you’re not already familiar with minecraft, now is a good time to find out howe the basic blocks work (don’t worry – the skeleton code won’t be as complex, but there may be some clues for the potential questions!).
There are five commands available to us including moving, upgrading, spawning, sawing, and digging – Each of these actions are linked to a particular type of tile. We are told that each tile has an ID and a number of other attributes suggesting before we even look at the code that we are going to need to understand how classes and objects work. This also suggests that there will be a link to inheritance within the object-oriented languages that we use.
Our first task is to identify the different classes within the code and any inheritance that happens within them. Open up your skeleton code and make a list of all of the classes and whether they inherit from another class. Use this to draw a class diagram of the skeleton code. For now, don’t worry too much about the attributes or methods as we will add these in later.