Categories
Game Design Game Development Geek / Technical

Freshly Squeezed Progress Report: Really Heavy Doors Are Hard to Open

In my last report, the player can now use the flashlight to light their way through The Dungeon Under My House, my non-violent, first-person role-playing game and my second Freshly Squeezed Entertainment project.

I had also started working on adding a special door that required the entire party to open.

Sprint 2024-11: Intro sequence game play

Planned and complete:

  • Door with beam requires minimum number of party members (or strength) to open

Unplanned and incomplete:

  • Create level editor

To recap, my original intro sequence felt too long and boring.

There were unskippable scripts that explained that there was a new member getting inducted into the Explorer’s Club followed by the ceremony itself and then discussion about going on a Snack Quest, and it took too long before you felt like you were playing the game.

For some time I’ve been working on making the introduction more interactive and playable, introducing the main mechanics the player will use throughout the game as soon as possible, and I’m finally almost done with this entire sequence:

  1. The new member induction ceremony only starts once the player starts it, allowing the player to explore the bedroom and meet characters first if they so desire (Conversation mechanics, scripts, and flags)
  2. The Snack Quest starts either after talking to Pat after their induction ceremony or when trying to leave the room after the ceremony. (Quests aren’t yet an actual “thing” in the game, but mechanically this is just scripts and flags)
  3. The objective of getting the jar of pickles from the basement is added once the player enters the kitchen and talks to their parents. (Again, no quests, no objectives, just scripts and flags)
  4. The dungeon entrance is revealed after the player searches for pickles in the dungeon. (Flags and new art)
  5. The dungeon limits exploration without a flashlight. (Lighting, triggers, scripts)
  6. The flashlight can be found and acquired in the bedroom under the bed. (Added furniture, inventory, and items to the game)
  7. The flashlight allows the dungeon to be explored in the darkness. (Flags, scripts, and dynamic dungeon lighting)

The above has been more or less implemented, although I have some work to do to make the conversation mechanics more obvious and intuitive, plus I would like to make it more obvious how the secret door in the basement opens up. What was left to do for the intro sequence:

  1. The party finds a heavy, metal door at one end of the dark hallway, which requires a full party to open (flags, new door type)
  2. Once party opens door, they eventually find themselves in a wide open area with access to many parts of the dungeon.

My original idea for the door was that there would be a heavy beam acting as a drop bar that prevents the door from being opened. The only way to open it is to have a full party, as everyone will need to work together to move the drop bar.

It seems simple enough, but there were a lot of questions I had to answer:

  • Can I animate the beam moving, or should it just instantaneously be in a new position?
  • Where is the beam when it isn’t engaged? Lying on the floor? Leaning against an adjacent wall? Do I need to guarantee a wall is adjacent?
  • Should the player be able to re-engage the beam?

It seemed like a lot of work, and so I decided to just…not do it.

Instead, I decided to make doors have different weights. Normal doors are easy to open, but really heavy doors require more people.

The reason why I wanted a door to require a full party to open, whether it was with a heavy drop bar or just a heavy door, was that I wanted the player to have a reason to go back to the bedroom and get a full party together in case they decided to explore the dungeon early.

The Dungeon Under My House - door is too heavy

Basically, this intro sequence now teaches the player how to play the game: they have shown that they can talk to characters using the conversation system, collect items by interacting with inventories, navigate the darkness by using a portable light source in the form of a flashlight, and now add characters to their party.

So, now what? After the player opens the big heavy door at the end of the hallway, what happens then?

That’s when the rest of the game really starts.

But I of course need to create the next part of the dungeon that they would see.

Up until this point, I’ve been using my game’s code to create the dungeon, and it worked fine when I had a simple test dungeon of a few rooms and some doors, but it’s not terribly intuitive to work this way.

I knew that I wanted a GUI editor eventually, and in the past I looked into the Tiled map editor, but I decided it was time to look more seriously into it. I could create my own from scratch, which I imagine would be fun and all, but it would probably take me way too long to do, and I want to get the game finished sometime in my lifetime.

Thanks to eishiya in the Tiled Discord, I got some very direct help figuring out how to use Tiled to create the dungeon layout in a way that I can then use in my existing code.

The Dungeon Under My House - Using Tiled to create the dungeon layout

The above uses a tileset image that eishiya provided.

I still have some things to learn about how to use this tool, but I’m already figuring out some keyboard shortcuts and how to use layers. eishiya demonstrated how to use terrains to essentially paint the walls automatically, and I’m building up my own understanding of how to get there.

But besides figuring out how to use Tiled, my next main concern is to figure out how to import a simple map that I created, which should be straightforward although there is no Yaml export, and my existing code doesn’t have a JSON reader.

I am also interested in a custom exporter to make the map more directly related to how my code treats the dungeon levels.

Oh, and after a year of screenshots and videos, my wife alerted me to a typo that I have now fixed:

The Dungeon Under My House - FORWARD typo

The Dungeon Under My House - FORWARD typo fixed

Thanks for reading!

Want to learn when I release The Dungeon Under My House, or about future Freshly Squeezed games I am creating? Sign up for the GBGames Curiosities newsletter, and download the full color Player’s Guides to my existing and future games for free!

Categories
Game Design Game Development Geek / Technical

Freshly Squeezed Progress Report: Lighting the Way

Last time, I reported that the player can now obtain items from furniture and that I was planning out how the flashlight will work in The Dungeon Under My House, my non-violent, first-person role-playing game and my second Freshly Squeezed Entertainment project.

I implemented a working flashlight and proceeded to work on the next in-game obstacle for the player.

Sprint 2024-10: Intro sequence game play

Planned and complete:

  • Flashlight automatically lights up dark dungeon

Unplanned and incomplete:

  • Door with beam requires minimum number of party members (or strength) to open

Now that the party can acquire a flashlight from under the bed, they can return to the dungeon to light their way through the darkness.

As I said in the previous report:

I think requiring the player to manually turn the flashlight on and off would be tedious.

Instead, I’d like the flashlight to turn on and off based on the current light conditions. So if the player is entering an area that is getting darker, then the portable light source turns on automatically, and once the player enters an area with getting brighter, the portable light source turns off automatically.

I figured a decent way to make it obvious that the flashlight’s status was changing was by popping up a piece of scripted dialogue.
The Dungeon Under My House - turning on the flashlight automatically

The Dungeon Under My House - turning off the flashlight automatically

I created two light thresholds, one for when it was getting too dark and you needed to use your portable light source, and one for when it is getting bright enough that the light wasn’t needed anymore. I figured that with two separate thresholds instead of a single boundary, the scripts wouldn’t pop up too frequently if the player decided to move back and forth between two grid cells.

The somewhat tricky part was the actual dynamic lighting of the dungeon. I was worried that the raycasted dungeon rendering code would be slowed down, but with only a handful of light levels being modified, it turned out that it wasn’t a big hit to performance.

Otherwise, it turned out to be straightforward to project out from the party’s current position and modify light levels on the fly, and as the party turns to the side, you can see that part of the dungeon gets lit up as they turn.

The Dungeon Under My House - dynamic lighting

I’m not entirely happy with it, as it seems to lighting up more intuitively when turning one way but not as much the other, but on the other hand, it’s a quick turn and the player might not see much anyway.

Another issue is that I think the way the lighting works is functional enough, but I wish it looked more like a flashlight, with a rounded illumination. But maybe I’ll come back to it in the future.

But one thing I want to address sooner than later is that it feels weird. The light projects out in a straight line, so you can see the cells directly in front of you, but the cells to either side are left at their default light levels, which can be pitch black. But instead of looking like you are walking in a dark hallway with a flashlight, it looks like the walls on each side are just super dark.

The Dungeon Under My House - dynamic lighting

Strangely and counterintuitively, to make it feel more correct, I might need to light up the cells to the sides a little.

But in the meantime, one more step in the intro’s game play is completed: the player can navigate a space that was originally too dark to proceed through.

I next started working on what the player would find at the end of the dark hallway. My plan was for it to be a door with a heavy beam across it. In order to open the door, the party would first need to remove the drop bar, and it would require a full party of three members working together to do so.

Currently, the only doors in the game can open and close, so adding a barrier and/or a lock was a future task, and the future is now.

It made me think about the need to persist the state of doors and how I might rearrange the data structures in a way that make it easier to save and load those states.

I’ve also been watching videos about level design, which got me thinking about this intro hallway. My original plan was to have one main way forward and one non-obvious and secret way into a different part of the dungeon. Now I am considering adding a third or even a fourth path, allowing a player who decided not to get the flashlight or not get a full party to proceed anyway. I’m considering how much freedom I want to allow the player to have this early and wondering if I should keep the intro sequence more direct and allow that freedom later.

But first, I need to work on the door, and that work should happen this coming week.

Thanks for reading!

Want to learn when I release The Dungeon Under My House, or about future Freshly Squeezed games I am creating? Sign up for the GBGames Curiosities newsletter, and download the full color Player’s Guides to my existing and future games for free!

Categories
Game Design Game Development Geek / Technical

Freshly Squeezed Video Progress Report: Grabbing the Flashlight from Under the Bed

Here’s the companion video for Monday’s Freshly Squeezed Progress Report: Grabbing the Flashlight from Under the Bed:

Enjoy! And let me know what you think by replying below!

Categories
Game Design Game Development Geek / Technical

Freshly Squeezed Progress Report: Grabbing the Flashlight from Under the Bed

In my last report from three weeks ago, I created inventory slots visible on the screen for the player’s party and created furniture with its own inventory for The Dungeon Under My House, my second Freshly Squeezed Entertainment project.

Since then, I have not been terribly productive. Between preparing for my tax appointment, grieving over my cat Gizmo passing away, producing updated versions of my leaf-raking business game Toytles: Leaf Raking for the Spring Sale, dealing with a minor cold, and participating in various family outings and obligations, forward motion on this project took a pause.

But I am slowly getting back into the game dev habit.

Sprints 2024-8 and 2024-9: Intro sequence game play

Planned and complete:

  • Allow player to search objects in room

Unplanned and incomplete:

  • Flashlight automatically lights up dark dungeon

As I predicted, viewing the furniture’s inventory was straightforward, but interacting with it took some effort.

I did some fun math to dynamically create the grid for a furniture’s inventory. The bed has 4 inventory slots, and other furniture might have a different number. The more slots available, the smaller they can be, but with fewer slots, the slots themselves can take up more real estate on the screen.

The Dungeon Under My House - furniture inventory view

I liked the way it becomes obvious that it is the focus of the current screen’s interaction.

As for actually interacting with the furniture’s inventory slots, what I decided to do was allow the player to select two different inventory slots to swap them.

This decision nicely solves the problem of what to do when a character’s inventory is full, as the act of dropping something to make room for it becomes a natural part of the interaction.

At least, it does for individual items such as a Flashlight. I haven’t addressed what should happen if the item has a quantity, but that’s for Future Me to worry about.

Also, Future Me, when you read this, don’t forget that we’ll need to figure out how the player should interact with the party’s inventory when not actively viewing furniture inventory. Thanks, you’re the best!

The Dungeon Under My House - furniture inventory interaction

The Dungeon Under My House - furniture inventory interaction

Once I had the ability to acquire items from furniture, another key part of the intro game play was completed: the party can get a Flashlight to illuminate the darkest parts of the newly discovered dungeon.

An obvious game play thing to do is to allow the player to interact with the item, and in this case, toggle the flashlight on and off at will. Then I can introduce the need to conserve the flashlight’s batteries and provide a means of replenishment of those batteries, either by recharging or replacement.

But while those mechanics sound kind of neat, and maybe in a different game they would be interesting to play with, in this game? I think requiring the player to manually turn the flashlight on and off would be tedious.

Instead, I’d like the flashlight to turn on and off based on the current light conditions. So if the player is entering an area that is getting darker, then the portable light source turns on automatically, and once the player enters an area with getting brighter, the portable light source turns off automatically.

And to avoid the tedium of having the light flicker on and off when crossing over a single light boundary, I think it would make sense to have two different thresholds. So the light turns on when entering a dungeon cell that is starting to become quite dark, but if you immediately leave that cell, the light doesn’t turn back off right away. You have to enter into a slightly brighter area before that light turns off.

But I’ll playtest it to see if it feels weird.

And naturally, the biggest concern is that if the flashlight is on, then the player should be able to advance into the darkest areas of the dungeon because they won’t be dark anymore. Which means rendering the dungeon by incorporating this temporary light level.

While the regular light levels spread out to adjacent cells, I think the effect of the flashlight on the light levels of the dungeon grid cells should mimic what a flashlight does. It will be a directional light, so the only cells affected are directly in front of the party.

Of course, what happens when the player turns to the left or right? I am sure I can mimic the arc of light that would occur naturally, but it might be a bit tricky.

But by the end of the week, most of this work was only on paper, so expect to see how I actually implemented it in my next sprint report.

Thanks for reading!

Want to learn when I release The Dungeon Under My House, or about future Freshly Squeezed games I am creating? Sign up for the GBGames Curiosities newsletter, and download the full color Player’s Guides to my existing and future games for free!

Categories
Games Marketing/Business

GBGames Turns 18! Let’s Have a Sale to Celebrate!

In 2006, I formed GBGames, LLC.

Next week will be the 18th anniversary. That’s a long time!

To celebrate, I will be doing something that I have never done before: I’m having a sale!

I know it is spring, but you miss the colorful leaves of the fall, right? Well, here’s your chance to relive that wonderful season at a very rare discount.

From now until the 22nd, Toytles: Leaf Raking will be 50% off the regular sale price.

Get my leaf-raking business simulation game, Toytles: Leaf Raking for Windows, Mac, and Linux today!

Toytles: Leaf Raking

During the 90 days before winter, you’ll:

  • Seek out neighbors who need your services and turn them into paying clients.
  • Make key purchasing decisions, such as which types of rakes to buy and how many yard bags to keep in your inventory.
  • Balance your energy and your time as you seek to keep your clients happy without overextending yourself.
  • Visit the kitchen to ask your parents for their advice and wisdom.
  • Learn about personal responsibility and the importance of keeping your promises.

Toytles: Leaf Raking weather forecast

Toytles: Leaf Raking - gaining a new client

Toytles: Leaf Raking - buying supplies at the general store

Toytles: Leaf Raking - client's yard view

NO ADS, NO IN-APP PURCHASES, AND NO VIOLENCE

Have peace of mind with an ad-free, safe game that may inspire your own entrepreneur.

Want to learn more about Toytles: Leaf Raking? Go to https://www.gbgames.com/toytles-leaf-raking/.

Available for Android, iPhone/iPad, Windows, Mac, and Linux

Get your copy of Toytles: Leaf Raking today, and see if you have what it takes to run your own leaf raking business!

Categories
General

A Goodbye to Gizmo, My Hacker Cat

On Friday, my family and I said goodbye to our cat Gizmo. She was about 21 years old, and she was in my life for 18 of them.

Gizmo

Her brother Diego died in 2018, and I thought she would follow close behind him. For years I have been preparing myself for this day, trying not to take her presence for granted.

It still hits hard.

Despite eventually learning that Diego was the greeter, I knew Gizmo was always the brave one. When I first met the cats, she was the one who came out of the carrier first. And each time I’ve moved, she was the first one out to explore the new home.

And I recall my first time meeting Gizmo. My friends let out their own cats to meet them, and Gizmo promptly lay down and, without directly looking at their big cat, growled an amazing growl.

She was the chillest, most calm cat. She never bit anyone, and yet when she did have a rare growl, it was a good growl.

Gizmo doing her "I'm Batman" impression

The only time she ever came close to biting was after I had been away for a long trip. Upon my return, she meowed and licked my fingers, periodically nibbling at them. I took it to mean that she missed me and was upset that I was gone for so long.

Gizmo seemed to enjoy car rides. She always liked to see what was going on outside the windows. On her first drive, I remember her sitting in the console, looking out the front window before eventually finding her way to the side windows, with her paws up while she watched the world go by.

She was mostly quiet and kept to herself, especially around strangers, but when she wanted to cuddle, it would not matter what you were doing. She would let you know, and she would get in your lap, or on your chest, or in your arms.

Or at least with me. My wife says that it took three years before Gizmo would sit on her lap.

And even then, if I showed up on the couch, often Gizmo would make her way to cuddle with me.

Often when I was at my desk, she would jump up and get into my lap, and sometimes she would sit facing the computer as if she was the one at the keyboard. So I called her my hacker cat.

Gizmo the hacker cat

Gizmo the hacker cat

Gizmo the hacker cat

Gizmo and Diego were adorable together, especially when they slept. And often they would sleep draped across me.

Gizmo & Diego

Gizmo & Diego

Gizmo & Diego

Gizmo & Diego

Right before her brother passed away, we learned Gizmo had high blood glucose levels, and after changing her diet, she bounced back.

And that was the theme for her health woes for the next handful of years: she would be relatively fine, then one day she would seem to get terribly sick or otherwise seem to be in a poor quality of life, then we’d think, “This must be the end,” and then she’d bounce back, albeit sometimes at a lower baseline than before.

When the COVID-19 pandemic hit, and I started working from home regularly for the day job, Gizmo became a minor celebrity on my team calls. People would sometimes greet her before they greeted me, in fact. B-)

Gizmo getting involved in my team meetings

Our routine was that I would get her breakfast, clean her litter boxes, then get to work in my office, and she would join me on the chair next to me, sleeping there or cuddling on my lap.

Gizmo my on-site remote coworker

If I took too long of a break, she would let me know to get back to the office.

But sometimes she would be an enabler and take breaks with me.

Gizmo taking a break with me

Over the last few years, I’ve seen her health decline very slowly. She had a lump on the back of her neck, and it grew to be pretty big, and it turned out it was a slow-growing cancer. The vet removed the lump but they said they couldn’t get everything, and so we had no idea how long we had with her.

Each time her behavior changed in a way that made me worried, I was at the vet with her. They always said she was incredibly healthy for her age.

But Gizmo started slowing down. I used to worry about her jumping up and eating my plant by the window, but eventually her attempts to jump up failed, and after awhile she stopped trying.

She used to jump up into my lap, or the chair next to me and the desk, but there were days when she wouldn’t make the jump successfully. For some time now, I would pick her up when she came into the office and looked up at me expectantly, and when I was on the couch, which was lower, the same story played out. One day, it just became too hard for her to jump up, so I would need to pick her up.

Our neighbors have little children, and when we would leave town, they would sometimes cat sit for us. Their children called our house “Gizmo’s House” and, despite her being such an old cat who mostly ate and slept, they loved her, and she was very tolerant of them showering her with attention.

Sometime back she became quite deaf, and while I could tell she could still sense the vibration of a loud noise, she wouldn’t necessarily be able to detect where it was coming from. Like with Diego, I used to whistle and she would sometimes come to me, but then came the day when I realized she was getting startled because she didn’t know I was right behind her.

Sometime in the last month or so, I think Gizmo lost some of her eye sight. She seemed to lose track of the laser pointer dot in a way that I didn’t expect, and I noticed that when she walked up stairs that she seemed to get startled with each step when her face would brush against it.

Her blood work recently showed issues with her kidneys, and she was already standing awkwardly. Her tail tucked to the side. We could tell she was in pain, probably due to the combination of her kidneys, the slow-growing cancer which has had years to grow, and general arthritis, and she had been for some time.

She was still eating and using the litterbox, and I was told by friends that I’d know if things were at the end if she had more bad days than good. We had seen her bounce back from what seemed like death’s door multiple times. She didn’t seem like she was so bad that euthanasia made sense yet, and I definitely didn’t want to end her life prematurely.

But one day last month she seemed weak and struggled to stand, and despite bouncing back for a few weeks after that, we knew her quality of life was getting bad and would only get worse. Last week she tripped getting out of her bed, and she didn’t land very well when she jumped out of my office chair. Both were things that were seeming to happen more often. Her quality of life was clearly deteriorating.

So we made the hard decision to say goodbye before she suffered for much longer, a decision I wish I had made with Diego at the end of his life.

I called the vet in the morning to make an appointment for that evening. It was a weird feeling to know with so much certainty that it was the last day I would spend with her. I took off the afternoon from the day job so I could spend as much of her remaining time with her.

Gizmo, I love you. I’ll miss the sound of your purrs when I held you close to me. I’ll miss singing Stray Cat Strut to you. I claim it was your favorite song, and while I don’t know if it actually was, it was my favorite one to sing to you. I’ll miss the way you would press your head into my hand when I was petting you. I’ll miss needing to worry about accidentally rolling over you in my office chair since you sometimes hung out behind it and waited for me to notice you on the floor next to me. I’ll miss how sometimes you didn’t wait for me to notice and would paw up at my chair to let me know you wanted me to pick you up. I’ll miss seeing you shortly after you finished eating with a little bit of food on your nose. I’ll miss the way you would lie across my chest or my arm when I was doing my morning exercises on the floor, and I miss sleeping next to you on the couch, or on the floor.

Me and Gizmo

I hope you felt loved right until the very end, and you didn’t feel pain anymore.

After 18 years of having a pet in my life, there is a hole in my daily routine, and in my home. I no longer have Gizmo to greet first thing in the morning. The place where her food and water used to be is now a blank space. Eventually her Boppy pillow that she used as a bed will also disappear, and so will her basket of toys.

My wife said that she thinks I might not realize it because I didn’t grow up with pets, but my relationship with my cats was special. She has never seen cats with such a devotion to their human, and she said it was this amazing co-dependent relationship “in a good way.” She said my cats were spoiled and had such a good life.

And I hope they did.

Categories
Game Design Game Development Geek / Technical

Freshly Squeezed Video Progress Report: Items & Inventory

Here’s the companion video for Monday’s Freshly Squeezed Progress Report: Items & Inventory:

Enjoy! And let me know what you think by replying below!

Categories
Game Design Game Development Geek / Technical

Freshly Squeezed Progress Report: Items & Inventory

In my last report, I prevented player navigation in the dark, then started working on the inventory system for The Dungeon Under My House, my second Freshly Squeezed Entertainment project.

I continued the inventory work this past week.

Sprint 2024-7: Intro sequence game play

Planned and complete:

  • Party member can carry items

Unplanned and incomplete:

  • Allow player to search objects in room

I started the week my rendering the inventory slots for individual party members. For now, each party member can have three items in their inventory, and you can see it in the HUD.

The Dungeon Under My House - inventory slots

And I created a sprite for the Flashlight and made sure that it displayed in those slots if a party member had it in their inventory.

The Dungeon Under My House - inventory slots

That worked when I temporarily coded it in, but the next thing was to have furniture in the room that the player could search and find items such as the Flashlight.

So I created the concept of Furniture. Right now, everything in the room is just drawn as part of the background, but now you can click on something such as the bed in the bedroom and get a description.

The Dungeon Under My House - furniture

Now the other interesting thing about Furniture is that it can have its own Inventory. I had trouble getting things to persist properly until I simplified my code and data structures a bit, unfortunately.

So by the end of the week, I still needed a way for the player to view a given furniture’s inventory slots, then allow the player to take items and put them into their own inventory.

I imagine that this week I’ll find the former is straightforward but the latter will require some effort to handle edge cases and user interface issues.

For examples of things I anticipate needing to worry about, how should the game respond if the player’s inventory is full? Can the player transfer items to the furniture as well? Can I create an interface that allows someone to either use the mouse or a keyboard?

Thanks for reading!

Want to learn when I release The Dungeon Under My House, or about future Freshly Squeezed games I am creating? Sign up for the GBGames Curiosities newsletter, and download the full color Player’s Guides to my existing and future games for free!

Categories
Game Design Game Development Geek / Technical

Freshly Squeezed Video Progress Report: Dungeon’s Too Dark, Can’t Proceed

Here’s the companion video for Monday’s Freshly Squeezed Progress Report: Dungeon’s Too Dark, Can’t Proceed:

Enjoy! And let me know what you think by replying below!

Categories
Game Design Game Development Geek / Technical

Freshly Squeezed Progress Report: Dungeon’s Too Dark, Can’t Proceed

Last time, I reported that I was replacing my test dungeon with the first actual locations for The Dungeon Under My House, my second Freshly Squeezed Entertainment project.

I set out to allow the player to interact with the new environment.

Sprint 2024-6: Pre-production and initialization

Planned and complete:

  • Prevent player navigation if dungeon area is pitch black

Unplanned and incomplete:

  • Party member can carry items

Last week started out quite productive, and I was able to knock out a feature that impacts the player’s navigation through the dungeon. If you are trying to move into a grid cell that is too dark, the game stops you from proceeding.

The way it does so is by treating the darkness as an obstacle, much a wall or closed doorway that prevents movement and tells you why.

The Dungeon Under My House - too dark to proceed

And in this case, it hints at the next set of features I need to implement. You need a flashlight to proceed, and that means the characters need to be able to carry items, which means the game needs an inventory system.

I created an inventory system that allowed for two different types of items: individual items that take up an entire slot, and items that represent quantities.

So a Flashlight exists as an individual item. If you get a second Flashlight, it takes up a second slot.

But a Pickle Jar represents not just a jar but also the contents of the jar. Maybe you eat some of the pickles but not all of them at once. The original Legend of Zelda game had two kinds of potions, and one of them was basically “you can use it twice.”

I like the idea that using up all of the pickles results in an Empty Pickle Jar, which can come in handy.

But that can come later.

I spent a little bit of time trying to figure out how complex adding items to the player’s inventory should be. What if you have get a second jar of pickles? Does it add to the quantity of the original jar, or do you just get two jars, each with a set quantity? Most games do the former, but practically speaking, who wants to merge pickle jars together? Ew.

But I decided that such design decisions can come later when I need to decide them. For now, I created a simple Inventory which I can assign to entities in the game. So I did, and my next job was to ensure that inventories can get persisted when the player saves.

Which did not work, and it was incredibly bizarre because the code looked like it should. Yet running the tests was telling me that it wasn’t.

So I ended the week by losing productivity because I had accidentally introduced a bug that was manifesting in weird ways. I had one unit test that kept insisting that as soon as I added an item to an inventory that the inventory was still empty, and other seemingly unrelated tests would inconsistently take up a ton of memory on the system, seeming to lock everything up for minutes at a time.

Ultimately what was happening was that I was initializing my inventory’s internal std::vector and the internal integer that initializes its size in the wrong order, which meant, well, most likely it is undefined what happens, but it includes in the realm of possibilities initializing the size of the vector of Items with a very, very large value.

Once I figured it out, partially due to lots of logging statements and mostly thanks to the amazing tool valgrind highlighting the exact problematic code (and thanks to my Past Self for having high standards so that there wasn’t a lot of other noisy output due to other problems to wade through), I corrected the mistake, but by that point, it was a few precious hours of development later.

Never code tired.

Anyway, this coming week I anticipate finally adding the ability for the player to inspect the inventory of a particular party member as well as find items in other parts of the game, such as the bedroom where the flashlight will be.

And once the player can acquire a flashlight, being able to light the way in the darkest areas of the dungeon comes next.

Thanks for reading!

Want to learn when I release The Dungeon Under My House, or about future Freshly Squeezed games I am creating? Sign up for the GBGames Curiosities newsletter, and download the full color Player’s Guides to my existing and future games for free!