While waiting for Jesse to finish up his part of Solar Trader, I’ve been reworking Pits of Seth for a long-needed update. Already, I’ve added sounds, better damage controls, and dungeon “area” to give it a more lived-in feel.
But what is most striking is my sloppy code the first time around. This was my first game in excel, and I was still learning as I was doing. Most of the dungeon creation was done with cascading tables – really quite interesting (even beautiful) in a way. But I was still learning VBA – just looking stuff up on the net as I needed it, and doing most of my processing in the cells.
Funny the things I don’t have, like a function to go out and fetch things I need – I’d always pump out a long-winded formula to get it direct. Tedious. So now I’m adding those (as I need to modify the dungeon before the player goes in to add those ‘areas’ I spoke of). Overall, there are a lot of things I’d do different – more code, less cell-processing – if I did it again.
But I don’t know if I ever will – POS is a friendly fun little game, and after these changes, it will be about as good as I can make it.
But we’ll see…
I’m not an atypical Computer coder. I don’t plan it out than write the code. I code off the top of my head, see if it works, revise. My first three versions of a scenario usually don’t last a week. The other problem is the tradeoff between on sheet formulas versus VBA. Leave a formula on sheet? Code the formula then range value the cell? Inputboxes? Messageboxes? Userforms? Error trapping in GAMES? It ain’t easy and adding creativity and entertainment value, good luck!
I’ll agree with you there. A lot of this stuff I write on the fly, just whatever gets the job done. In that regard, I use the spreadsheets for (a) recording game data and (b) doing some of the processing flow. I really should be more methodical on how I do this – come up with guidelines – but often its whatever works.
Pits was a first attempt at a game and some of it is very crazy. Under the ‘map’ tab, you can kind of see how I build the dungeon. First, stairs down (with each level below randomizing stairs down and up). Then blocks, then rooms, then random passageway bits. It works, but now that I want to change it, I find my cells locked in (pretty much) since I don’t want to try to find out where I hooked into the cells from the VBA. In this case, for POS2, I’m taking the final dungeon and rewriting on the fly.
Each game gets a little better. Maybe when I’ve written my tenth, my code will actually be presentable… 🙂