macro language can be used in digital prototyping. By way of example, here’s an Excel file that recreates the action of The World’s Most Boring Tower Defense Game. This means it can be played as a turn-based strategy game (i.e., the player manually advances the turns by pressing a button) or as a real time strategy game (i.e., the turns advance automatically).
The World’s Most Boring Tower Defense Game is a web-based “game” that I use to demonstrate to my students how a video game’s “real time” action actually takes place over a series of discrete turns (what programmers call “ticks”). The game is also a useful example of what a digital prototype might entail.
You will need to enable macros in order to play the game (this mean it is unplayable in the Excel 2008 for Macs—that version of Excel does not allow Macros). If you run into trouble getting it to work, let me know—the code is a bit of a hack and I wouldn’t be surprised if it runs into problems in various versions of Excel.
In particular, the timer events that drive the sprite animation required jumping through some coding hoops. I wanted to use Excel’s VBA macro language’s “OnTime” event to cause the game sprite (the animated character) to move multiple times a second. Unfortunately, OnTime cannot respond faster than once per second in the Mac version of Excel. I got around this by using the Timer function, which returns the number of seconds since midnight. I use this to have the animation occur within a while-loop that pauses a specified number of milliseconds (more-or-less) as measured using Timer during each loop. Oddly, Microsoft’s documentation for Timer states that it will not return fractions of second on a Mac. But on my Mac it does, so I was able to get the animation to work. I’m not sure if the undocumented ability is due to a change in the Mac OS or in Excel itself, but it does work (at least, it does for me).
All that is to say, this Excel spreadsheet is a bit fragile and may not work for you. Caveat emptor!
Play The World’s Most Boring Tower Defense Game online
Download the Excel version of Boring TD
Leave a Reply
You must be logged in to post a comment.