I Recently delivered my thesis project entitled
Procedural Content Generation on a MOBA genre videogame and now it's time to share it with the world!
As the title says, the project involved the creation of a MOBA prototype game that uses Procedural Content Generation (PCG). The 2 major features are a map generated procedurally before starting the game, and a system that modifies the characters attributes according to the player's play style.
NOTE: You need to have a basic knowledge about how a MOBA works (games like Dota 2 and League of Legends) in order to fully understand this work.
For the sake of keeping this post short, I will give a brief explanation on how is the map generated and how the Character Adaptation System works. If you are interested in a more detailed version please visit my blog
post.
Map GenerationFor the map generation I started defining a set of design rules that would be used for the algorithm that would generate the map. The focus of the map generator lies on generating a map that is balanced for both teams, which guarantees that there won't be unfair advantages regarding the topology.
These rules are mostly related to how the jungle's paths are made and how they allow the players to traverse the map (this is because jungles cover a big % of the map and I wanted to avoid overscoping the project by also bringing into the equation the lanes). The generator looks for a map containing jungles that at least contain these paths:
- Side lane outer turret -> approx 1/3 of the river
- approx 1/3 of the river -> center of the mid lane
- center of the mid lane -> side lane outer turret
Having defined these rules, I implemented a genetic algorithm using the Multi-Objective Evolutive Algorithm approach, which basically consists of using multiple fitness functions to evaluate each candidate. I used a fitness function to evaluate if the paths described before are present in each of the 4 jungles on the map, and another fitness function that determined if the difference of the amount of camps on each side of the map exceeded certain threshold.
The candidate maps are created from scratch, creating all the components of the map so that it's similar to Dota 2's. Since the jungles are the places where the real changes are made on the map, they are generated using a fractal function (using the Accidental Noise Library) to make them as random as possible and then the roads they contain are evaluated using BFS functions.
You can read more about this in
Part 2Character Adaptation SystemIn a traditional MOBA, characters follow the common RPG character paradigm, which consists of having a character composed by a set of attributes, abilities and a level that defines how strong the character is. The Character Adaptation System changes this paradigm by eliminating the level and making the progression of a character continuous.
The progression of a character is no longer limited to gaining enough experience to reach that level-up threshold. Instead, every action performed by a player during combat affects directly their character's attributes, increasing the character's capacities constantly.
Example: If a player likes to play defensively, it's expected that they will act in this way during combat. They will probably be using a shield a lot or even blocking damage for their allies. The system will interpret these actions and then after leaving combat will give the player attribute bonuses that will let them be more effective playing defensively as the game progresses.
The way this is done is by queuing the actions performed by the player during combat, and then after leaving combat this queue is analyzed to determine the intentions the player had, how effective they were and finally what bonuses should be applied to encourage this kind of play style.
You can read more about this system in
Part 3.
If you have any questions regarding anything I said or didn't say please ask away! I'm doing my best to condensate a lot of information and I know it may be confusing because of this
.
Anyways, thanks a lot for reading!