Skip to content

Queues

Queues published on

This week continued the revisions on existing systems to support zone based movement. There were two “big things” this week. The first was revising the movement system itself to better support traps and battles. The old system worked on a tile-by-tile basis. The new system works on a point-to-point basis (Starting Zone->Point Between Zones->Point Between Zones->Ending zones), so step-by-step triggers didn’t really apply so much. I had to alter it fairly dramatically by giving it a master movement controller that directed the entities to stop on zone transitions when further processing is required (ie, for traps), and to cancel queued movement and stop at the nearest zone (for random battles). In general the system is better built now, even if I have to revert to tile-by-tile movement later. (Such is the code mantra of this project: it’s easier to spot bad code after the fact, so improve it the next time you have to touch it.)

The other big thing was that the central turn processor had devolved into a messy 200 line function glob of gunk (a single function was valid design choice when it started, but much less so after its responsibilities had grown), which made it rather difficult to add multiple moves per turn into. It was chopped up into distinct states, and I found several spots where bugs I hadn’t yet tracked down were almost certainly stemming from and were fixed just from the new design itself.

The next big thing on the horizon is adjusting the quest system for the new zone based movement. Tile walking distance no longer holds much meaning, so it’s mostly just the location finder that needs alteration, as well as the design of a few quests that called for multiple towns. Hopefully next week we can resume regular play testing.