Student project: Hive Master



This story is a part of Hive Students’ Projects Showcase, where students share their talents, endeavours, experiences, and projects. In these student written articles Hivers present their work, the challenges they might have faced and the learnings they gathered.



What?

In the past I’ve noticed that time and time again I’ve been drawn to explore what results you get through the combination of concepts that might not at first look like they are a good fit. And see what comes out. I imagine this has to do with my background in working as an actor and in the theatre. Theatre work often requires you to be very open and intuitive, to be able to infuse multiple layers of meaning into something and the ability to analyze situations and characters motives. One of my teachers when studying theatre once said: “Theatre is a pregnant picture”.

I feel this thinking can - and should - be applied to all areas where creativity is involved. I have learned that by doing this you often get very interesting and unexpected results. More than you put in.

Hive Master, a roguelike dungeon exploration game, follows in this vein. The game lets the player explore a dark mysterious dungeon, fight monsters of ever increasing difficulty and discover secrets and - to put it lightly - bizarre weapons and items.

On the surface the game looks like any roguelike style game with turn-based action, tile-based movement and randomly generated maps, but as you look more closely, there are some aspects and features that differ from similar games.


1imagehm


What makes Hive Master a bit different is that the data used to generate enemies and items is sourced from Hives intranet. In particular: data on students' study progress and their skill levels.

“The Hive Master dungeon is a dangerous place. Some say it goes on forever - others insist that the deepest level is 42 - but no one really knows.”

As the player ventures deeper into the dungeon the player will encounter enemies of increasing difficulty. The enemies roaming the dungeon are based on other students current progress in the Hive curriculum. The properties of the loot they drop when you “send them to do community service” is also derived from their skill level in a particular subject.


image skills [Slaying an opponent with these skills could give you an extremely powerful Notebook of Company Experience]


Knowing that, it is a good idea for the player to look up the real-world stats of the opponent before engaging in combat. Permadeath is naturally a feature in a game like Hive Master. You can of course start again from the beginning, but the only way to really advance in the game - and to be able to engage the most deadliest opponents - is to progress with your studies at Hive. Your character level and weapon depends entirely on your current cursus level and skills.


2imagehm [It looks like a watermelon but it’s actually a towel.]


Why?

I was interested in learning programming using Go and 42 Intra REST API and its authentication flow. I thought that a fun way to learn this was to make a game using these technologies.

I also felt that building a game without using an engine like eg. Unity would be a great learning experience.

Working with a game project would give me an opportunity to get familiar with programming patterns used in game development, useful algorithms and other concepts like how to deal with visibility and balancing gameplay.

In addition to the technical aspects I really liked the thought of creating something where there is a real-world connection that has influence on the outcome of the game. Reality augmenting the virtual.

How?

Before starting this project I had very little experience programming with Go or REST APIs. But having some experience making games I had some knowledge of what systems I needed to implement.

I acquainted myself with Oauth 2.0 authentication and even though there is the drawback here that requiring users to authenticate to play the game this limits the game to those only enrolled at the school but I felt this was a central aspect of the game, so I went ahead with this approach.

I used Pyxel, a pixel-art application, for working with the game art and Tiled to lay out the starting level (which is based on the actual floor-plan of Hive Helsinki). The rest of the dungeon is randomly generated for maximum replayability. Even though the dungeon generation algorithm is still somewhat naive you can still get some interesting results from it.

map

[Who wouldn't want to explore these?]

I used SDL2 for context creation, rendering and input handling. I chose this library as it is easy to get set up and easy to work with. There are Go bindings available and SDL2 supports all features needed for a 2D game in this style - and more.

Enemies use A* for pathfinding to roam around the map. The algorithm is straightforward to implement and works well for movement on a tile-based map.

Going forward

Hopefully during the coming months I’ll have time to work on the game and improve on many of its systems. As the game loop is blocked by player input (that’s as turn-based as it gets), animations aren't possible as is but that is something I definitely want to add later on.

I also want to explore different algorithms for dungeon generation to improve the basic system that is currently in the game. SDL2 also supports audio so getting some music and sound effects into the game is also one of my top priorities.

At this stage the game is in no way finished and is still very much a work in progress. By continued development I’m hoping to create a fun experience not only for the current students at Hive Helsinki, but also for future students. I imagine that in the coming years students will visit the dungeon of Hive Master and encounter legendary opponents based on Hive Helsinki students way back from 2020.