The Last Candle - Project Story

Inspiration

The inspiration for The Last Candle came from classic psychological horror games that focus on atmosphere over jump scares. I wanted to create an experience where every choice matters, where the player feels genuinely vulnerable with only 3 HP, and where the darkness itself becomes a character. The concept of "the last candle" represents hope fading in the face of overwhelming darkness - a metaphor that resonates deeply in horror storytelling.

I was also inspired by retro pixel art horror games and wanted to capture that nostalgic aesthetic while building something modern and cross-platform. The idea of multiple endings based on moral choices adds replay value and makes players question their decisions long after the game ends.

What it does

The Last Candle is a top-down psychological horror adventure game where you explore a haunted house with only 3 HP and limited resources. You navigate through three interconnected rooms (Living Room, Bedroom, and Office), each with its own atmosphere and challenges.

Key Features:

  • Exploration: Navigate through a dark house with wall collision and door systems
  • Inventory Management: Collect items like keys, weapons, and healing items displayed in a bottom hotbar
  • NPC Interaction: Encounter a trapped soul who asks for your help - your choice determines your fate
  • Monster AI: Face a relentless creature that hunts you through the house with intelligent pathfinding
  • Multiple Endings: Discover three different endings (Good, Bad, and True) based on your choices and actions
  • Cross-Platform: Play the Java desktop version or the HTML5 web port

The game emphasizes atmosphere, vulnerability, and moral ambiguity. There are no clear "right" answers, and every ending reveals something different about the story.

How we built it

The Last Candle was built using Java with ACM Graphics for the desktop version and HTML5 Canvas + JavaScript for the web port. The development process was heavily assisted by Kiro AI, which transformed what would have been a 3-month project into a 3-week sprint.

Technical Architecture:

  • Entity System: Base Entity class with Player, Monster, and NPC subclasses
  • Pane-Based Architecture: Each game screen (menu, rooms, endings) is a separate pane with lifecycle methods
  • Item System: Type-safe item management with enums for weapons, keys, and healing items
  • Collision Detection: Bounding box collision for walls, doors, and entities
  • Animation System: Frame-based sprite animation for player and monster movement
  • Save/Load System: File serialization for persistent game state

Development Workflow with Kiro:

  1. Created detailed specs with requirements, design, and tasks
  2. Used vibe coding to rapidly implement features through natural language
  3. Set up hooks for auto-compilation and workflow automation
  4. Wrote steering documents to maintain horror aesthetic and code quality
  5. Iteratively tested and refined based on playtesting

The web port was achieved by translating all Java classes to JavaScript while maintaining the same architecture, using Canvas 2D API as the rendering layer.

Challenges we ran into

1. Collision Detection Edge Cases Players were clipping through wall corners during diagonal movement. The solution was to check collision before applying movement and adjust the collision bounds to be more forgiving.

2. Monster AI Balance The initial monster was either too easy to escape or impossibly difficult. Finding the right speed (2 pixels/frame vs player's 4) and implementing distance-based pathfinding created the perfect tension.

3. Web Port Synchronization Keeping the Java and JavaScript versions in sync was challenging. I created a Kiro hook that reminded me to update the web version whenever Entity classes changed, preventing drift.

4. Ending Logic Complexity With three endings triggered by different combinations of choices and actions, the conditional logic became complex. Using a spec-driven approach to map out all paths beforehand prevented bugs.

5. Performance Optimization Initial frame drops during room transitions were solved by implementing sprite caching and using setVisible() instead of removing/re-adding objects.

6. Horror Aesthetic Consistency Maintaining the dark, minimalist horror feel across 80 hours of development required discipline. Steering documents with color palettes and design principles kept everything cohesive.

Accomplishments that we're proud of

  • 100% Task Completion: All 41 spec tasks completed successfully
  • Cross-Platform Success: Achieved 95% feature parity between Java and web versions
  • 3x Productivity: Completed in 80 hours what would have taken 240+ hours without Kiro
  • Zero Technical Debt: Clean, maintainable codebase with proper architecture
  • Polished UI: Cohesive horror aesthetic with atmospheric visual design
  • Multiple Endings: Successfully implemented branching narrative with three distinct conclusions
  • Comprehensive Documentation: Detailed specs, steering docs, and usage reports
  • Automated Workflow: GitHub Actions for Windows installer builds

The game feels complete and polished, not like a hackathon prototype. Every feature works as intended, and the horror atmosphere is genuinely effective.

What we learned

About Game Development:

  • Psychological horror is more about atmosphere and vulnerability than jump scares
  • Player agency and meaningful choices create emotional investment
  • Balancing difficulty (monster speed, HP, resources) is crucial for tension
  • Minimalist UI can enhance immersion in horror games

About Kiro AI:

  • Spec-driven development prevents scope creep and keeps projects organized
  • Vibe coding is incredibly fast for implementation once architecture is defined
  • Hooks eliminate tedious tasks and create a smooth development flow
  • Steering documents are essential for maintaining consistency over time
  • Natural language descriptions can generate complex systems (like Monster AI) in one shot

About Software Engineering:

  • Upfront design (specs) saves massive amounts of refactoring time
  • Automated compilation catches errors immediately, preventing compound bugs
  • Cross-platform development is easier when architecture is clean and modular
  • Documentation written during development is far better than retroactive docs

About Horror Design:

  • Color palette matters enormously (black, dark gray, white, red)
  • Empty space and silence create tension
  • Limited resources (3 HP, few items) make every encounter meaningful
  • Ambiguous narratives let players fill in the gaps with their imagination

What's next for The Last Candle

Immediate Plans:

  • Add sound effects for footsteps, doors, and monster encounters
  • Implement difficulty settings (Easy/Normal/Hard)
  • Add more rooms (basement, attic) to expand the house
  • Create additional monster types with varied AI behaviors

Future Enhancements:

  • Expanded Narrative: More NPCs with deeper backstories
  • Crafting System: Combine items to create new tools and weapons
  • Achievement System: Unlock achievements for speedruns, no-damage runs, etc.
  • Mobile Port: Touch controls for iOS and Android
  • Multiplayer: Co-op mode where two players explore together
  • Level Editor: Let players create and share their own haunted houses
  • Localization: Translate to multiple languages for wider accessibility

Community Engagement:

  • Encourage speedrunning with built-in timer
  • Create leaderboards for fastest completion times
  • Support fan theories and lore discussions
  • Host game jams using The Last Candle as a template

The foundation is solid, and there's enormous potential to expand this into a full-featured horror game. The modular architecture and clean codebase make adding new features straightforward, and Kiro will continue to be an invaluable development partner for future updates.


In the darkness, only one candle remains...

Built With

Share this project:

Updates