Controlling Chaos

The fifth level is almost done! All that’s left is the bosses, which I started fixing up near the end of the week. One of them is our good old pal the Segment Slider, who I re-worked yet again. I’ll get into that, as well as the controlled randomness in Bleed 2.

 

First, the Slider: I don’t know what I was thinking, but when I last re-worked it I gave it a bunch of attacks that really sucked. They took a long time to perform and didn’t give you any opportunity to damage the Slider, so it was just… dead space in the fight.

Like, look at this. Booorrriiinnng.

I re-worked them all (of course I did!) Now every attack happens quickly and gives you a chance to damage the Slider if you’re good enough!

The player has a more active role in the fight!

 

So that’s nice, but here’s where things get ranty (and random.) The Slider has a number of actions available to it, and at the end of each action it randomly selects a new one. If it was as simple as that, though, it could lead to some really annoying boss fights, since it’s fairly common for the AI to randomly select the same action a whole bunch of times in a row.

What I do is store the actions the boss has recently taken. Every time the boss chooses a new action, it checks through the history to see if it’s over-using one (it can do the same move up to twice in a row, but after that I consider an action “overused”.) Overused actions can’t be chosen.

 

Back to the Slider: I also improved the way it moves. Before it had a couple pre-set patterns.

It was okay, but felt a little stale before long. Now, it has a more general move behaviours — it can move segments one at a time, or in groups. Each complete move of the Slider is divided in two, and each half-move can use a different move type (or the same move type, if that’s chosen.)

The segment speed has a little variance now, and the core gets to do some shooting.

On top of that, there are special move behaviours it can throw in randomly to mess with you, like moving one segment slower than the rest, or recalling spent segments.

It results in many combinations made from a small set of actions!

 

I ended up imposing a lot more rules on the randomness because of this.

  • The pair of move types that make up each complete Slider move are randomly chosen, but their history is tracked as well to make sure they aren’t over-used, either.
  • The boss fight is more about the sliding segments than its other attacks (like the cannons firing shown above), so the Slider must do at least one moving attack (but no more than two) between each non-moving attack.
  • To make sure things are fair and engaging, special rules are used to determine which segments are chosen to move. For example, if the Slider knows it’s going to move some segments and then recall them, it has to choose at least one segment that will hit a player on the ground (to ensure it poses a threat) and one that exposes the core (so you have a chance to hurt the boss during the attack.)
  • Finally, the old move behaviour was using special rules too, but you’ll notice it was being controlled too tightly — no two touching segments were allowed to move one after another, and it’s part of what made the fight feel stale and predictable to me. You can definitely go too far with this stuff.

I won’t bore you with any more! I think a bit of randomness adds a lot of fun to the game and keeps you on your toes, but there are many ways it can turn out boring or just be unfair. So there’s a glimpse at some of the things you have to consider if you go down the route of randomness!