These are projects posted by the students of Dr. Gove Allen at Brigham Young University. These students have taken one semester-long course on VBA and generally have had no prior programming experience

Thursday, April 14, 2011

Bomberman for Excel

Bomberman is a game where the player tries to navigate a labyrinth comprised of pillars and rocks. The player has the ability to place bombs that blow up the rocks and open up passage ways. Within the labyrinth there are enemies that are trying to get to the players location. If the enemies touch the player, the player dies. However, the player can lay bombs down to blow up the enemies. In order to win, the player must blow up all of the enemies.

I implemented my version of this game using an Excel worksheet. On the work sheet the playing field is laid out with pillars being gray squares, rocks being brown squares, the player as a green square, and enemies being red squares. The player navigates the playing field using the arrow keys and places a bomb by pressing the letter b. The bomb is activated and a timer starts as soon as the player leaves the square where he just placed the bomb. After two seconds the bomb “explodes” cause fire to extend out in all 4 directions, destroying any blocks or enemies in its path. The player, however, needs to be careful not to touch the fire or the enemies or he will die and it will be game over.

The player has the option to customize the playing field prior to starting the game. He can choose the number of rocks to be randomly placed on the playing field (from 25-150) and the number of enemies that will be randomly placed on the playing field (from 1-10). The game uses the Application.onTime event to trigger the movement of the enemies and the countdown on the bombs. This onTime event is one of the essential aspects of the game as it triggers nearly all action. The player also receives points based on the amount of time it took to kill all the enemies and points for the number of enemies killed.

No comments:

Post a Comment

Blog Archive