Summer 2023
Location
Stockholm
Date
2023
Team size
1
Role
Programmer
Engine
Unity
Overview
In the summer of 2023, I embarked on a 1-2 week side project using Unity to develop an endless 2D survival shooter game. One of my primary goals was to implement a dynamic enemy spawning system that would create a sense of tension and challenge for players. To achieve this, I've developed a simple enemy spawning system to elevate gameplay diversity and excitement. It randomly selects enemies from a pool of prefabs, enabling developers to introduce a wide range of enemy types with unique behaviors.
Project goals
During this side project, my main aim was to improve my programming skills in C#, alongside deepening my understanding of Unity. I focused on using object-oriented programming concepts, particularly superclasses, to structure the code effectively. This allowed me to manage various enemy types through inheritance, creating a system that could be expanded and adapted easily.
Core features
During development, I focused on implementing several core features. These include:
Enemy spawner
To intensify player immersion, I crafted a dynamic spawning mechanism that strategically positions enemies beyond the player's view. By generating spawn points outside the camera's scope, each encounter becomes unpredictable and distinctive.
Once the enemy type and spawn points are determined, the system seamlessly spawns the enemy at the chosen location. This adds surprise and challenge, requiring players to adapt to evolving enemy encounters.
This blend of random enemy selection and strategic spawn placement ensures a dynamic and captivating gameplay experience. With each spawn, players face fresh challenges, enhancing replay value and player engagement.


Gun class
Another crucial aspect of the game was the diverse arsenal of weapons available to the player. To create a flexible and expandable system, I employed the concept of inheritance, allowing for easy integration of new weapons with unique attributes and behaviors. This approach not only simplified the implementation of new weapons but also ensured a balanced and engaging gameplay experience as players experimented with different firearms to combat the relentless onslaught of enemies.

Highscore system
​In addition to the core gameplay mechanics, I integrated a simple scoring system that enabled players to track and compare their performance. Upon completing a game session, players could save their high scores, fostering competition and encouraging repeated playthroughs as they aimed to climb the leaderboard and achieve mastery over the game.

Lessons Learned
From this project, I learned the importance of designing scalable systems. Using object-oriented principles like inheritance for the weapon system allowed for easy integration of new weapons with unique behaviors, making future adjustments simpler. This approach provided a solid structure that was easy to expand.
​
Building the scoring system taught me how small features can boost player engagement. Allowing players to track high scores fostered competition and encouraged replayability, adding more value to the game experience.
​
The dynamic spawning system highlighted the balance between predictability and randomness in gameplay. Strategically positioning enemies outside the player's view created fresh, unexpected encounters, adding challenge and immersion. This experience showed me how thoughtful design choices can elevate both technical implementation and player experience.