Home Creators Posts Import Register Favorites Logout

Content

Hey everyone! 🧑‍💻

Our posts are usually focused on visual assets and art direction, so this time we thought we'd mix things up a bit and tell you all about the behavior tree that went into Minos' Boss battle!

All of it was put together by our lead programmer, André Rufo, and programmer, Gustavo Maldonado, whose work we'll be showcasing in this post.

Wikipedia defines behavior tree as such:

A behavior tree is a structured visual modeling technique used in systems engineering and software engineering to represent system behavior. It utilizes a hierarchical tree diagram composed of nodes and connectors to illustrate control flow and system actions.

By replacing ambiguous natural language descriptions with standardized visual elements—such as boxes, arrows, and standard symbols—behavior trees improve clarity, reduce misinterpretation, and enhance understanding of complex systems.

In sum, this system allows us to structure the workings of Minos' behavior during her boss battle — but what does it look like? 🤔

It's essentially a diagram comprised of nodes. There's a START node from which stem other nodes, many of which containing questions as you can see above.

Every one of these question-nodes yields a TRUE or FALSE reply based on which Minos' behavior is defined. Depending on the subsequent answers to each of these questions, Minos will eventually reach different sub-graphs which contain their very own behavior trees.

From top to bottom, and following the logic of this tree:

After the start of the boss battle, and every time Minos finishes a particular action, she'll verify which phase she's currently on.

If the answer to the node “Boss in Intro?” is TRUE, for example, she'll run the Boss_Minos_Easy_INTRO subgraph.

Which is a very simple subgraph containing no questions — only actions.

Following this sequence, Minos will execute her attack which we've entitled "Spawn Enemies" and then wait for 2 seconds.

After these commands have been completed, Minos will leave this Boss_Minos_Easy_INTRO state — her Intro Phase — and run the main graph from the start once again, only this time exploring different subgraphs corresponding to the different phases of her boss battle.

You may be wondering why we decided to implement a boss battle in this manner... ☝️🤓

Because it's easier to adjust and fix on the go if we change our mind!

Taking the node “Execute Attack: Spawn Enemies”, for example, we can already tell it's made of two parts: the action and the variable.

Say we'd like her to use her beams in battle instead of summoning enemies. All we'd have to do would be to replace "Spawn Enemies" with "Judgement Beam" on this specific node and voilà — behavior changed! 🧑‍💻✨

This is the kind of flexibility that allows us to pivot whenever and however we'd like!

Back to the main graph, if the answer to the node "Boss in Intro?" is FALSE, the tree will lead us to a different graph: Boss_Minos_Easy_Phase_1.

Here Minos is presented with three possible routes which are randomized based on different "weights".

The truth about these graphs is that they're cyclical. Once Minos get to the end of the graph she'll start right over from the very beginning and, depending on which node "weighs heaviest" (or has the most chance of occurring) she will follow different routes, activate different nodes and, ultimately, have a more diverse and unpredictable attack pattern throughout the entire boss battle.

You can see right at the start of this last graph that two of these nodes have a 0.5 weight, while the middle node has a weight of 1. The middle one weighs the heaviest, which means it'll be more likely to be chosen.

With time, as Minos starts the graph over at the end of each cycle, nodes that have been previously chosen will weigh less and less, making it more likely for unused attack routes to be selected next.

This system can affect a lot of things. For example, in the number of bullets she will shoot next, how many times she'll move across the arena in-between attacks and so on!

The cool part about this behavior tree system is that you can re-use it as many times as you'd like during the same boss battle! ♻️✨

Right after picking one of the first three routes, which define Minos’ multiple movement patterns and bullet attack patterns, she will choose one of four different routes all of which have different attacks and/or attack combinations and different weight values.

This makes it so each route sports different combos with different probabilities and variables, further enhancing the random factor of it all.

This way, Minos will keep cycling through the same Phase 1 graph until her HP is depleted enough for her to enter Phase 2 — you can think of it as tiers or stages!

Before she enters Phase 2, Minos will enter her Intermission phase where she's invulnerable while preparing for the next stage.Her "Tail Coil" attack is what marks this Intermission and the beginning of Phase 2! ☝️🤓

When you do get to Phase 2, however, some of her attacks are upgraded to their Lvl 2 forms while other, brand-new attacks are introduced such as her "Tail Coil".

Eventually, Minos will reach her Final Phase when all of her HP has been depleted.

In this phase, she'll start blasting both her "Judgement Beam" and "TailCoil" attacks until the very end of this graph — this is the final bit where you have no choice but to survive! 🐍💥

The final node, "Boss Death" leads her to her final sprite animation and she is defeated.

The behavior tree is a simple way to organize attack patterns, but that's all it is — each of these nodes has a bunch of work behind them to make sure everything runs smoothly and that each attack is ready to go!

As for why the word "Easy" was used in these nodes, André has an explanation for that:

At this point you may ask yourself why the word “Easy” was included in every graph’s title. That's because we intended for the boss to have different difficulties at first!

Even though that could still be the case, we're not sure if that would result in new graphs or some other way to lower/raise difficulty. Either way, the "Easy" bit loses all meaning when there's only one difficulty.

But I think it’s funny that it’s there all the time, implying that you’re fighting the Easy version of the boss forever, as if her true power lays dormant…

We hope you enjoyed this more technical post and thank you so much for reading this far! 💖

Please let us know if you'd like to see more of these kinds of posts in the future and we'll be more than happy to reveal what's going on behind the scenes!

Files

Comments

totobops

learning more about the behavior workflow for minos' boss battle is so interesting, and i'd love to see more of this! whenever i am playing the demo, i'm always thinking about how the developers approached the software design process to make everything work together. having a sneak peek into how they structure the fight system is very cool!!!!!!!!!!!!!!!! thank you astralshift!!!!!!!!!!!!!!