Swap Meet is a puzzle game for the Playdate console, originally made for PlayJam 10.
https://uguu-org.itch.io/swap-meet
In accordance with the jam theme of "swap", I made an item swapping game.
I thought about how the item trades would work to ensure that the games are winnable, and came up with the idea of layering chains. Imagine this chain of trades:
This is simply a linked list of nodes:
Solution to this one is straightforward: swap starting item for B, then swap B for A, then swap A for goal. So we can generate a lot of chains like this and the goals are all guaranteed to be reachable. If we lay out the nodes randomly on the map, this becomes a memory game where player first discover the graph edges, and then visit all the nodes in the correct order. This might be viable as a game, but I thought it would be more interesting if the graph wasn't just a simple linked list. An updated scheme I came up with was to layer multiple chains on top of each other. For example, given two chains of trades:
The two chains might form a dependency graph that look like this:
There are many ways to build graphs that accommodate these two chains, here we have a graph where the chains overlap in two nodes, and those overlap nodes represent trades that requires or offers more than one item.
Planning the right order of trades for this kind of graph takes a bit more thought than the simple linked list. The correct order is in the numbers inside each node, following all the solid lines. Note that if the player took a greedy approach and make trades strictly based on items they already have, they might visit nodes #1 then #6, and get stuck.
There are a few more minor details (e.g. to ensure that there are no deadlocks in trades), but mostly the puzzle generation worked using the chain-layering algorithm described above. The implementation remain largely unchanged between the jam and full versions.
For the puzzles generated using this algorithm, player needs to trade with each trader at most once. A real swap meet might have trades that are irreversible, and sometimes repeatable. I allowed the trades to be undone so that players can recover from bad trades, and I didn't want the trades to be repeatable because I didn't want any trading loops that would add more items into the system. A more complicated trade system might make the game more fun, but I thought what I have here was enough to make a game.
The trading scheme described above actually happened on day 2 of the jam. Here is how the 3 days went:
Day 1: I have decided to make an item swapping game because "swap meet" was the first idea that came to mind. I copied some skeleton files from the previous project, and transcribed Gnossienne 1 for the background music... and that's pretty much all I did. At the end of day 1, I had a thing that compiles, but the actual logic of how the trades will work required a bit more thought. I decided to sleep on it.
Day 2: Morning of second day was when I implemented the puzzle generation aspect of the game described in the previous section. I spent the afternoon drawing all the items that will be used for trading. I went with the slightly large 48x48 images to match the slightly large player sprite. By the way, the player sprites were copied as-is from my previous game. It seemed that many people never saw Bocchi-chan in the previous game, so this time I kept her front and center.
Day 3: Last day was a day of fine-tuning and adjustments, plus various packaging and documentation work. One new feature that was added on the final day was the hint system, on the assumption that some people won't be able to solve the puzzles at first sight. Unfortunately, the hint system wasn't able to solve half of the puzzles either. There was no trivial fix, but the game itself was playable, so I just submitted the game with broken hints. I made the deadline with 27 minutes to spare.
By the way, an item swapping game seemed unique for this jam. There were multiple entries that involved swapping player controlled character, my favorite among those was Donuts for Rollio, which I thought had the smoothest experience. Another one I liked was Double Golf, which worked with a dual world idea, realized with very good use of the crank. I wouldn't have known what other people were making ahead of time, but I am glad my idea did not overlap with other games in this jam.
My first priority in the full version is to fix the hint system. I knew that the hint system wouldn't work if player strayed away from the known solution, but I didn't know how bad it fared in general. The hint system implemented in the jam version worked like this:
Recall in the first section where I wrote players who took a greedy approach might get stuck... well, the hint system here took a greedy approach, and it got stuck. But it didn't get stuck all the time! Most importantly, it didn't get stuck the first time I tried it. It worked once, so I shipped it. After the jam ended, the first thing I did was write a test for the puzzle generation and the hint system, and I found that the hint system only worked half of the time, which was quite abysmal.
In the full version, I took a more brute force approach with the hint system:
Depth-first search is used because I was concerned that I won't have enough memory for breadth-first search. In hindsight, the unordered set of player-held items can be derived by which trades has happened, and there are at most 20 trades, so I could have encoded the trade state in 32bit integers and spend a few megabytes on the search queue. But I think the current hint system is fine as it is:
Implementing the new hint system took a few days. A few more days were spent on drawing more items. The rest of the time was spent on animating the floor and drawing background landmarks.
This time around, I was able to reuse a fair bit of material from previous projects. Besides the general state-based game structure, the animated floor tiles were drawn using the same hashing-based technique that I used for Sor 6, and the trees were recycled from Old Pond. It still took almost 3 weeks, partly because I was recovering from getting my tooth pulled out, but mostly because it still takes me a long time to draw anything. But I am getting better at it, I think. At least I didn't spend 7 weeks on this game.
I announced the updated version to the usual places:
I got a few downloads for the updated version. I am not sure this kind of memory-based puzzle game is something that many people enjoy, but I am fairly happy with what I have made.
Previous (2026-08-12): Wisdom tooth extraction