blast-554x368.png

Blast Off

8-10 yrs old

11-13 yrs old

Computer Science

Learn to code a Minecraft world in the style of the classic Bomberman game, fully implemented using coding (Makecode) in a 'Blocks of Grass' world

avatar Submitted By: Philip Golden

April 2, 2018

Skills

  • Citizenship
  • Critical Thinking
  • Project Based Learning

External References

Makecode suggested implementation

This shows a full implementation of the game, without the use of variables for width and height (at least initially I think the code is more readable)

Various web emulations in the style of the Bomberman arcade game

Try a few of these to get a feel for the original game. Note that the game play in Minecraft versions is quite different due to user perspective

Learning Objectives

  • 3D Co-ordinates: Co-ordinates are both fundamental to many Minecraft mini-games, and a key mathematical concept. This game involves manipulation of co-ordinates in all 3 dimensions, including a useful 'hollowing' technique that is widely adaptable in Minecraft
  • Variables: The basic solution does not use variables, however there two obvious places that variables can be used (width and height). Once the basic game is completed, students can examine not only where variables are useful, but also which variables should be paraeters for the command
  • Patterns: The co-ordinates for the layers of the arena follow a clear pattern, and recognising this makes the code much easier to both read and implement
  • Citizenship: Although the goal of the game is to blow up other players, it is important that there are clear rules to the game. Inventories are cleared for everyone, player vs player damage is turned off

Guiding Ideas

Note: This game is based on the style of the classic Bomberman! arcade game. Kids absolutely love it in my experience, however the theme of the game may not be considered appropriate by some. In this case suggested modifications could involve playing in creative mode with a destructible platform such that players fall through gaps.

The arena is created using code: a walled bedrock platform with an array of redstone torches underneath (versions of this basic idea can be found on various Minecraft sites). Each player is teleported to the center of the arena, and given only 64 blocks of TNT. When the TNT is placed in the arena, the proximity of the redstone torches will cause it to detonate, however the bedrock will be unaffected. The aim of the game is to blow up all other players on the platform to be the last survivor!

What should we consider when choosing the height of the arena? (e.g. the ability to see it from ground level vs making it high enough to prevent players jumping over the edge and surviving)

What should we consider when choosing the width of the arena? (e.g. blast radius of TNT, number of players)

Would it be useful to create variables for the height and width of the arena? Would this make the code easier to read? Would it make the code easier to change? Should we give both variables to the user as parameters?

Why is it a good idea to clear every players inventory before the game? If inventory was not cleared, can you think of useful blocks you could bring into the game?

Why is it a good idea to turn off player vs player damage?

Can you think of an alternative to Bedrock that would work for this game? Try experiments with other blocks, such as Obsidian and Diamond.

 

Student Activities

  • Open a 'Blocks of Grass' map, start code connection (command: /code), and open the MakeCode editor
  • Initially create a square platform of bedrock that is two blocks deep, twenty blocks each side, and at least 21 blocks from the ground
  • Now create a square of redstone torches in the layer below the bedrock that is one block deep, twenty blocks each side
  • Now create a square of air that is in the layer above the bedrock that is one block deep, 18 blocks each side (this 'hollows out' a layer of bedrock, creating walls for our arena)
  • Make sure that each players inventory is cleared when the game starts, and then give everyone 64 blocks of TNT
  • Set game mode to survival for all players, and teleport them to the centre of the arena
  • Ensure that player vs player damage is set to false
  • Invite other players into your world and challenge them to a game. Last player surviving wins!
  • Suggest/implement modifications to improve the game, e.g. obstacles, signposts explaining rules, scoring system etc.

Performance Expectations

  • Students should improve their understanding of 3D co-ordinates when creating the arena, in particular once one layer is built it should be much easier to figure out the co-ordinates of the other layers
  • Utility of variables should be explored and discussed, and students should appreciate the potential advantages in terms of both reading and modifying code
  • Issues of citizenship should be discussed and appreciated. Even in a game involving blowing players up, there are rules that are important to codify and follow

Skills

  • Citizenship
  • Critical Thinking
  • Project Based Learning

External References

Makecode suggested implementation

This shows a full implementation of the game, without the use of variables for width and height (at least initially I think the code is more readable)

Various web emulations in the style of the Bomberman arcade game

Try a few of these to get a feel for the original game. Note that the game play in Minecraft versions is quite different due to user perspective