I am really excited about this (and not only because it means I am going to get an Xbox 360 for FREE). I think this will help show just how powerful Excel Services is going to be.
So what exactly does Excel have to do with Xbox 360 you ask? Good question. Apparently our PMs have been hard at work discussing with various partners about what they want out of Excel Services. One of the things that kept coming up from the Xbox 360 partners is the immense hardships in coding various AI algorithms into the games. There was a multitude of issues partners were having – the two most common ones (from the partners polled) were:
You can look at the second problem as the extension of the first – if good AI was not that hard to write, there would be less fixes needed, less money spent, more money in the bottom line.
And so we have worked hard with the Xbox guys to solve these and other problems. On the second half of 06, we will be supplying a web-service proxy for integrating the Excel Services exposed by the Microsoft Office Sharepoint Server with the Xbox 360. The code name for the SDK is currently GROSS (Game Robustness with Office Sharepoint Services) and it will be distributed with the Aug. 2006 MSDN (if everything goes according to plan).
It is very simple – Excel is probably one of the most commonly used tool with which to express mathematical algorithms. The game designers will use it to express game-related algorithms. The workbook will then be used during the game (via Excel Services) to make calculations that will determine the next stage.
And here’s the beautiful part. If there’s a problem with an algorithm, all the designers need to do is swap the workbook with a fixed one on the server and WHAM! The new algorithm will take effect and be used by the game.
Of course, I was talking about AI, but that’s not the only thing Excel Services will be useful for. You could use it for dialog scripts, for character stats calculation (for RPG type games), for behavioral algorithms and for many other things.
Because Excel Services automatically grabs new workbooks that are placed in its Trusted Locations, we expect people to use this mechanism in two ways:
One of the most interesting parts of an action game is how the various non-player characters (NPCs) behave. In a lot of cases, this can make or break the game.
In this example, I will show a workbook that supplies the behavior pattern of an NPC when faced with potential enemies. It is important to note that I am keeping the example simple for brevity sake – we expect people to have far more complex workbooks in real-world games.
The workbook has two parts to it – a range of cells corresponding to the game world and a single cell that will contain the behavior prescribed:
As you can see, in this example, the developer needs to make a call to fill the colored area with information about the game world – in this case, place a “1” in each cell where an enemy exists. Once set, Excel will recalculate the workbook and reach a decision – what’s the most dangerous direction. The game will then read that result and cause the NPC to move there. In our case, since the least dangerous direction is south – that’s where our NPC should go.
The following is sample code that will show how to use the workbook:
private void GetMostDangerousDirection()
using (ES.ExcelService excelService = new ES.ExcelService())
excelService.Credentials = System.Net.CredentialCache.DefaultCredentials;
string sessionId = excelService.OpenWorkbook(
String.Empty, String.Empty, out stati);
object range = new object;
for (int row = 0; row < range.Length; row++)
range[row] = new object;
foreach (Enemy enemy in GetEnemies())
Point pos = enemy.GetNormalizedPosition(7, 9);
if (range[pos.Y][pos.X] == null)
range[pos.Y][pos.X] = 1;
range[pos.Y][pos.X] = (int)range[pos.Y][pos.X] + 1;
string dangerousDirection = excelService.GetCellA1(sessionId, "",
As you can see, we are setting up the world by getting each enemy and placing it in its correct location. We then go and call again into Excel Services to get the least dangerous location.
Another good example is an MMORPG game – in those, there are only three really important things:
Here’s an example of a workbook you can use to help with determining how much damage a weapon does:
In this case, you would fill all the cells with the status of the character being hit (on the left) and the one hitting (on the right) and get the result of the damage in the bottom cell:
Excel Services is going to be a very important part of future Xbox 360 games. Here in the team, we are eager to see what crazy usages game developers are going to come up with for it.