Pixel Pantry: a grocery game that counts my macros

I lift, I eat no meat, and I wanted a tracker with no accounts, no logging and no fuss. So I turned my groceries into a pixel game: fill a basket, hit the protein goal under a calorie cap, check out.

When
Nov 2026
Type
Lab
Tools
AstroTypeScriptClaude CodeUSDA FoodData Central
Link
www.jidienne.com ↗

A tiny pixel grocery game that doubles as my food tracker. Pick foods, fill a basket, hit the protein goal under a calorie cap, then check out and read the receipt. No account, no logging, no setup.

Play it ↗

Every food is its own small drawn sprite, here the crab in light mode.

The cottage cheese bowl in dark mode. Same art, quieter background.

Why I made it

I lift, I like muscles, and I haven’t eaten meat in 11+ years. That makes protein the thing I actually plan around: enough of it, from foods I eat, without overshooting on calories. Most trackers answer that with accounts, barcode scanners and a diary you have to keep up. I wanted the opposite. Open it, pick a few things, see the numbers.

I also like retro games more than I like spreadsheets. So the tracker became a shop.

How it works

  • Browse. 75 foods across fish, plants, grains, veg, legumes, soy, dairy and eggs, 57 of them vegan. Each one is a small pixel sprite with calories, protein, fat, carbs and fibre, shown per 100 g or per serving. Search, filter by type, sort by protein per calorie.
  • Fill a basket. Click a food and one serving drops in. Click it in the basket to take it out. Two meters track protein and calories as you go.
  • Pick a mission. Light day (50 g protein, 500 kcal cap), Everyday (90 g, 900 kcal) or Gym day (140 g, 1,400 kcal).
  • Check out. The receipt lists every item with its protein and calories, then fat, carbs, fibre and protein per 100 kcal. Clear the goal for one star, use four kinds of food for two, stay under 85% of the cap for three. Miss it and the receipt suggests the food with the most protein for its calories.

The basket in the sticky bar. Each food you add becomes a thumbnail with a count.

The receipt after checkout: every item, the totals, fat, carbs, fibre and the stars.

Best stars per mission are saved in the browser only. Filters live in the URL, so a view can be shared.

Design choices

  • A game, not a form. The point is to make planning a meal feel like picking things off a shelf. Stars and a receipt give just enough of a reason to try a better swap.
  • Nothing to maintain. No login, no database, no daily streak to protect. If I skip a week, nothing is lost.
  • Honest data. Every food links to its USDA FoodData Central entry, and the basis (raw, cooked, dry) is shown on the food, because a cup of dry oats and a cup of cooked oats are very different numbers. It says plainly that it is not medical or dietary advice.
  • Retro, but quiet. Pixel sprites, pixel-notch borders and small chiptune sounds that match the rest of the site. Nothing flashes.

Built with

Astro and TypeScript, USDA FoodData Central for the numbers, and Claude Code to build it alongside the rest of this site. The food list is plain JSON, so adding a food is one entry.

What I’d do next

  • Save a basket as a regular meal.
  • Add a mission around iron and calcium, which matter more on a no-meat diet.
  • Add more local foods, since that’s what I actually shop for.

Play Pixel Pantry ↗