Moba Engine

This project was an 8 week project in which we created a custom engine for a moba game.  For this project I worked as a gameplay programmer on both server and client side of the engine, using the networking solution entitas.

I also implemented basic functionality for FMOD into engine.

Entitas is a data oriented, Entity component System. These components are used to group objects, mark/flag them, or to store data. This provides fast lookip and collection of entities and an easy structure to react on them.

It works as a triggered system, allowing a programmer to create code that triggers when a component is replaced, added, or removed.

Here a component is replaced when the player clicks where to move. The server then reacts to this replaced component and changes the target location where the player is moving.

Since Entitas is an ECS, it doesn’t have classes in the general sense, which can be anoying at times. An example of this is on the server side, where minions were spawned.

This image shows teh creation of a player. After creating a new entity on the network for that player, every component has to be added. This generally means that for each variable, or each group of variables, a component had to be created. And though its possible to create a component that holds multiple variables, this means that every time you want to change one of those variables, you have to replace the entire component.

All in all it is a well working networking solution for a moba type game, if our team hadn’t made an oversight at the start. The team decided to keep the client side of the engine, seperate and object oriented. This meant that any comunication between the server and client side was very complicated, since the client part of the engine wasn’t actually propperly linked with entitas.

This led to some creative problem solving when attempting to update the list of players or minions in a game.

To get around this, I created a component on the server side that holds the amount of players currently connected, and on the client side as well. When there is a missmatch between these two numbers, i loop through lists of players (client and server side), and fix the missmatches.

Though this project had a lot of issues, it was a great learning experience in working on a game with networking and an ECS.