Peach Play
A downloadable game
Peach Play is the current game I'm working on, and the tenth game I've worked on. At first, I was working under a Lead Developer, but he has since left, and I've been the solo developer ever since. At this point, the only thing I didn't directly develop is the base for the inventory system, and the base for angry ragdolls. It was great learning under a Lead Developer, and his contributions and tips were greatly appreciated. In Peach Play you play in a sandbox environment, bend the world to your imagination and just be creative! Spawn any item you want and try to freeze it, activate it, and see what happens.
Game Mechanics:
- Implemented 3 game modes: sandbox, battle-mode, and angry-ragdolls.
- Created an entity interaction system supporting activating, freezing, flipping, and deleting the entities. There are toggles for if these are on or off as well as callbacks for the start, update, and end of these events.
- Implemented a versatile event system that loads events from firebase remote config, from this it checks if there's any local event in the files, if so, it will check to see if the user has it unlocked or not. If not, the user can buy the event with real money, or wait whatever time is defined in remote config until it unlocks. This system also checks for previously purchased events even if they're not in remote config, it will show them as selectable because a player has bought it.
- Created a system to physically try to follow animations similar to Puppet Master, but for 2D. Had trouble with stability in 3D and that was a must for Angry Ragdolls. To combat this, we switched to 2D for better stability in that mode only, and from this needed some sort of system similar to PuppetMaster for 2D so I created a simple system that got the job done.
Challenges & Solutions:
- For Battle Mode after weighing benefits vs costs, I believed creating the AI using Behavior Trees rather than FSM was the right move. I quickly learned to create the behavior trees and had fun soldiers with AI depending on what gun they're holding. In this mode, what weapon the character was holding determined what unit "type" they were. Based on this, the AI behavior including move speed, crouch chance, shoot chance, view radius, goal location etc. was decided.
- Tasked with creating a modular weapon system, at first, I wasn't sure how to tackle this, but I ended up deciding to create a base weapon class that's then extended from to create gun and melee classes. The weapon class has Weapon Data from a scriptable object, and the weapon data has bullet data. With all of this it's easy to create new weapons within minutes as long as the base is programmed like for guns.
- We needed to have the characters hold guns and shoot them, the guns were contained in a spine file at first directly connected to the characters. I decided we'd need them to be able to be dropped and physically based, so because the guns had their own animations alongside the characters like they rotated in the characters hands, when a player equips a gun, the gun is completely separate and it dynamically turns off the guns physics as well as following the spines gun rotation, so it still looks natural. One other nice thing is does is positions the gun in relativity to a "pivot point" defined in the gun prefab.
What I'd do differently:
- I finally used dependency injection in this project, it's helped a ton with keeping things easy to extend and modular. If there's something I'd do differently it would be changing how the melee works for AI in battle-mode, which I will actually do. I just finished creating a modular melee system that uses assigned collider shapes to check for overlap at specific points of animation to see if a melee hit was a success. This data also includes things like the damage that hit should do.
- I've also learned no matter what I should check twice if animations I'm sent in unity work even if they work for the animator outside of unity. Don't just assume everything is good, triple check it.
Key Takeaways:
- This project has been a ton of fun to work on so far! I've worked on it for close to 7 months now, and throughout that time I've met great people, and learned a ton of things. From completely porting our projects code to another project to creating every mechanic I worked on from scratch, it's been a very valuable journey.