
Groceries Please! is my 14th LD entry, and 8th with "Literal Games", a protean group of my friends. It's a busy corner shop simulator with frustrating but believable customers, combined with a choice driven narrative about the difficulty of managing your family at home, and your family back home.

I love writing post-mortems for my LD entries, mostly for myself, as both a critical review of the game and the process, and as writing exercise; but I also love reading my old post-mortems to see how my thoughts and views have changed over time. I have post-mortems from 8 years ago, and I find it very interesting to see what I thought was worth talking about back then. I've seen some great post-mortems on the feed this LD - I'd encourage you to have a go writing one!
So, how did LD51 go for me? Let's dive in!
Ideation
Before the Jam, I (along with many others, I'm sure) was really hoping that the theme would not be "Every 10 Seconds". Regardless of it being a bad theme, it was the same theme as LD27, which I also competed in. I know LD27 was 9 years ago, and there's not many people who have done both, but to have two identical themes - even down to the same period of time, is kind of frustrating. I also believe a theme shouldn't be a mechanic, and should instead be something you need to layer into your game, so it's also a bad theme in my books. The game I made for LD27, 10 Second Army, is really not very good.

Luckily, I had been to the Museum of Anthropology in Vancouver the night before the Jam started. It's a really wonderful museum, and it gave me so many ideas for other "themes" I could base the game around as well. Specifically, there was a temporary exhibit on "Mexican Americans", and a lot of the pieces in the exhibit had a sense of being not quite settled - being at home, but not at home. As someone who has recently moved abroad, it's a feeling that I'm also trying to get to grips with myself. From this, I already had an idea that I wanted to make a game about being an outsider, or as I put it in my notes: about "Borders and not belonging".
So, the theme was announced, and I was upset. I was doing this LD with my partner and two of our friends, and while we were waiting to chat to our friends on Discord, my partner and I discussed our ideas. Neither of us wanted to do a game that was frantic or too stressful, but how do you avoid this when the theme enforces it as a mechanic?
A solution seemed to be to have an action occur every ten seconds that doesn't necessarily need a response, yet. The game could then be balanced around how much response you need to provide to those actions. Some might need something small, some might need more. I had suggested a factory simulator where raw materials arrive every ten seconds, and the gameplay was building a factory to deal with the materials; or alternatively a Zoo simulator where animals arrive every ten seconds. Neither of them seemed enticing, but then my partner had the idea of running a shop with new customers every ten seconds. From there, the pieces fell into place. In the UK, a lot of corner shops are run by typically South Asian immigrants, often Indians. It seemed like a perfect way to combine the theme, as well as to introduce my personal desire to make a game around immigration, borders, and not belonging. We discussed this with everyone, and it seemed we had our idea!

PICO-8
From there, I think this was one of the smoothest LDs I've ever worked on. We had decided beforehand to use PICO-8 for the game. PICO-8 is a "fantasy console" with very strict limitations on everything - code, sprites, music, SFX... everything is done in the PICO-8 environment. I love these restrictions for game jams. They make 90% of the decisions for you, and force you to focus on the important things. Whilst it means that you don't have complete creative control over the game, the tradeoff is worth it for me.
Knowing how to use PICO-8 fairly well, and already with a good idea of how we wanted the game to look and how it would play, meant that two hours after starting, we already our shop with basic movement:

The "pseudo-3D" took me a little bit of time to get right, but I think it's a nice touch. Plus, comparing this initial build to the final game, it's amazing how much we kept. I think that's the power of having such tight restrictions, as it forces you to work with what you've got.
Customer AI
Next on the list was working on the customers. We had already come up with a set of things we wanted customers to be able to do, but before all of that, they needed to be able to move around the shop.

For this kind of system, where you need to control the state and actions of an entity over multiple frames, there is no better solution than Coroutines. These are usually available in most languages and game engines, and let you write functions that remember their state across frames. This means that instead of having to store a bunch of state in loads of variables and work out what to do with them each frame, you can instead just throw a yield() in your function, and magically the next statement will be run on the next frame!

This means that moving an entity towards a point over multiple frames becomes as simple as the snippet above. It also means that creating a simple "AI" that constists of "walk here, do this, walk here, etc" becomes as simple as writing those function calls in order.

The customer AI is actually fairly simple in that regard. Because writing consecutive actions in coroutines is just so simple, the functions just become lists of things for the customers to do.
At this point, I had also added functionality to the shelves so that they could hold items, and we basically had an MVP of the game!

Layering on systems
From there, it was simply a case of layering on systems. I find the best way to do this in game jams is just to add the smallest next item, and make the game work completely with that. I find it forces you to think features through, about how they'll interact with everything else, and what you actually need. It also keeps your game from getting too buggy and spinning out of control, as you're always working with a "working" game. The next logical step for us was adding different item types, as well as letting customers hold the items.

Next, getting deliveries of specific items, and being able to use those deliveries to fill up the shelves.

At this point, the game was actually kind of satisfying to play! It definitely wasn't perfect, and there was a lot of downtime, but being able to organise your store, and watch people come in and see them picking their purchases had a kind of charm. This was a really great feeling, as it meant we were on the right track.
New features kept flowing. How about customers dropping items and making a mess?

We had a really solid base to build off. Part of adding features iteratively also means you'll have to modify them slightly later to add new things - but that's fine if you design things simply. Game Jams are not the time to over-engineer!
Balancing
The game was going well, and was essentially feature complete at this point. There was only one problem: while it felt charming, in a way, there was no challenge or balance. Managing the store didn't have any tension.
The issue was that you could deal with everything in the store too quickly! And the fact of the matter was each customer could only generate so much for you to do; and we were locked in to only have one customer every 10 seconds. The player had too much time.
So the next "feature" was getting actions to take a certain amount of time. This had the effect of making everything take longer, which is usually a bad thing. However, in this case, the key was realising that time itself was the resource we needed to get players to manage. There isn't much other skill in the game, so getting players to prioritize and choose what to spend their limited time on seemed like it should be at the heart of the game. That meant that we needed tradeoffs, and ways to make actions "cost" the player different amounts of their limited time.

This also meant that we had a lot more levers to pull to balance the game. The time certain actions took really changed the feel of the second to second gameplay, while things like frequency and size of deliveries, and customer interactions, let us balance the game over longer periods.
One thing I learned is that balanced doesn't always mean fair. In the game, if there is anything dropped on the floor of the shop, new customers have a chance of leaving in disgust. Because of how the timings work out, it is often just 1 or 2 seconds after someone drops something that a new customer will enter. This means you can have the unfortunate situation of not being able to deal with a mess before you lose a customer to it.

But I think it's great. That's life, I suppose!
Story
Whilst I was working on the shop gameplay, my partner was working on the other half of the game: the story. Building a shop simulator was all well and good, but the whole reason we wanted to do this game was to explore the feeling of being away from home, and having to make tough choices about family.

We drew heavily on inspiration from games like Papers, Please for this. Papers, Please has a similar system of days of somewhat stressful gameplay, punctuated by end-of-day segments where you have to make tough choices about your life and family.
To keep things simple, we decided to implement our choice system as a branching narritive with a single binary choice after each day. A sensible number of days and choices felt like 4/5, which would give us 16 possible endings.

I've never really added story to a LD game before, but I think that's because I've never really had an idea I've wanted to explore like this before. While it might be a slightly blunt tool, I think the choices really put into perspective how difficult making these kind of decisions are in a fictional video game, let alone in real life.

One thing we really wanted was at least one tie between the story and the gameplay. From our very first brainstorm, we had the idea that one of the tasks you had to do was to help your child with their homework. While this works well from a gameplay perspective by giving you a high reward task that takes a long time, it also provides more tension in a story sense between work and family, as well as hopefully making you more empathic towards your daughter. It's really my favourite part of the game.

Consequences
Coming into the final day, I was wondering if the game would keep players engaged. Specifically, there was no reason to do a good job running the shop. Obviously for some players, intrinsic motivation to see how organised they can keep the shop and how many customers they can keep happy would be enough, but I felt some kind of metric of how well you were doing would be nice.
I thought about just having your score be related to how customers you served, but that number was fairly static (you get 10 customers a day, and most of them will buy something). It also meant that helping your daughter or not had no consequences. At this point, we already had the customers making :slight_smile: and :frowning2: faces at times - so why not count those as our score?

While this doesn't change the gameplay in any meaningful way, I think it's a nice wrap up of the day, and just adds some consequences to your actions.
I do wonder how much it was necessary though. While watching people playtest the game, I found that the happy or sad faces the customers make, along with the great SFX, are enough to elict some sometimes fairly strong responses! Perhaps just letting people be guided by their emotions would have been enough.
Polish
I love polish! Polish are those small things that separate good games from great games. Obviously things like cohesiveness in gameplay, art and music can go a long way, but there are some specific things we added that I think make the game feel very complete.

One of these is the title screen! I think an animated title screen is such an easy thing to add that really gives a good first impression of your game. I think 90% of my LD games have some kind of animated title screen. It takes a bit of time, but it doesn't have to be complicated and it's the first thing people see.
Flashing text is another tiny thing that adds more than it costs to add. It just adds a little bit of movement, and pulls the players attention to what they need to do or press. When you've done it a few times, you realise that sometimes it's actually very simple, especially if you have a function that returns the current time. The more you add things like this, the easier it will be.

There are a few other small things that we did to help polish the game. One of those is the transitions between the scenes, which just mean cuts are less jarring. Another that I've already mentioned is the results screen (which has its own flashing text, and subtle movement), and a "day/night cycle", in the loosest sense. This was added hastily as "sky goes blue to orange to dark blue", as otherwise we found the end of the day a bit jarring.

Working in a team
Taking learnings from previous LDs meant that we had a Google Doc with our plan and focuses on right from the beginning. This helped the whole team know what was important and where we were going, especially as we were working with 8 hour time differences!

We've also worked together as a team so much that we know what each of us can do and trust each other to make the decisions that need to be made. It allows us to get on with what we need to do without too much discussion or delay.
I also find it invaluable to have a team to know what to prioritise and what's important. I have a bad habit of hyper-focusing on specific things and not considering the broader picture. Having a team to bounce ideas off of and keep everyone on the right track is great, especially when you trust each other's judgement. A good example of this was adding the interaction with your daughter. I had put it off because I wasn't sure how to implement it, but everyone on the team thought it was the next most important thing, so I got cracking on it.
Playtesting was also a breeze: whilst I was finishing up and squashing bugs, the other members of the team were playing the new builds of the game and adding tasks for me on the doc. It kept us organised and was a very efficient way of working.
Conclusion
I think my post-mortems get longer every time! Thank you so much if you read all or any of this post. I love LD, especially getting insights into how other people make games. If there was anything interesting in the development of your game, please consider writing it up!
If this has tempted you to play our game, you can find it here: Groceries Please! Good luck to everyone in a few days when results come out! :smile: