Excel as a game data editor
Posted: Sun Dec 02, 2012 3:20 pm
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.
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.