Headline

I grew up loving life-simulation games, especially The Sims. The idea of a tiny person with needs, a job and a little apartment who makes a whole life out of small choices has always pulled me in. Then I found Lagos Life, a game made by a Nigerian developer that takes that Sims feeling and attaches it to one real city: Lagos. (Lagos is a state in Nigeria). In Nigeria, games such as that are very popular and I wanted to bring something from my home-town and apply it to NYC!

I wanted that for New York. NYC is the perfect setting for a life sim: you arrive with almost nothing, every block has a character, and one day can go a hundred different ways. NYC LIFE is my tribute to Lagos Life and the Sims.

What it does

NYC LIFE is a 2D pixel-art life sim that runs in your browser, on desktop or phone. You arrive in New York with $20 and one day. A day has three choices, one per time of day (morning, afternoon, evening), spent at places around the city:

  • Apartment: nap or cook at home
  • Office: work a shift or pull a double
  • Joe's Pizza: grab a slice or hang with friends

Every choice changes your money, energy and happiness, and your day ends with a score:

$$\text{score} = \text{money} + \text{energy} + 2 \times \text{happiness} + 50 \cdot \mathbb{1}[\text{all three places visited}]$$

For example, working a shift, grabbing a slice, then napping leaves you with $65 money, 85 energy and 65 happiness, so the score is $65 + 85 + 2(65) + 50 = 330$.

Beyond the scored day, the city is alive:

  • Three districts (Your Block, Midtown and Lower Manhattan) that you travel between by walking off the edge of the screen
  • Landmarks: Grand Central, the Empire State Building, Madison Square Garden and the Twin Towers
  • 15 characters who wander, jog, feed pigeons and chat, and you can talk to them
  • A story: Uncle Ray left you a trail to follow across the city, with side quests like finding a lost cat, feeding a hungry street musician and getting a signed jersey for a kid
  • Voiced neighbors: the NPCs speak out loud using AI-generated voices
  • Danger: this is New York, so if you walk in front of a car, you die

When your day ends you can save it to Solana Devnet: your wallet signs one transaction with your three choices and your score, and it confirms in about a second for a fraction of a cent. You can open it in the Solana Explorer.

How I built it

  • Game and site: Next.js and React host a Phaser 3 game. All of the art is drawn in code, so there are no image files. Everything is JavaScript.
  • Story and NPCs: a small quest engine tracks the story, and the NPCs have little behavior loops of their own (stroll, jog, stand, feed pigeons) plus short dialogue trees with choices.
  • Voices: I used ElevenLabs (Eleven v4) to generate 116 voice lines in 14 different voices with one script, and the game plays those saved audio files.
  • On-chain scoring: I wrote a Solana program in Rust with Anchor that recalculates the score from the three choices on its own, so a high score can't be faked. The scoring rules are mirrored in JavaScript and Rust and checked against the same test examples.
  • Tooling: The code was built with Claude Code (Claude Sonnet 5.5, with an Opus model for the initial plan), deployed on Vercel, and stored on GitHub. 17 automated tests cover the scoring and the quest chain.
  • Solana: Each finished day is written to Solana Devnet as a signed transaction, using Solana's built-in Memo program, through the Solana wallet adapter and web3.js. If a player has no wallet installed, the game creates a temporary Devnet wallet in their browser (funded with free test SOL from the faucet). I also wrote an Anchor program in Rust that would re-compute the score on-chain; it is written but not deployed yet.

Challenges I ran into

  • Keeping the rules consistent. The scoring rules exist in JavaScript for the game and in Rust for the Anchor program, so every change had to match in both. I added tests with fixed examples to catch drift.
  • Library version traps. A plain install pulled in a newer, incompatible version of Phaser and the Solana library, so I had to pin older versions.
  • Credits and cost. Live AI voice calls would have been slow, could fail in a demo and could cost money from a public site. I pre-generated every voice line once instead and serve them as static files.
  • A crowded world in a tiny screen. Making districts, NPCs, quests and a dialogue box fit together without breaking the three-choice scoring was a puzzle. All story activity is free and never changes the on-chain score.
  • Everyday bugs. Keys firing twice, a cutoff speech bubble and a saved login overriding a new account all took time to track down.
  • Time. Heavy time-constraints, had to quickly push something out even if it's not entirely completed.
  • Free test SOL. Devnet's built-in airdrop is closed, so new wallets can't fund themselves. I added clear on-screen instructions and a copy-address button that send players to the Solana faucet.

Accomplishments that I'm proud of

  • A whole playable city with 3 districts, 4 famous landmarks and 15 characters
  • A story with 8 steps, from the main trail to side quests, that actually works from start to finish
  • NPCs that feel alive: they wander, notice you, say hello and speak in their own voices
  • Real transactions on Solana Devnet: a finished day can be saved on-chain and viewed in the Explorer
  • A game that runs on a phone and on a computer from a single link

What I learned

  • Pre-generating AI content is often smarter than calling an AI live: faster, cheaper, safer and more reliable.
  • Small tests save hours. Matching examples in two languages caught problems before they became bugs.
  • Working with an AI coding assistant is fastest when you give it a clear scope and check its work in the real game.

What's next for NYC Life

  • Deploy the Anchor program to Devnet so the chain re-computes and verifies scores.
  • More boroughs and landmarks, like Brooklyn, Central Park and Times Square
  • Voices for the full story conversations, not just the random lines
  • More days in a row, with a longer story and bigger choices
  • Achievements and collectibles on-chain
  • Potentially moving the game from 2D to 3D!!!

How to Play the Game

I don't think it would be good to spoil the game for you, Judges. Explore the game; feel free to move around, interact, sightsee (and run into cars if that's your passion).

Built With

Share this project:

Updates

Submission history