Making Games with Excel

Published January 25, 2008 by Super Llama, posted by Myopic Rhino
Do you see issues with this article? Let us know.
Advertisement
You might be thinking: "Excel? Games? Impossible!"

The strange answer is this: Excel CAN make games. As far as I know, I am one of the first people to try to do such a thing, and it is surprisingly fun.

Ever since I discovered that you can use cell borders to make mazes, I fell in love with Excel and it's VB-based macro system. Now, I have created something you might like: a Maze Template for Excel (included XLS sample file)

It's not just a visual maze, it's a full-fledged GAME. First, open my XLS file. It includes all the actual code necessary, and a sample maze.

Now, use the Cell Border system to draw a maze and shade all the cells grey. Make sure the cells all use the Wingdings font in size 20 (this is necessary to display your character)

Now every cell that is NOT in the maze should have a solid white fillcolor (to hide the gridlines) and a solid white font color (to hide the codes). Do this now.

Next you have to make a place for the player to start. The first two cells contain this information. Cell A1 contains the Column number (not letter) of the start cell, and Cell B1 contains the row number. Shade this cell yellow and put a J in it. This will become a Smiley-face (if you used Wingdings like you were supposed to)

Now, before you finish, you need to add a finish cell. Shade this green, and make the text color green. Place an F in the finish cell. An alternative is to keep the text color black and place an F in an adjacent cell (one outside the maze). This is the technique used in the sample.

Now, if you want, you can add Teleporters to make it more interesting. Teleporter cells have either an R or a C in them, determining where to find the destination. If you put an R in the cell, the program looks to the first two cells in the same row as the teleporter for the destination. They are in the same format as the start location; two numbers indicating the location of the cell. If there is a C in the cell, the code looks for the destination location in the first two cells of the teleporter's column.

Another optional feature is lava or other hazards. To create a hazard, simply click the Bold button. All bold cells are considered hazards, and they will kill Mr. Smiley and make him say Ouch (hehe)

Once your maze is finished, click the Play button (the green > on black) and it will change to a pause button. You can move your character around with the arrow keys. When you're done, or you want to make changes to the maze, just click the pause button ( l l ) to stop playing and unlock the maze. Don't type anthing while the game is playing though! It transforms Mr. smiley into a strange symbol until you move again...

Eventually I will add more advanced things like:

  • Keys and Doors
  • Monsters and Weapons Keep your eye out for the Excel Maze API version 2!

    Look to the sample file for all the illustration you need.

    NOTE: In order to use the macro code from the sample file, you can either re-save the sample and change the maze around, or you can go to Tools -> Macro -> Visual Basic Editor, and copy the code for Sheet1 into your own XLS file. But remember, give me credit for the orginal code!

    Have fun makin' mazes! :)

Cancel Save
0 Likes 1 Comments

Comments

Alberth

Always fun to use a tool in a non-standard way 🙂

I cannot try your game as I don't have Excel, unfortunately.

As for “on of the first people", did you try a search for “excel maze game” ? You'll be surprised what people do with the program. You can also try “excel game”. Didn't do that myself, but it might give you more ideas.

April 27, 2024 06:56 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!

How to create simple maze games in Excel using its VB-based macro system

Advertisement
Advertisement
Advertisement