All projects
// pe-frunte.swift

Pe Frunte!

Designer & iOS EngineerSelf-initiated2026App Store
SwiftSwiftUICore MotionSwiftDataiOS 17
PASSARMALEMÂNCARE · 0:42CORECT
// overview.md

The project, in plain words.

Pe Frunte! is a party game for iPhone, in Romanian. You hold the phone against your forehead, your friends shout clues, and you tip the phone down when you guess or up to skip — until the timer runs out. It ships with 10 curated decks, 420 cards in all, covering expressions, celebrities, food, films, cities and nineties nostalgia.

The whole game runs offline, with no account and no ads. Teams are scored automatically with a tiebreaker round; there is a quick-play mode, a kids mode with longer timers and larger text, and a picture-only mode for players who cannot read yet. Players can build their own decks from words or photos of their friends and send them to each other as files.

The interesting engineering is in two things you never see: reading a tilt reliably from a phone held sideways against someone’s forehead, and making the game fully playable without motion at all. It is SwiftUI throughout, with SwiftData for persistence, and the Xcode project is generated by XcodeGen so the project file is never hand-edited.

// my-role.md

What I actually shipped.

  • Designed and built the entire game solo — gameplay, motion detection, deck format, design system, accessibility, the Romanian content and the App Store submission.
  • Built the tilt recognizer on Core Motion, deriving the gesture from the gravity vector so it behaves identically whether the phone is held landscape-left or landscape-right.
  • Designed the .pefrunte deck format — a ZIP of deck.json plus images — with export through the iOS share sheet and import via a registered UTI, so decks travel through Messages or AirDrop.
  • Wrote and curated 420 Romanian cards across 10 decks, with a per-deck age rating so the kids mode can actually be trusted.
  • Made motion optional: a tap-control mode plays the full game without the gyroscope, alongside VoiceOver, large text, high contrast and reduced motion.
// technical-highlights.tsx

Three problems worth talking about.

// the interesting bits
// tilt-axis

The axis was wrong

The first build detected the player turning their head left and right instead of tipping the phone forward and back. The cause was reading attitude.pitch, which in a sideways on-forehead hold lands on an entirely different axis. The fix derives the tilt from the gravity vector’s screen-normal component — which, as a bonus, makes it indifferent to which way round the phone is held.

atan2(gravity.z, |gravity.xy|)
// calibration

Calibration that converges

Calibration waits for the phone to hold within ±5° for a second and a half. The first implementation averaged every sample since the recognizer started, which pinned the mean to the journey from table to forehead — so on a real device calibration never finished. The window now re-anchors whenever a sample falls outside tolerance. There is a regression test named after the bug.

±5° for 1.5s · window re-anchors
// sharing

Decks as files, not accounts

A deck is a ZIP holding deck.json and its images, with its own extension and UTI. That makes sharing an iOS problem rather than a server problem: export through the share sheet, import by tapping the file in Messages. No account, no backend, and a deck of in-jokes about your friends never leaves the group.

.pefrunte = zip(deck.json + images)
// results.tsx

What it added up to.

Cards
420across 10 official decks
Modes
5team, quick, kids, images, tap
Calibration
±5°neutral-pitch window
Platform
iPhoneSwiftUI · iOS 17+