I finished a Hat In Time and I wanna talk about the ending/finale

Honestly, I wouldn't put too much stock in it. A Hat in Time is a great game, but I don't think the devs were aiming to give it this deep, complex plot. It's kind of hard to answer some of these without running off the deep end into fanfiction territory since the game only gives explains the bare minimum when it comes to its world and how it works, however it is fun to over-speculate...

Now there are two possible perspectives you can look at when looking at Hat Kid's relationships with all of her former enemies at the end of the game - the in-universe story perspective, and from a writing perspective.

Through the course of her journey, Hat Kid interacts with a variety of characters who aren't necessarily the nicest; they all have a lot of outwardly negative traits that overshadow any positive ones they may have as well. However, Hat Kid actually winds up helping a lot of the characters she comes across, even if only to get her time pieces back, but the way she interacts with them does seem to affect them in a (usually) positive way.

  • Despite the Mafia being the ones who caused her to lose her time pieces, Hat Kid still saves the lives of everyone in Mafia Town when Mustache Girl floods it with lava, and they're visibly grateful. As self-centered as they are, they throw Hat Kid a celebration in her honor complete with gold statues, and willingly give her a time piece. Even the Mafia Boss is willing to give Hat Kid his map badge to help her on her quest.
  • The Conductor and DJ Grooves' character arcs are kind of odd since they develop very differently depending on who wins the Annual Bird Movie Award. If the Conductor wins, both characters are played pretty straight to their initially established roles. The Conductor who already came across as an arrogant, short tempered, psychotic old man obsessed with winning, only becomes even more so when he decides to rewind time and tries to murder Hat Kid to reclaim the one movie award he lost from his rival. Likewise, DJ Grooves, who comes across as the only decent being on the planet Hat Kid comes across (or the least cruel), only further reinforces his role by continuing to aid Hat Kid by saving her live and defusing the bomb, even though she's the reason he lost the movie award. However, if DJ Grooves wins the Annual Bird Award, a role reversal occurs and both characters get a bit more depth and development as a result. DJ Grooves, who had been outwardly nice to Hat Kid the entire time she interacted with him winds up double crossing her and tries to rewind time in order to win several movie awards that initially belonged to the Conductor. While the reasoning behind this is up to interpretation, ranging anywhere from him being a "bitch in sheep's clothing" that tricked and manipulated her from the start, or his murder attempt coming from a power craze he achieves from finally winning after so many failures, he definitely subverts her initial impression of him. The Conductor also becomes much more interesting, after treating Hat Kid with little respect or regard for her life during the filming of his movies, he goes out of his way to not only tell Kid about the rigged Award Ceremony, but saves her life by defusing one of these bombs without any of his usual condescending remarks. Its also interesting to note that this change remains consistent with the finale of the game. He's not outwardly malicious at all towards Hat Kid when waiting in line to be judged by Mustache Girl, is one of the first characters to tell Mustache Girl to "get lost", outwardly showing support for Hat Kid, actively helps her in the final battle against Mustache Girl, and is the one who proposes to DJ Grooves that they joint the Mafia in suicide to help Hat Girl survive. Even in the final cutscene where all the former antagonists are begging Hat Kid not to leave, the Conductor is the only character who explicitly tells her he doesn't want her to leave, instead of referring to some sort of neutral interaction they had, whereas characters like Grooves and the Snatcher mentioned movies and contracts respectively in trying to get Hat Kid to stay. Interpret that as you will, but there are definitely shades of character development for the Conductor and DJ Grooves when they're present in the game.
  • The Snatcher is the most developed character, and his arc is pretty clear without only minimal extra explanation or interpretation. When Hat Kid initially meets the Snatcher, he comes across as the traditional manipulative, demonic, chaotic evil creature that's appeared in a lot of fiction, and he carries a lot of the same personality traits. He's charismatic, with over-the-top yet humorous dialogue, that makes him likable, but at the same time he's downright sadistic. It's no secret to Hat Kid and the audience that he only uses her as a means to an end throughout the entire Subcon Forest chapter, and it's not a surprise that he double-crosses you in end. However, his reaction at the end of his boss fight is where most of his growth happens. Hat Kid defeats him, but instead of outright killing him (not that I think that she could have), or signing the Snatcher's final contract as it is, she offers to be his "BFF", and on his Steam trading card, she describes him as a "tsundre". She definitely sees some good in him, and possibly empathizes with him if she travels through the purple time rift/or manages to put the pieces together and realizes the nature of the Snatcher's past. Given the Snatcher's backstory, It would make sense that he might cut her some slack in the end, she might be the first person in centuries to show him some sort of kindness. He's not indebted to her, nor would he change his ways, but he's not as malicious towards her in the finale scenes.
  • The Nomads and Goats in Alpine Skylines help Hat Kid for obvious reasons. They're not antagonistic towards Hat Kid when she arrives there, and she saves them all from the plant invasion that infects the goats. They're indebted to her for that alone.

This all pays off in the finale when Had Kid fights against Mustache Girl, and her positive impact on others allows all of her former enemies to find reason to side with her, and after the final battle, have a positive enough opinion of her to want her to stay. However, you can also just chalk everything in the finale act up to the common phrase, "the enemy of my enemy is my friend". None of Hat Kid's former enemies may have any personal attachment to her; they easily could have sided with Hat Kid because they knew she was their best chance of taking Mustache Girl out of power.

From a writing perspective, there could be a couple reasons/themes at play here:

  • Subverting expectations: Despite the wide range of characters in A Hat in Time, there is a singular running theme between all of them: they aren't completely who they appear to be. Hat Kid may be a little girl, but she's stronger/more determined than she seems; Mustache Girl initially appears to be Hat Kid's closest ally but turns into her most dangerous enemy; if DJ Grooves wins the Bird Award, he turns out to be her enemy the entire time while the Conductor winds up being the one who actively supports her in the final boss and finale ; the Snatcher is an amoral soul-stealing demon yet he actually cares for his Subconite minions and hides a tragic past. Following this theme, the characters coming to support Hat Kid subverts the expectations that go along with their base personalities, especially when they beg her not to leave.
  • Perspective: With the emphasis on "bad guys" and judgement in the finale of A Hat in Time, another theme at touched on is the idea that a person's morality depends on their point of view. Despite how skewed some of the characters' idea of right and wrong might be, all the characters believe that their actions are completely justified for one reason of another. The Mafia had a "Manifest Destiny" kind of belief system when it came to taking over the island, and probably view their cruelty, tolls to outsiders and other acts as a way of maintaining order in their home; both the Conductor and DJ Grooves believe that they are entitled to the Bird Movie Award for inherent talent, and previously rigged awards respectively, and that the end result justifies the means that they use to win; the Snatcher views outsiders into his forest as intruders, and given his past as a prince, uses his contracts as a means of intimidation and manipulation to maintain control of what he believes is his, Hat Kid believes she's in the right to help these characters because she needs to get her time pieces back to get home, and Mustache Girl's black and white morality leads her to believe she's the only one capable of dealing out "justice". When everyone comes together to support Hat Kid in the finale, they don't think of themselves as "bad guys" they think of themselves as individuals who were going about their lives and achieving their goals in a way they thought was right. As the Snatcher says, they don't need a hero, because in their eyes they haven't done anything wrong, and simply don't want or need to be judged.
  • Parody: Now this isn't a theme but the ending itself feels like a parody of the "power of friendship" that you find in a lot of animation and games these days. Behind the cute characters and bright colors, the game has a very sarcastic and sometimes dark sense of humor. The tone of the finale fits this perfectly, the characters don't say they believe in Hat Kid or care about her, they just show up to tell Mustache Girl to "get lost". Instead of activating some fancy deus ex machina to defeat Mustache Girl, they decide to punch each other to death to release health pons that instead of being part of the video game aspect of the game are actually in universe items. The characters don't even consider their actions a heroic sacrifice or hesitate because they know they'll be revived once Mustache Girl defeats Hat Kid and time rewinds. The final scene is a bit heartwarming, but overall, the finale makes fun of the "friendship is magic" concept than actually playing it straight.

As for your other question, at lot of these same concepts apply to Mustache Girl. She's definitely an underdeveloped villain. All we know about her is that she has a personal vendetta against the Mafia, and it's implied that she's the last remaining original resident of the island. My best interpretation is that she's a kid, with a lot of resentment and justifiably so, which has given her an extreme level of black-and-white morality, and like any angry kid she wants to take that anger out on the circumstances around her. However, at the same time, she also suffers from feelings of isolation and loneliness due to her situation, so when Hat Kid shows up and then refuses to help her deliver justice, Mustache Girl takes it as a betrayal because she loses both a means to get the revenge and friend she's always wanted to have.

While she's never outright shown interacting with anyone other than the Mafia before the finale, it's implied that she does run into the other characters when searching for other time pieces. There were references in the Alpha and Beta versions of the game of her causing problems for The Conductor on his train, and there's a dummied out section of the game where you were supposed to play as her in Subcon Forest where she'd meet the Snatcher. Also there is Mustache graffiti scattered throughout Dead Bird Studios implying that she's at least visited there before Hat Kid's arrival. She probably realized that the Mafia weren't the only ones she interpreted as "bad guys" on her planet, and thought she was justifiably in the right to do away with all of them once she'd gotten the power of the time pieces.

Once again Mustache Girl's character is really just another one of many perspectives laid out in the game. Just like in real life, everyone on the planet thinks that they're in the right and that their intentions justify their actions. However, when you look at it objectively, there is no "good guy" or "bad guy", no one's entirely right, and no one's entirely wrong.

Aaaand that was my over-interpretation of the characters in A Hat in Time... sorry for the long reply... I got carried away. I hadn't really thought of the game in that much detail before this, but your post did make me stop and think, so kudos to you!

/r/AHatInTime Thread