I spent many years working on this game, the code feels like home to me. I thought I'd share a few things people might find interesting.
crashing
Later in development, when I got a crash I would investigate to see if I could probably ignore it in that part of the game (as well as fixing the error itself afterwards). For example, 'levelling up' is quite complicated and if something goes wrong there, it's a shame to end the run. It's more fun to level the hero up into a 'glitch' hero and continue the game. It doesn't really matter if something goes wrong in the player's favour- that just likely turns the last few fights of this run into a memorable cakewalk.
There are glitched failsafe version of Hero, Monster, Item, Modifier, Keyword. Sort of also Phase, Fight. Sometimes I can just notify the player that something went wrong and continue, other times I return a glitched entity when getting an entity of that type fails. The code side of this is simple, you can specify something special to happen when a type of error is encountered, though I don't think you're supposed to use this to blanket-ignore all errors!

tutorial
Tutorials are very boring to code and play. I dislike going through a handholding tutorial when trying out a game, it puts me off from the very start. And they ruin the game flow code; you write an elegant gameloop, but then you need 30 exceptions to it for various tutorial states. I eventually settled on a system I really like, and from watching people learn it seems pretty effective. Though maybe it only works because S&D is quite simple and I put a lot of effort into making it intuitive. Plus I have continued to develop it after release, so I got to improve the tutorial from watch streamers play through it.
The tutorial doesn't force you to do anything, it only suggests actions you haven't done yet. All that's required is building a tutorial UI widget, storing whether you have completed each tutorial action, and determining whether you can complete each tutorial action. For example, if you haven't used shields effectively yet, and you have rolled a shield side, it will show a checkbox for 'shielding incoming damage'.
controversial design
I think some of my designs are a bit bland and it's nice when things feel memorable or even shocking.
It's fun to see people encounter Hexia for the first time and exclaim how unfair it is, then likely win anyway. For Hexia, the two passives affect almost all teams greatly and the strength is adjusted to compensate. Though the fight has to be approached carefully and defeats many unprepared players.
Meddler is a bit silly, maybe I went too far or they should have been green. But they certainly spark a lot of heated discussion. Some people complain about being forced to use them, but the top players seem to think meddler is ok power-level wise at least.
comments