Devlog Summary: Cozy Winter Jam 2022

2022-12-08



Jam Link
Game Link
Dev Time: 8h/72h

Day 1: Hour 0-3

As the vibe of the jam was to just relax, I decided to make something trivial and focused on doing it entirely on HTML Canvas. The game is a spin-off on the match-3 genre. I made a 2d matrix for the level layout and populated with four tile types. Then I coded the swapping. Canvas was drawing at every frame so I decided to keep a drawing queue and saved the coordinates of parts that had to be redrawn. I believe that helped the rendering and performance issues.

Day 2: Hour 3-6

With all of the groundwork laid, now I needed the acutal levels. I wasn't sure if I would be able to design a sufficient amount of levels with my limited time, so I decided to sacrifice some quality and procedurally generate them. My initial approach was to spawn the tiles with equal probability. But it didn't make the level feel natural and I also wouldn't be able to calculate the optimal moves needed to complete the grid. So I opted to the reverse approach. I populated a 2d matrix with random weights and ran Dijkstra on it. Then I took 2 corner points and placed my tiles on the shortest path between them. After that, I swapped values over the entire matrix randomly and shuffled the array a few times. The swap count would inform the player that the level could be completed in atleast that many moves.

Bug Turned Feature:
I ended the day with writing the win checker function. I had a count indicating how many tiles of the target type are in the grid. So I could pick any random tile of the target type and run a flood fill algorithm to find if they are all connected. During this, I encountered a bug because of how the unshift method works in Javascript. It caused my win function to disregard any solution that had a target tile on edge. I decided to keep that in. As the solution looks more organic that way and adds a fair constraint.

Day 3: Hour 6-8

I now only had to finish the non technical parts. I used Kenney's CC0 sprites for the tiles and a google font for the text. The whole jam was winter themed, so I felt that some music with christmas bells would be appropriate. Unfortunately, my computer decided to crash everytime I opened LMMS. After some digging, I found this online tool from Spotify called Soundtrap. I spent around an hour to finish the track that is in the game. I had to keep it fairly simple because soundtrap wouldn't let me export my MIDI. I did another track too but it was getting repetitive so I scratched it.

 

 


I think the game depending on only one single mechanic and doing it well is better than having something flashy but messy. And because of the generated levels, it adds to more replayability. It can be useful to have a target audience that is casual and doesn't demand something that is very technical. If I had to go back and change something, it would be to add another track as the current one is only a minute long.