The Cozy Library, Pt. 4 - Polish and Optimization

Getting the main mechanics done with some time to spare was definitely a huge help. I’d been raring to go on smoothing out some of the rough edges of the game, and I had a trello board filled with ideas on how to do that.

A lot accomplished, but always more that can be done.

Some of the main points were around optimizing the game a bit. I originally had planned on instantiating the book objects up front and just repositioning them - after some play I realized I would need to occasionally instantiate more books during the game to ramp up the collection’s volume and I wanted to avoid that.

To solve that I wrote a book pool to instantiate the maximum possible number of books all up front and send them to an active pool when in use. I also sent active books shelved on the bookcases to a collected pool so I had a quick reference to all the active books in the library (and not on carts).

I also wanted the books to not get too disheveled if the player quickly threw a lot on the stacks, so I wrote a quick sort for that second pool to put them all in order and redistribute them evenly on the shelves overnight. This also solved the problem of any one shelf getting too full and cluttered with books so the next day’s work will go smoothly.

I wanted to disincentivize the player from working fast, so I also kept a tally of those incorrectly placed books and subtracted one from the player’s end of day multiplier for each book placed wrong. This is currently a pretty rough punish, as the player’s multiplier is calculated via their accuracy (up to x10 for a 100% accurate shelving day) and an extra +1 multiplier for each cleared cart shelf. In testing it has resulted in some pretty ludicrously bad negative scores.

Ouch.

I think this needs a fair bit more balancing and improvement to the presentation - probably a letter grade at the end of the day is sufficient while hiding the actual score, with a bit more abstraction to the player’s performance over time than just an ongoing number. Enough A++ days could result in some awards to hang on their wall or some other reward - currently the gameplay loop is infinite, so giving the player something else to shoot for besides making it another day would go a long way.

I saved some more environment work to this moment more towards the end, once the mechanics were working. In the previous iteration of the game the library looked out on an alley with just a few building walls to block line of sight - not much else going on. I created a small city exterior that the player can look out on during lulls in their work day - this further shows off the weather effects we implemented partway through.

A cozy nighttime scene.

That part was always pretty important to me to implement - the feeling of being nice and warm inside a building while reorganizing your books was sort of the inspiration for the feel of the game. I realized the surroundings contributed a lot to this so it was nice to have the opportunity to flesh this out more.

My first playtesters weren’t a fan of the gas station. Gas stations aren’t very cozy. True. Might just expand the park.

I was pleasantly surprised with how performant the game has been so far - it’s not super heavy on the assets, and the books are all drawing from one material atlas, they were definitely the highest risk point there. The pooling helped a fair bit. I could probably do some more work on the lighting - that might be a bit on the inefficient side, especially with the streetlamps (although those are only enabled at night not during gameplay so that impact wouldn’t be felt as much).

For now things feel very smooth, and I’m looking forward to putting in a few more bits of polish as I hand the game off to some testers to put it through its paces and help me refine more. I’ll follow up in the next devlog with those updates and how testing goes.

Stay tuned - or, give the game a spin for yourself, it’s live on itch.io! I’d love to hear what you think of the project so far and any thoughts on how to improve it.

A Cozy Little Library - Play on itch.io

Next
Next

The Cozy Library, Pt. 3 - UX And game Feel