GamesXL


All things you thought to be impossible to do with Excel

Games

ShootemXL

ShootemXL - Multiplayer

  ShootemXL Database 
  (required for multiplayer version) 

TetrisXL

SnakeXL

MinesXL

Applications

BitmapXL

AsciiDrawXL  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 




Can you make Excel do this? 

Some years ago, I got challenged by my boss. He said, "Well Gijs, it seems you can make anything in Excel. I bet you couldn't make it run a game?" He was wrong, of course. The files you see on the right are the proof. 

Making the games required me to learn VBA for Excel quite effectively, as well as 3D spatial projection mathematics (for drawing the objects in ShootemXL) and Windows API's (for handling mouse input and screen output). Also, I got to decipher the bmp file format (for BitmapXL and later on, AsciiDrawXL). The most useful thing I learned, was how to implement DSN-less database connections within Excel (to enable the real-time multiplayer mode for ShootemXL)

I do have some goals, and that is where you come in. I really want to convert the ShootemXL games into the newer versions of Office (2003 and onwards). Also I would like to have the games run in Open Office. If you want to assist me, feel free to do so. Some of the code is password protected, but the password is 'xlgames', so that should not be much of a problem.

Please download them all if you like. But before running any game, read the paragraph at the bottom "Read this before downloading anything" to prevent data loss and other annoying things.

 




SnakeXL, TetrisXL, MinesXL

These games will run on almost any version of Excel (97 and higher). As they are the earliest games I made, they do not require a very low level use of the computer. Most of the code I created by recording macro's and then reading and changing the code they generated. 

The three games are all cell based, the formatting being handled with Excel's own conditional formatting: "If Cell A3 contains 1 then Cell A3 be blue", etc.. SnakeXL even has a hidden table to the right of the field, containing the locations of its body segments. Just select all cells to see the internals.

Tetris was somewhat more difficult, mostly because of the rotations. If you hold the rotation button, at some point this will raise an error. This is because I could not figure out how to calculate the location of the brick when it gets spinned constantly. Try to compare it with a fast spinning real brick inside a small box. It will bounce unpredictably. 

MinesXL required me to reinvent the 'flood fill'. When you select a non-mine area, the Windows Minesweeper will automatically clear out all adjacent fields that also have no mines or numbers.  I have used a very primitive recursion in the code for MinesXL. But hey, it works!

 

 


ShootemXL 

This was my first and last attempt to make a real game in Excel. I could have gone further, and get involved with DirectX and such, but I wanted to stay close to the Excel objects. Regrettably, this choice had a major downside. As Excel isn't primarily designed as a gaming platform, it does not deem the drawing of AutoShapes (which I used for the house, the gun and the world and almost everything else) very important. Therefore the house is the only substantial object in the world of this game. More objects are possible, but will cause a dramatic decrease in frame rate. No city guerilla maps for this game. 

The multiplayer game is exactly the same as the single player version. The only difference is that it requires a database to be saved in the same folder. The database stores and retrieves the location and status of each player. 

And as the hours pass, the sun draws langer shadows.  

 

BitmapXL and AsciiDrawXL

In this project I had to reduce the 16.8-million colors of the bitmaps to the mere 56 representative color swatches in the Excel palette with some self devised sorting algorithm. How to decide which color is most relevant also depends on the 'colouration'. Sometimes you need many nuances of a single colour, sometimes the color spectrum is much wider, which doesn't allow for many nuances per colour. I could not find a way to deduce this from the bitmaps themselves.

 

Todo (maybe with your help)

  • Fix ShootemXL for newer Office versions. It runs reasonably fast in Office 2000, but crawls in newer versions. 
  • Get the colour sorter in BitmapXL to deliver a better palette without asking the user which colour type to choose. 
  • Make all games and application run in Open Office  


Read this before downloading anything

All downloads you find here interact with your computer on a deep and profound level. Deeper and more profound than you might think, that is. Therefore , it is not advised to open any of these Excel files on a computer that doesn't meet these exact specifications:

Windows XP or Windows 2000
Microsoft Office 2000 (with or without any Service Pack)

If you are cunning enough to ignore this,  you might end up with the following situation: 

- The game runs in full screen mode, but doesn't respond to keystrokes
- Even after ending the game and restarting Excel, not a single Excel command bar is visible.

Problem solving
Whatever might go wrong, in all documented cases it got solved by restarting the exact same Excel file that caused the havoc, and then quitting it with the proper quit key, 'q'. This invokes the 'end program' sequence that restores Excel to its original glorious state.