weblog post is brought to you personally by Karen Cheng a System Manager about the Excel crew. present day publish, we'll demonstrate you how the arcade game Tower Defense was made in an Excel spreadsheet (see a video on the game currently being played right here). In this game,
Windows 7 Professional X86, creeps move toward your castle. You must defend it by placing towers which shoot at the creeps. The more creeps you kill, the more money you get to buy and upgrade your towers. you'll need - To download the game right here. install Excel 2010, hot off the press last week. You can get a free trial right here. The games use features that are new to Excel 2010, so they won't work in older versions. open the file to play,
Windows 7 Professional Key, don't forget to enable the macros. Also, if you get a circular reference warning, you need to enable iterative calc by setting “Enable iterative Calculation” in advanced options under File -> Options -> Formulas -> Enable Iterative Calculations. and General Gameplay your level and difficulty and clicking Play, the sport begins. Creeps come in "waves" of four. Each wave, they get stronger - They require stronger bullets to kill (strength), move faster (speed), and reward you with more cash once killed (worth). These stats are under the Creeps part in the menu. - To buy a tower, click on one on the towers about the right and then click around the map to place it. Towers come in two varieties - Basic and Advanced. Advanced towers are basically supercharged versions on the basic towers that shoot stronger bullets (Strength), faster bullets (Speed), and bullets that travel farther (Range). Clicking on a tower will present you these stats. Since a tower can only fire one bullet at a time, hitting the creeps at a closer range lets the tower shoot more bullets before the creep gets too far away. Range is shown by a heat map around the tower. you earn enough cash, you can upgrade your towers, which will increase their stats. Upgraded towers are represented by blue shading. - If a creep reaches your castle (which is represented by the flag), you lose a life. You get three lives. Engine game and you'll notice the animation from the creeps and bullets. You wouldn't be able to achieve this level of smooth animation if each cell simply represented a pixel, as in Missile Command. So how was this done? Bullets lies in a transparent scatter chart (two charts, technically, but that's more detail than we'll get into) that lays on top from the game screen. The creeps and bullets are points around the scatter plot, which constantly recalculates and refreshes. The bullets are represented by one series around the chart (the Xs) and the creeps are represented by a second series (the red diamonds). coordinates from the creeps and bullets are calculated via linear interpolation based on a number of factors (the map path, the location of the castle,
Windows 7 Product Key, and game's clock). go specifically into what each of these columns mean, but here's a peek into some with the stats used to calculate the position from the creeps. They are about the hidden worksheet, Calc. Path, Towers, and Castles path, towers, and castles are all drawn around the grid with conditional formatting. Below I've overlaid an image on the numbers behind the cells with the sport area. Below you can see that -1 represents the map path, -23 is a basic tower with two upgrades, etc. These numbers are constantly being recalculated as you play the game. conditional formatting rules behind the grid 2010, we've expanded your capability to create intricate and complex rules by allowing formula-based conditional formatting to reference other worksheets. Behind each cell is a formula that looks something like this: Data'!AE2=Calc,
Buy Windows 7 Starter!$D$6,'Fixed Data'!AE16=Calc!$C$5),
Windows 7 Enterprise Key,0,('Fixed Data'!AE2-Calc!$D$46)^2+('Fixed Data'!AE16-Calc!$D$45)^2)) won't go into what every piece of that formula does, we do want to draw attention to the references to two hidden worksheets, Fixed Data and Calc - cross-sheet references made possible in Excel 2010. If you're curious, unhide the sheets and check out the formulas behind the cells. The ones that generate the heat map of tower strength on mouse hover are the most interesting. Finally putting that Pythagorean Theorem you learned back in grade school to good use! Whistles you play the sport, you'll notice an animated line at the bottom, which displays the frame rate of your game. This is done with sparklines, a new feature in Excel 2010 that allows you to embed mini charts in a cell. sparklines weren't exactly designed to be animated, they can be animated with some clever spreadsheet engineering. The sparkline is based on a data range (Calc worksheet, C56:C85) which is constantly recalculated, creating the illusion of movement. you notice that when you chose the level and difficulty at the beginning on the game, you didn't have to go to a dropdown to do it? Instead you clicked on buttons in slicers, a new feature in Excel 2010 that allows you to quickly and visually interact with your data. of course - no game would be legitimate without staying available in multiple languages. final note thing about this spreadsheet is how little macros were used. For the most part, macros are only getting used to start/stop the sport and keep track of mouse movements and clicks. Everything else is pure Excel: the calculation engine, conditional formatting, and two new features to Excel 2010 - sparklines and slicers.