The Cocoron "Heck%" Randomizer
One of my favorite side projects I've made is the Cocoron Heck% Randomizer. This is not a randomizer that changes the game code. Instead, it changes how you play the game.
Cocoron is a charming 1991 Famicom game, with a Mega Man-like design, where you create your characters out of mix-and-match parts. You also choose your route through the world, and you play side-scrolling levels that change based on where on the map you're going from and to.
I'm not good at Cocoron. I've beaten it once I think. My wife Kat and our friend Bea are good at Cocoron. They can speedrun the game, but also they'd started playing the game a different way.
The game is full of possibilities, but in the speedrun, you create The Optimal Character and traverse The Optimal Route, and all the other possibilities that exist in the game don't matter. But in what Bea and Kat called "Heck%", instead of choosing your character attributes, you choose them randomly and have to play as the character you get, whose stats might be very poorly suited for the level you're in, or for anything really. You can also choose the route to play randomly.
I enjoyed watching Kat and Bea run this and I wanted to streamline it. First I made a chatbot that chooses the characters and route. But then I turned it into a web app, which does some neat stuff:
- It instantly chooses your characters and route, meeting the constraints of the game, such as not being able to reuse the same features between characters
- You can change options, such as banning shurikens (which are too good if you want the game to be hard) or the clown face (if you don't like clown faces), and the characters update
- The random decisions are made in a stable order so that if you change an option, but the option doesn't affect any of the random choices, you get the same result
- It generates names for the characters! The character names are up to 4 letters. I know that generating pronounceable names of up to 4 letters is a hugely risky thing to do if you do it randomly, so I tuned the generator and vetted its results to ensure that it never says slurs that I know of, or anything that sounds too edgy.
- The same character build always gets the same name.
- And this is my favorite touch that I look back on and say "how did I manage that": it generates images of the characters, overlaying sprites and swapping palettes the same way the game does. I enjoy just loading it up and looking at the generated characters.
I should play Cocoron again sometime.