A downloadable game for macOS

πŸ₯” Flappy Potato iOS 6

A Flappy Bird–style game starring a potato, written in Objective-C for iOS 6 with no storyboards or third-party libraries. It features seasonal events, a skin shop, optional voice control, and an online multiplayer Tag mode backed by a tiny Node.js server with zero dependencies.

Features

  • Classic mode (offline) – tap to flap, dodge the pipes, beat your high score.
  • Online Tag mode – 2–4 players share the same pipes; whoever spends the least time as "it" wins.
  • Seasonal events – the theme changes automatically depending on the date (see Events).
  • Skin shop – spend collected currency on extra potato skins that change with the current event.
  • Voice control – optionally flap by making noise into the microphone (offline mode only).
  • iOS 6 compatible – no NSURLSession, no UIAlertController, no WebSockets; networking uses plain CFStream TCP sockets and NSJSONSerialization. Emoji used in the UI were picked so they exist in the iOS 6 emoji set.

Getting started

1. Run the server

Requires Node.js 8 or newer. No npm install needed.

node server.js
# or on a different port:
PORT=4000 node server.js

On start-up the server prints the local IP addresses you can use, for example:

=== Flappy Potato – TAG server ===
Port: 3000
Enter one of these addresses in the game:
   192.168.0.10:3000   (en0)

2. Build the game

  1. Create a new Single View Application in Xcode (iOS 6 deployment target, ARC enabled, storyboards optional).
  2. Replace the generated ViewController.m with the one from this repo.
  3. Build and run on a device or simulator.

3. Play

On launch you choose a mode:

  • πŸ“΄ OFFLINE – classic single-player game.
  • 🌍 ONLINE (Tag) – enter the server address (IP:port, e.g. 192.168.0.10:3000) and tap Connect. The address is remembered for next time.

All players must be able to reach the server: the same Wi-Fi network works out of the box. To play over the internet, forward the server's TCP port on your router (and keep in mind the protocol is unencrypted – see Limitations).

Tag mode rules

  • The server starts a round a few seconds after at least 2 players have joined (max 4). Players who join mid-round wait for the next one.
  • After a 3-second countdown the round lasts 60 seconds. One random player starts as "it" (marked with πŸ‘Ή and a red outline).
  • All players fly through the same pipes (the server sends a shared random seed) and are drawn at slightly different horizontal offsets.
  • "It" tags another player by flying to roughly the same height as them. The player who was just tagged becomes "it"; the previous "it" has a 2-second immunity so the tag can't be handed straight back.
  • Hitting a pipe, the ground or the ceiling doesn't end the game – you crash, respawn after a moment and get a short invulnerability (blinking) period.
  • The timer counts how long each player was "it". Lowest total time wins. After the results screen the next round starts automatically.

HUD in online mode: remaining seconds in the centre, current "it" in the top left, your own time as "it" in the top right.

Events

The theme (colours, background, decorations, currency, skin names) changes by date:

EventWhen
πŸŽƒ HalloweenOct 7 – Nov 30
πŸŽ… Christmasfrom Dec 5
πŸŽ† New YearJan 1
🍩 Fat ThursdayFeb 11
🀑 Prima AprilisApr 1 (inverted black & white)
πŸ‰ SummerJun 12 – Aug 31
πŸ₯” Normalall other days

Collectible currency (πŸ’° / 🍬 / 🎁 / 🍩 / 🍦 / πŸŽ†) is saved with NSUserDefaults, as are your high score, selected skin and unlocked skins.

Network protocol

Transport: plain TCP, one JSON object per line (terminated by \n). Default port 3000.

Client β†’ server

MessageMeaning
{"t":"join","name":"…"}First message after connecting
{"t":"pos","y":0.42,"r":0.1,"a":1}Position (y as a fraction of screen height), rotation, alive flag – sent ~20Γ—/s
{"t":"tag","id":2}"It" claims a tag on player id (validated by the server)
{"t":"ping"}Keep-alive, every 5 s

Server β†’ client

MessageMeaning
welcomeYour player id and the current phase
lobbyLobby status text
startRound start: shared seed, duration, countdown, who is "it", player list with slots
state~20Γ—/s: all positions, current "it", seconds left, accumulated "it" times
taggedA new player became "it"
leftA player disconnected
endRound over, with the ranking
fullServer is full, connection is closed

Game balance constants (round length, player limits, immunity time, ports) are defined at the top of server.js.

Limitations

  • No encryption or authentication – intended for friends on a LAN, not for a public deployment.
  • Game logic is client-authoritative for movement and tag detection; the server only validates basic rules (who is "it", immunity, round state). Don't expect it to be cheat-proof.
  • Pipes are synchronised by seed and start time, so on slow connections each player sees them offset by roughly their network latency.
  • Voice control is available in offline mode only.
  • The UI is laid out in code with absolute frames, designed with the ~320 pt wide iPhone screens of the iOS 6 era in mind; other screen sizes and orientations are untested.

License

Add your license of choice here (for example MIT).

Published 8 days ago
StatusReleased
PlatformsmacOS
Authorigusz
Tags2D, Endless Runner, Multiplayer, No AI

Download

Download
server.js 7.5 kB
Download
FZ1,4.ipa 96 kB

Leave a comment

Log in with itch.io to leave a comment.