Page 1 of 1

Excel as a game data editor

Posted: Sun Dec 02, 2012 3:20 pm
by Cayle
Has anyone ever used Excel as an editor for their game data?

I wanted to make some test data for my Google App Engine based alternate reality game for testing some really basic aspects of my game engine. Specifically, do geo-located mobs correctly follow the detection rules for determining whether or not they are aware of each other? After spending a couple of hours penning the permutations that I want to test, I ended up with a hundred and thirty different mobs, each tasked with an individual test case.

Coding the entities by hand in python is not going to go well! I've got a fairly complex object model, with large numbers of models (db.Model is a python class in the GAE for defining, well, models) and many, many cross references in 0:n, 1:n and n:n relationships. So I struck on an idea, a wonderful, awful idea. I’d use an Excel spreadsheet as the editor for my data. Initially, I’d wanted to use an MySQL database, but after hand editing the schema statements for some of the 50 tables that I’d need, I installed Oracle’s ODBC driver and linked them to Excel. Reading is perfect… but… crap, there is no writeback. Hand editing the data in SQL does not gain me anything, relative to hand editing the entities in Python code, so I've set out on another approach.

I do also have some special logic for handling references in most cases, so it would not simply be a case of 1:1 SQL to GAE conversion. There will be (is) transformation code. So I’m working on a databaseless, VBA/C# “app” for creating my game’s data (a VSTO Excel Workbook application with C# ribbon methods wrapping VBA). It is not so different than using an SQL database, but completely self contained. This should be interesting.

Re: Excel as a game data editor

Posted: Sun Dec 02, 2012 6:09 pm
by vitinho444
Well, i don't know if you are referring to data like non-database but as reference for the game itself.

I use it for data about the enemies per example:

Name | Health | Range | Speed
etc..

It's good thanks to cells and columns to organize all sorts of info.
But for database purposes nop, i do not use it, just reference and brainstorm.

Re: Excel as a game data editor

Posted: Sun Dec 02, 2012 9:32 pm
by Cayle
No, I'm not using it as a database for runtime. I'm using the google app engine for that. The GAE is non-relational and uses an object database, so using a database, or an Excel workbook in a database-like way is simply a design time aid.

I do find it interesting however, that when designing heavily data driven apps and games, perhaps we should look a little closer that that ubiquitous thing on everyone's computer. It's actually really, really, powerful.

Re: Excel as a game data editor

Posted: Sun Dec 02, 2012 10:24 pm
by Jackolantern
I guess I am not clear on everything here. What advantage does Excel give in this example over a relational database? My understanding is that when you are using Excel as a data target, you are basically just writing a CSV flat file.

Re: Excel as a game data editor

Posted: Mon Dec 03, 2012 6:53 am
by Cayle
My runtime is on the google app engine, which uses an object database, not a relational one. So using SQL in the design time only makes sense if it saves me time during the design time. In any case, I have to use an export script to generate .py files from the stored data. I decided that I'd have less overhead by storing my design time data directly . Yeah, if there were multiple people editing it and if it got to a certain size, I'd be better off with a relational database backend, but I can cross that bridge later. For now, I wanted to get my editor environment up and running quickly.

Whether you use Excel or not as your editor environment, bears no relationship on whether or not you store your data in SQL. If your runtime is using a relational database, then by all means, edit your database directly, using either Excel, or some form app. With Excel as editor, you gain all the Excel goodies, such as conditional formatting, complex data validation rules, macros and formulas. You can fill a cell with completely formula generated values, or - as in my case - catch the on edit event and then update cells in a different table, based on what you've got.