

February 3, 2025
3 weeks

Barnyard Commandos: One Pork Army is a student project developed at Game Sup, where the challenge was to develop a roguelike game using a forgotten toy licence from the 1970s. We ended up with a licence featuring pigs at war with sheep.
I was the Lead Tech Designer on this project. In fact, I was the only one doing the programming. I took care of all the programming and part of the implementation of the various elements within the project. This gave me the freedom to create tools for my fellow developers to make their work within the engine easier.
PROCEDURAL GENERATION


When you say roguelike, you say procedural generation. With the aim of creating something fun without it taking too long to develop, we decided to create a system that randomly generates pre-made rooms using rules.
To do this, I started by creating a Scriptable Object for the room. This simply contains the number of exits on each side of the room and the room scene.
Next, I created a Scriptable Object for procedural generation parameters, in which we define the weight parameters for each room. The higher the weight, the more likely the room is to appear.
To make all this less redundant, we also decided to add variations for each room. When a room loads, it defines which variation to use based on a difficulty value. This value is defined according to how well the player is performing based on several parameters. The better the player performs, the closer the difficulty value tends towards 1.

3Cs
Character


Since we had a character with a diverse range of parameters, I took the time to format the script in the editor so that my colleagues could easily find their way around.
You'll notice that in addition to the variables, I decided to display the health bar and the difficulty level, giving designers a better overview of what's happening when they test the game.

As for weapons, I decided to make them Scriptable Objects. All this information defines both the values in game and those displayed in the menus and HUD.
Camera
We worked on the camera so that the player's character would be as close to the centre of the screen as possible and couldn't move outside of it. We wanted to confine the camera within the scene and had done so, but due to several issues, we had to remove this confinement for the final rendering.


ARTIFICAL INTELLIGENCE
In the same way as the player script, I designed my artificial intelligence editor so that it would be easy to configure.


Since these enemies had basic behaviours (patrolling, chasing, attacking), I decided to create a state machine.
When the enemy appears, it defaults to patrol state. It will then continuously call the state's Update() function. In this case, it will check whether it has finished its patrol and whether it has spotted the player. In the first case, it enters idle state; in the second, it enters chase state.


FINAL BOSS
I had a lot of fun creating the final boss. I spent a lot of time on it, both developing the combat system and creating the transitions between phases via cutscenes.
Once again, I worked on the script so that it would be easy to modify the boss's parameters.
The crescent around the boss is the firing angle for his attack, where he fires several bullets around him. The red spheres are the locations and size of the explosions he can trigger. The yellow boxes are the locations of the enemies he can spawn.













