Nuclear

As an assignment at university, we were tasked to create a game. We were thinking of a nuclear facility that had a meltdown. You need to go in and clean the building from all the mutants.

I was responsable for the weapon handling and the level generation.
The weapons are laying on the ground and when you pick one up, it replaces the allocated spot in your inventory. When it is empty, it fills it. When you already own that weapon, it will only pick up the ammo.

Step 1 Step 2

Generation

The first thing the generator does, is adding rooms. It will pick a random spot on the grid and try to place a room. If it is successful, it will continue to do this. If another room is placed inside an already existing room, it will not be placed. A room will contain a bunch of nodes to indicate where the generator needs to place a floor, wall, entrance, etc.

Step 1 Step 2

When multiple rooms have been created, we need to fill the void. In our generator we created a maze in the empty space. This will result in a lot of corners and bends, but that is fine for our game. After the maze is generated, we want to delete all of the dead ends. These will slow down the player and at some point the player will be trapped at a dead end, because he gets cornered by the enemies.

So, we have rooms and hallways, but we can’t enter either of them because they are not connected. At this point, the generator will look at the entrances of the rooms and add entrances to the corresponding node. The potential entrances can be trigged if needed.

Step 3 Step 4

Step 5