top of page
Search
Writer's pictureDan Hartman

Project BBEG Blog #1: Prototyping player mechanics & applying lessons learned to a new project

Recently, the Planetary Planter team and I got back together to start work on a new game, a roguelite with the working title BBEG (Big Bad Evil Guys). I wrote an explanation of the player mechanics I've been working on as a work sample for a job application, which inspired me to expand on it and post it here.


Player Mechanics

In BBEG, the player controls a Leader Character (green) and a group of up to three Minion Characters (blue, red, purple). There are two modes of movement: Follow, and Mimic. Follow is quite simple, where the player controls only the Leader, while the Minions follow in a line behind it. Mimic has the player directly controlling all four Characters at once, making it seem as if the Minions are mimicking the Leader.

(Credit to Mix & Jam for the model and animations: https://www.youtube.com/@mixandjam)


Character.cs

Character.cs contains generic character controller code. It utilizes a state machine with functions that allow it to be easily manipulated. Notably, Character.cs does not handle input, nor does it have access to other Characters. This allows the Character class to be easily reused for other aspects of the game, such as enemies, or NPCs. Code that is specific to Minions or the Leader is kept in the child classes Minion.cs and Leader.cs respectively.


PlayerCharacterManager.cs

PlayerCharacterManager.cs’s role is to take player input and use it to control multiple Character objects, specifically the Leader and Minions. In Follow mode, it only sends direct input to the Leader while sending the Minions instructions that result in them following behind the Leader. In Mimic mode, it instructs minions to first prioritize moving to a specific position relative to the Leader, and then sends the same input data that the Leader is using, allowing them to move in a formation of sorts.


Applying Lessons Learned to a New Project

One goal I have in mind for this project is to prioritize making the content pipeline as effective as it can possibly be. Planetary Planter's development struggled with making effective pipelines due to the way certain systems were made, so I wanted to make a point to keep pipelines and expandability in mind for this project. My first step towards achieving this goal is creating a modular attack system utilizing Unity's Scriptable Objects.


Of course the obvious first step is to have an editor for the scriptable object with some variables. Right now this should suffice, but in the future I'd like to implement a more data-driven approach, where each attack can be edited extensively from a spreadsheet.



Another problem I had to solve was to make adding animations to attacks simple. Thankfully, Unity has the Animator Override Controller component that allows me to take any Animator and replace any state's animation clips with ease. This should allow for much easier implementation of animations for artists, prevent animation trees from becoming a complete mess and let us reuse the same animation tree many times over.


Below, I have the green character equipped with the Big Punch attack shown above, and the other three characters have a generic smaller punch attack with a different animation, although it may be difficult to notice. The transparent circles are meant to represent the attack's hitbox.



And that's all I have to show for now. I'm also in charge of a random dungeon generation system for BBEG, which has some basic features completed, but isn't quite ready to show. Thanks for reading. Blogs are an excellent tool for showcasing how I'm still learning and pushing myself forward after graduation. I'll be back to making semi-frequent posts about Project BBEG and whatever else I learn about in pursuit of a full time game development career.


If you want to follow the development of Project BBEG, here's a link to our discord server: https://discord.gg/e5M5uwa5UY

13 views0 comments

Comentários


Post: Blog2_Post
bottom of page