Maple Wars


Overview:

Local multiplayer sugar shack themed game, where you have to fight against your friend to make the most syrup cans into a given time. Defend yourself against animals and your opponent using some power-ups such as trampolines, ice balls, horns and more. Developed in a team of 3 using Iterative Development, and Agile Scrum with Jira.

  • Team of 3
  • Iterative Development
  • Reflection
  • New Input System
  • Local Multiplayer
  • Split-Screen

Completion: May 2023

Duration: 2 months

Platform: Unity 3D


Contribution:

core architecture

During the planning phase, we carefully considered the architectural design of our project and decided to adopt a Top-Down/Manager style architecture. To implement this, I created a MainEntry script that served as the entry point for the game, utilizing key Unity MonoBehaviour functions like Awake, Start, Update, and FixedUpdate. Additionally, a Game Manager script was developed with PreInitialize, Initialize, Refresh, and Physics Refresh methods, which were called accordingly within the MainEntry script placed in the scene. By making use of singletons and implementing the IFlow interface, we ensured code reusability and maintained regularity across all managers and managed objects. To automate the process of gathering and updating managers, I created a custom C# attribute that utilized reflection in the GameManager, allowing it to dynamically populate a list of managers with the attribute and call their respective IFlow methods. This architecture provided a streamlined and efficient framework for managing the game's systems and contributed to the overall organization and maintainability of the project.

terrain design

To create an immersive and captivating Quebec forest environment for players to explore, I employed a procedural terrain variation generation tool that I had previously developed. The variations are created using Perlin Noise. With this tool, I was able to generate diverse and realistic terrain features. Once the terrain was established, I incorporated a range of imported assets, including various types of trees, rocks, and snow elements, to craft a Low-Poly forest setting. This combination of procedural terrain generation and carefully selected assets resulted in a captivating Quebec forest map, inviting players to embark on an exciting adventure at the sugar shack.

sound system

I first made a system that instantiates the sounds in the scene and then the sounds are invoked using delegates. Then system worked well, but I faced some challenges. To overcome the challenges we encountered, I developed two editor tools that proved to be immensely helpful. The first tool focused on simplifying the creation of sound prefabs by automatically generating prefabs with audio source components and the appropriate audio clips. This eliminated the need for manual prefab creation, saving valuable time and effort. The second tool tackled the issue of identifying and accessing available sounds by automatically generating an enum containing the names of all the sound prefabs in the designated audio prefabs folder. This enum could then be easily referenced in the editor or within the codebase, providing a convenient and organized way to manage and utilize sounds throughout the game. These editor tools significantly improved our sound implementation workflow, enhancing efficiency and ensuring a seamless integration of audio elements in our game.

animal system

I implemented an inheritance-based system to create different types of animals in our game, along with a generic state machine to control their behavior. By utilizing Unity's Nav Mesh system, the animals were able to navigate the terrain smoothly. Additionally, I developed an angle control system to precisely manage their movement direction. These combined efforts resulted in a dynamic and immersive ecosystem, where animals exhibited realistic behaviors and interacted with the player and environment in engaging ways.

the 3 c's

Unity's new input system, I successfully implemented 3rd person camera mechanics in a split-screen setting. To achieve this, I utilized the powerful Cinemachine system, which ensured smooth and dynamic camera movement. Additionally, I developed a custom input handler using the new input system, allowing seamless integration of controller or keyboard/mouse inputs. With the input data in place, I created a player controller that accurately translates the gathered input into player movements, enabling actions such as running, jumping, aiming, and throwing. These combined efforts resulted in an immersive and responsive gameplay experience.

animations

After encountering unsatisfactory results with Mixamo's auto-rigging tool for our lumberjack model, I took on the task of creating all the animations for our game. Although I had limited experience in animations initially, I gradually learned various techniques and tricks that made the process easier over time. Determined to breathe life into our game, I meticulously crafted a range of animations for all the characters. Using Unity's animation system, I seamlessly implemented these animations using animation controllers, ensuring smooth and realistic character movements throughout the game.

foot print system

To add more life to the game, I implemented a foot print system for the players. Using a sprite-based approach, I created footprints on the ground to simulate realistic footsteps. The footprints were triggered through animation events, and a raycast was employed to detect the ground surface and accurately place the footprints at the appropriate angles. To optimize performance, I utilized the factory/pool pattern, which minimized the overhead of constantly creating new footprints by reusing existing ones. Additionally, I implemented a system where the footprints would disappear after a certain period of time, ensuring a dynamic and visually appealing effect throughout the gameplay.

ability system

To provide an engaging gameplay experience with various actions and power-ups, I developed an ability system for the players in our game. Each player is equipped with an ability handler that generates random ability scriptables containing information such as Ability Type, sprite, and sound. These abilities are managed through slots, allowing players to see and select them in the UI. When activating an ability, the system checks if it is available and creates an object based on the corresponding ability type using the factory/pool pattern. Players can then utilize the ability and experience its effects. The abilities are categorized as Throwable and UnThrowable, each having different handling mechanisms based on their type. By implementing this ability system, players can engage in a wide range of actions and utilize various power-ups to enhance their gameplay experience.

ragdoll system

To add a comedic touch to our game, I introduced a ragdoll system that added a hilarious element to character interactions. The implementation involved carefully setting up ragdoll body parts for each character, incorporating rigid-bodies and character-joints to achieve the desired effect. I then developed a script that efficiently managed the ragdoll state by enabling or disabling the ragdoll effect as needed. For the recovery phase, I employed inverse kinematics techniques. Prior to a character's fall, the data of each body part was stored in a struct. When it came time to recover, each body part smoothly interpolated back to its saved position using co-routines. This playful addition enhanced the comedic moments in the game, creating memorable and entertaining experiences for players.


closing thougths:

In a local multiplayer sugar shack-themed game, our team of three developers embarked on a two-month journey to create an engaging and competitive experience. Following iterative development and Agile Scrum methodologies with Jira, we accomplished the elaboration of a fully functioning prototype. I spearheaded the core architecture, implementing a Top-Down/Manager style approach that streamlined the game's systems and ensured maintainability. Additionally, I focused on terrain design, leveraging a procedural terrain variation generation tool and imported assets to create an immersive Quebec forest environment. I tackled the sound system challenges by developing editor tools to simplify sound prefab creation and provide easy access to available sounds. I also played a vital role in the implementation of the animal system, creating an inheritance-based structure and a generic state machine for realistic behaviors. Using Unity's new input system, I successfully integrated 3rd person camera mechanics in a split-screen setting, providing a responsive gameplay experience. Furthermore, I took on the task of crafting animations for the game characters, implementing them using Unity's animation system. To enhance immersion, I created a foot print system and an ability system that allowed players to utilize power-ups and perform various actions. Lastly, I introduced a ragdoll system for comedic interactions. Collectively, these contributions brought our game to life, delivering an entertaining and memorable experience for players.