the sartrean knight

published

Categories iOS
Stack SwiftUI, Combine

overview

The Sartrean Knight is a short interactive story blending medieval fantasy with existential philosophy. Inspired by Sartre's writing on radical freedom and bad faith, the game asks whether any choice is truly free — and lets the knight answer for himself.

You play as a weary knight facing a mysterious gatekeeper. Through dialogue and memories, you will determine your own path and conclusion, featuring multiple unique endings and full support for both English and Portuguese.

I developed The Sartrean Knight in one week during the initial phase of my experience at the Apple Developer Academy. The project was an opportunity to explore interactive storytelling and the design of meaningful choices.

I learned a lot about using JSON to build a game's narrative structure, as well as improving my skills in SwiftUI and Combine. It was also a rudimentary way to implement localization for an app, paving the way for me to later learn about using string catalogs.

code snippets

To keep transitions between scenes instant, I map the story's JSON into a dictionary when the app starts. This swaps out slow linear searches for O(1) lookups, so the game stays snappy even as the script gets longer.

private func loadStory() {
    guard let url = Bundle.main.url(forResource: "story", withExtension: "json"),
          let data = try? Data(contentsOf: url) else { return }
    do {
        let decoded = try JSONDecoder().decode(StoryData.self, from: data)
        for page in decoded.screens {
            pages[page.id] = page
        }
        orderedPages = decoded.screens
        currentPageID = decoded.screens.first?.id
    } catch {
        print("Failed to decode story.json: \(error)")
    }
}

design choices

palette

mist #F1F1F1
ink #000000
paper #FFFFFF

typography

MedievalSharp / antiquity and authenticity
The quick fox jumps over the lazy dog
Jacquard 24 / gothic decorative touch
The quick fox jumps over the lazy dog

rationale

The design of The Sartrean Knight was inspired by the aesthetics of medieval manuscripts, reflecting the philosophical and historical theme of the narrative. MedievalSharp and Jacquard 24 read as manuscript lettering — combined with old paper textures and a muted palette, they make the game feel like it's being read from a book rather than played on a screen.

At each stage of the narrative, I included an image to provide visual context and deepen immersion in the medieval setting. Each image was chosen to match the emotional weight of its scene, not just the visual setting. The image frames resemble illustrations from an old book. While the images themselves don't follow one specific style, they have a gothic feel that captures the characters and setting.

credits

people

design · development
pedro wiezel

fonts

MedievalSharp
Wojciech Kalinowski
Jacquard 24
Sarah Cadigan-Fried

assets

textures
@joou and @samueladekunle (Figma Community)
backgrounds