Big news - the prototype has landed!

Hey, all! It is with great pleasure that I am announcing the launch of the very first prototype for Indexing Your Heart today. Finally, after a year of planning, replanning, and development, a tiny prototype to show what this game’s potential is has finally landed.

Hey, all! It is with great pleasure that I am announcing the launch of the very first prototype for Indexing Your Heart today. Finally, after a year of planning, replanning, and development, a tiny prototype to show what this game’s potential is has finally landed.

TL;DR - The prototype has launched for iOS. It’s very rough, but demonstrates the technical aspects of how the game will function. Try the prototype at https://indexingyourhe.art/prototype/.

A paintbrush and a canvas

I’ve done a lot of work since the last devlog, where I showcased a number predictor using SpriteKit and Core ML. The basic project for this became the foundation for one of the biggest parts of the game: the puzzle system (aka Paintbrush). I won’t go into details as to how the puzzles work, as that would spoil the solutions, but the general idea of using a CNN to predict what solution the player has drawn works pretty effectively. It took about 900 images with slight augmentations in Create ML to get it working solidly; however, there’s still a bit of leniency in the code that will need to be addressed.

I’ve found that Paintbrush works really well for iPads with Apple Pencils, though drawing with your finger or cursor on a Mac also works as well. There’s no boundary like there is in _The Witness_, though I do have some code that prevents the player from drawing outside the panel. I still have to tweak Paintbrush some more to be better with validation, but I’m still pleased with the result.

Likewise, I’m happy with the current setup for maps. Typically, when I make games with SpriteKit, I use the built-in tile map node, SKTileMapNode. However, I’ve found this node isn’t all that performant and can often cause memory leaks. Furthermore, making levels and maps using it can be painful, especially when working with tile sets; tile sets have to be generated in the SpriteKit tile set format, which takes a lot of work to set up if you have hundreds of tiles.

Recently, I discovered a framework that brings support for tile maps created with the Tiled map editor called SKTiled. After creating a tile set with the Tiled editor and mocked a simple tile map to use in SpriteKit, I wrote a small scene to import the tile map, and it works really well. I was able to cut down boilerplate code I usually wrote for parsing tile maps and still have the flexibility of the levels. I still need to measure the performance cost of SKTiled, but I’m loving this new approach already.

A quick conversation

The story is the other big aspect of this game that I’ve been fully developing, and it was the very first thing I did before doing any work on the game’s code. This helped me focus a lot on the character development and the general direction of where to take the game.

Generally, my experience with writing stories for games comes from writing visual novels like Unscripted. As such, I wanted to ensure the game has a solid experience as a visual novel in addition to Paintbrush and its Witness-like behavior. This includes a lightweight scripting system that is performant and expressive.

Enter Caslon, the visual novel component of the game, and Jenson, the file format for the game’s dialogue. Both were designed to be lightweight, flexible, performant, and expressive in nature. I based the Jenson file format loosely off the Dialogic timeline format, which stores its data as JSON. To make it lightweight and performant, I’ve compressed the files using the Brotli compression algorithm and store the compressed data as a Base64-encoded string. The tiny file size also helped my code read the files more quickly, making loading them a breeze. The current story, in its scripted form, takes only 77 KB, which is even smaller than the Markdown source files they came from. If you’re interested in playing around with the Jenson format, I recommend checking out JensonKit at https://github.com/Indexing-Your-Heart/JensonKit.

After building the Jenson format and converting the story files, I worked on creating a basic visual novel scene (aka Caslon) that took advantage of those files. It’s a relatively basic scene that displays dialogue and menu options, when necessary. However, it works pretty well and behaves similarly to what Dialogic and Ren'Py offer. I’m pleased with the results and look forward to testing the support for loading images once I can conjure up some assets to use.

A cleaner workspace

I focused a lot on making the game’s codebase as portable, modular, and testable as I can. Though I haven’t written unit tests for some of the game’s functions yet, I tried to separate most of the concerns and subsystems into their own separate Swift packages, which get imported into the main game. Caslon and Paintbrush live in their own packages, and Shounin, the game project, imports the rest. Given the modules and how I structured the project, I can safely say this is the Swiftiest game I’ve written, literally. I hope to further improve the codebase as the game grows.

Even though this is just the prototype version of the game that shows what the game will feel like, I am really proud of what I have accomplished. I’m looking forward to hearing how others find the prototype and see where my target audience is.

Check out https://indexingyourhe.art/prototype/ to join the TestFlight program and try the prototype today. I also highly encourage joining the Discord server at https://discord.gg/CXxnVhX to join the conversation.