Third time jamming with "Finish your Game Jam" by Pigsquad
Pretty fun Jam all things considered, sure I'm a day late mostly due to a stalker 2 shaped blank in the commit history, and the browser crashed the first time I wrote this, but I did manage to get three important aspects of the game finished, namely the targeting, the grouping behavior, and the score ranking system.
the problem with the targeting when the jam started was excessive motion sickness build up due to the camera moving automatically towards a rapidly shifting target jolting the direction of the camera out of player expectations. Mechanically the reticule only selects the cat closest to the center of the screen whenever some look input is received, so you could lift your mouse and stay locked on target without requiring a dedicated lock on button. Luckily there's no point in targeting a far away target in this game, so I shortened the distance at which the reticule first appears to melee range, added a faint reticule always in the middle of the screen, and only shift the camera direction when the player is charging an attack, for hopefully a more intuitive targetter interface.
when the jam started, the cats each had a loyalty counter for which other cat was their favorite. If a cat was around their favorite cat, their loyalty would go up, and every time a cat of higher rank than their favorite was around, the loyalty counter would go down, but they would still follow their favorite leader. if the loyalty counter reaches 0, a new favorite cat is chosen. The idea is at the end of the round, each cat votes for their favorite cat to be mvp. To get cohesive groups going, during the jam I made 2 branches of behavior for cats that could group up. If leading, the cat would go towards areas where the ratio of friendlies to opponents was higher than the reverse, while if following the cat would mostly try to move towards their favorite, only targeting cats near their favorite, and losing interest in their targets at a certain distance away. Visually, leader cats have a big group sign over them, while following cats have a antennae from their badge pointing towards the big sign.
To select a favorite cat based on rank, there needed to be a ranking system, which was what took the most time to get working correctly during the jam. First every cat gets a score of coconuts collected + highest hit streak + captures, then they get a rank based on their score compared to their teammate's scores. As the main mechanic of capturing involves adding/removing and rescoring on the same frame possibly every fixed step frame, ideally the code would be parallelized, dynamic, and require little garbage collection. So the data structure I'm using for tracking a cat's rank is a doubly linked list, in which every cat has a link to the cat ranked directly above and below them in rank. If a cat is to be added, first the lowest ranked cat of the team is found for the new cat to be attached. If a cat is to be removed, its immediate neighbors receive new links to their top or bottom, and every cat below them ranks up as well. finally a cat might swap rank with their immediate superior if they have a higher score, which involves swapping references to their above and below ranks.
Using Unity's Entity Component System, every cat can lookup every other's cat's status if they know their entity id and update themselves accordingly in parallel. In the SwapByScoreJob, the entire ranking is separated into groups of 4, and every one of those four independently figure out whether the middle two should swap rank, and then updates themselves accordingly. All changes are recorded on to a CatInteractions struct and simultaneously applied afterwards, as ECS requires the thing you are looking up in parallel to be readonly for synchronization. So a capture involving Adding/Removing/Swapping does take 3 frames instead of all at once, but it's fine, as long as cats that need to be removed are removed immediately, cats to be added can be queued up, and checking for swaps only after all the cats are added or subtracted.
With a way for cats to rank up, select a favorite cat, and behave in tandem with their favorite cat, I think I'm pretty close to the end, which is the round over scoreboard ceremony portion, more weather, pacing tweaks, steam achievements, platform deployment, marketing, etc, and the game will finally be finished. so I'm hoping this is the last "Finish your Game Jam" for Cataverse MVP.
Big Thanks to Pigsquad for always hosting the best events, and fellow jammers for creating such a encouraging and nurturing environment!
Files
Get Cataverse MVP - just a demo for now
Cataverse MVP - just a demo for now
300 feral cat form a society
Status | In development |
Author | nitroclay |
Genre | Simulation, Fighting |
Tags | Cats |
Leave a comment
Log in with itch.io to leave a comment.