Inspiration
Almost everyone who grew up in the 90s and 2000s remembers the frantic thrill of Pen Fight: the unofficial sport of school classrooms. Armed with ballpoint or gel pens, two friends would sit opposite each other across a scarred wooden desk, taking turns flicking their pens with pinpoint precision to spin, parry, and knock the opponent off the edge.
As mobile gaming became crowded with complicated virtual joysticks and intrusive ads, we wanted to capture pure, tactile nostalgia: a game that feels just like flicking a real pen across a school bench. We set out to recreate that physical, social experience on modern mobile devices: complete with authentic collision physics, face-to-face local multiplayer, and premium customizations powered by RevenueCat.
What it does
Pen Fight: Desk Duel brings the classic tabletop game to mobile with realistic physics, multiple play modes, and deep pen customization:
- Dual Aiming Controls (Flick vs. Slingshot):
- Flick Mode (Pure Nostalgia): Swipe across the screen just like you would flick with your finger on a real desk. Swipe speed directly determines launch velocity, and angle determines spin—fast, physical, and intuitive.
- Slingshot Mode (Tactical Precision): Pull back on your pen to visualize your trajectory with an aim guide, where pullback distance calculates your strike power. Perfect for sniper-like edge taps and tactical banks.
- Physics-Driven Pen Battles: Realistic 2D rigid-body kinematics simulate mass, momentum, angular spin, and table edge drop-offs. A glancing hit can spin an opponent out of control, while a head-on strike can send both pens flying.
- Pass & Play (180° Face-to-Face Mode): Designed for two friends sitting opposite each other across a table or cafe bench. When Player 2's turn arrives, the entire handoff overlay smoothly rotates $180^\circ$ so Player 2 can tap and aim right from their side of the phone.
- Battle the Desk Bot (AI Mode): A smart, adaptive computer opponent with three difficulty tiers (Easy, Medium, Hard) that analyzes trajectory angles to hunt down your pen.
- Online Duels: Challenge friends anywhere with 6-character room codes and real-time multiplayer synchronization.
- Pen Studio & Customization: Express your desk personality with distinct pen finishes (Classic, Neon, Golden, Tiger, Glass, and Carbon Fiber) alongside custom "Penprint" trails that paint your shot’s trajectory across the desk.
- Pen Fight Pro (Powered by RevenueCat): Seamless Google Play subscription integration that unlocks all premium skins, colored trailing inks, and upcoming monthly skin drops.
How we built it
- Frontend & UI: Built with React Native and Expo using TypeScript, utilizing React Native Reanimated for 60 FPS desk rendering, React Native Gesture Handler for dual flick and slingshot aim controls, and Expo Haptics for tactile collision jolts.
- Physics Engine: Developed a custom 2D simulation that handles friction, linear momentum, and rotational inertia: $$\mathbf{v}(t + \Delta t) = \mathbf{v}(t) - \mu g \Delta t \cdot \hat{\mathbf{v}}(t)$$ $$\omega(t + \Delta t) = \omega(t) - \beta \omega(t) \Delta t$$ Angular momentum transfer during off-center strikes calculates torque based on impact point offset: $$\tau = \mathbf{r}{\text{contact}} \times \mathbf{F}{\text{impact}}$$
- Backend & Cloud: Supabase handles real-time duel matchmaking signaling, player profiles, and win/loss statistics, combined with TanStack React Query for fast local caching and offline-first play.
- Monetization with RevenueCat:
- Integrated
react-native-purchasesto power the Pen Fight Pro monthly subscription ($rc_monthlylinked topro.monthly). - Gated exclusive pen cosmetics and trailing ink effects via the
proentitlement. - Connected RevenueCat user identification to Supabase authentication (
Purchases.logIn), ensuring user entitlements sync across devices while still permitting instant guest purchases with automatic alias merging.
- Integrated
Challenges we ran into
- Pen Aerodynamics & Friction Tuning: Pens are elongated cylinders, not round air-hockey pucks. Simulating how an off-center flick causes a pen to fishtail and slide along its longitudinal axis required delicate tuning of linear vs. rotational drag coefficients ($\mu$ vs. $\beta$).
- Face-to-Face Table Ergonomics: In local Pass & Play, players sit across from each other. If turn modals face only Player 1, Player 2 is forced to read upside down. We designed dynamic $180^\circ$ component inversion with flipped safe-area padding so the device feels naturally shared between two players.
- Frictionless Auth & Billing Synchronization: We wanted zero mandatory sign-up walls: players can play immediately as Guests. Aligning RevenueCat's anonymous app user IDs with authenticated Supabase profiles required careful lifecycle management so that subscriptions purchased in guest mode safely carry over once a user claims their handle.
Accomplishments that we're proud of
- Authentic Game Feel: The combination of micro-haptics on collision, realistic skid marks on the wood desk, and high-stakes edge teetering feels genuinely like playing in a classroom.
- Rock-Solid RevenueCat Integration: A clean, single-tier subscription model with instant entitlement resolution, native store pricing localization, and seamless purchase restoration.
- True Shared-Screen Multiplayer: The inverted $180^\circ$ handoff makes Pass & Play one of the most engaging two-player local phone games you can play over coffee or lunch.
What we learned
- How to architect robust, offline-resilient subscription state flows using RevenueCat and React Native.
- Deepened our understanding of mobile 2D kinematics, rotational impulse mechanics, and frame-independent physics integration.
- The power of sound design, haptics, and subtle UI rotation in making a digital game feel like a physical tabletop artifact.
What's next for Pen Fight: Desk Duel
- Ranked Matchmaking & Leaderboards: Compete globally in ranked seasonal leagues to become the top desk duellist.
- New Desk Environments: Unlock new play surfaces—from chalk-dusted classroom tables and science lab countertops to slick cafeteria trays with different surface friction values.
- Trick Shot Challenges: A solo puzzle mode requiring players to navigate obstacle courses around erasers, notebooks, and pencil sharpeners to knock out target pens.
- More RevenueCat Pro Drops: Expanding Pen Fight Pro with monthly seasonal skin drops and customizable victory animations.
Built With
- emergent
- node.js
- react-native
- revenuecat


Log in or sign up for Devpost to join the conversation.