The theme of the July project work was “Retail, Resize, Refactor”. As some of you may be aware, the first week of July contains a large holiday. Our family also dovetailed it with a birthday celebration for our daughter. As such, there was precious little time for work on BassRPG, but we still got some cool things done.
Resizing the application was way less work than I had anticipated. This is in part because a friend of mine kept suggesting I do the rescale as early as possible. Basically, the amount of work increases linearly in the number of rooms. We don’t have gobs and gobs of rooms yet, and I’ve been very careful to avoid absolute positioning of objects in everything but the room creator. The result is that rescaling rooms was a surprisingly small amount of work. It’s all done now. Above you can see the battle screen in the new scale (480p).
I’ve been tooling around on the shopping side of the equation as well this week. Above you can see the fruit of this labor. There was a non-trivial amount of work in setting up the game to have multiple shopkeepers with different inventories, and to switch between the party inventory for selling and the shopkeeper inventory for buying. Still, that all works. The issue is that you can’t actually buy and sell things yet, which brings us to our final point: refactoring.
I’m really unhappy without hand-offs between selection objects work. This comes up in a few places, like in combat when you use an item on a target, or cast a spell on a target. The action select menu has to create the item or skill select menu, and these have to create the target select menu. It’s doable, but it’s a hassle. I know I’m doing exactly the same sort of functionality with buying and selling items in the vendor screens, so I want to rethink this family of interactions and clean them up before I implement the final one.
Why do that if this is the last of these interactions? Well, BassRPG is sort of a tech-demo. It’s not that I don’t care about the game I’m making (I do!), it’s that I want to re-use the engine with a different skin and a different story once or twice more. It wouldn’t be hard to replace parts of the RPG piecemeal even- say a new magic system or different combat equations. So, I actually imagine I’ll be using the selector-creates-selector path a bunch in the future, and I want to clean it up now in anticipation of that. Beyond that, tidy code is easier to understand and debug, and I have a bad habit of setting aside the side projects I’m working on for days or weeks at a time so I can play some games or watch my kid or whatever.