[W5] Procedural Maps and Replicated Attack & Health


Procedural Maps with Wave Function Collapse!

Our game wouldn't really be a rogue-like without procedural maps, would it? That's why we've been experimenting with something called «wave function collapse».

If this sounds like something a physicist would say, it's because the concept was coined by them! In quantum mechanics, as long as a system isn't interacting with its surroundings, it can exist in a superposition of many possible states. This is described by a wave function. Once the system is observed, its wave function collapses, forcing the system to adopt a specific state out of all the possible ones.

This idea was recently adapted by computer scientists to procedurally generate realistic and non-repetitive environments in simulations and video games!

In essence, the algorithm starts with a seed pattern and iteratively «collapses» the probabilities of neighbouring tiles, making sure that the state they assume is compatible with the state of their neighbours. This process continues until the map is complete.

This algorithm is very versatile, and can be customised to include «pre-collapsed» areas to ensure that certain elements always appear in the map in specific places.

The following video shows a map being generated by this cool technique.

This feature is still experimental, so it hasn't been included in the game yet. But we really wanted to show the progress so far :P We expect to use it in the game soon™.

Replicated Attack and Health

The heroes in our game will explore mob-infested levels in search of the bosses who shroud the world in terror. We wouldn't send these brave adventurers unarmed, we aren't sadists!

So we've implemented a simple frontal sweep attack with a dramatic woosh animation. Before setting out on their quest though, the heroes need to train! So they've mostly been sparring with each other.

Below you can see footage of one of their usual combat sessions.

As you may have noticed, they take their training very seriously and they actually inflict damage to each other! (true spartan training right there). You can see their health bars depleting when they are hit by an opponent.

The attack is controlled by the left mouse button. When the player clicks and holds, a crosshair is shown to indicate where the hit will land. While holding, the player can move the mouse around to aim. The attack is launched when the click is released.

Files

build_230415.exe 65 MB
Apr 15, 2023

Get Project Bounty Hunters

Leave a comment

Log in with itch.io to leave a comment.