Skip to content

One app per game, with the architecture ready for one Homefelt app

Context and problem

Once Homefelt became the name of a suite (0006), the apps needed an identity. Was the iPhone and Android app “Canasta”, or “Homefelt” with Canasta inside it? The choice shows up in the bundle id, in Sign in with Apple’s configuration, in where saved games live and in the store listing, all of which are hard to change after people install the app. There is only one game today.

Options considered

  1. One app per game, named for the suite, with nothing in place for a shared app.
  2. One Homefelt app now, a shell with a game picker that embeds each game.
  3. One app per game now, with rules that keep a single Homefelt app possible later, so bundling the games is a matter of adding a shell instead of untangling code.

Decision

We chose option 3, as part of the rename (#126):

  • The app id is dev.edsancha.homefelt.canasta on iOS and Android; the store name is “Homefelt Canasta” and the home-screen name “Canasta”. (The apps had been com.edsancha.canasta, which didn’t match the server’s default; now they agree.)
  • docs/architecture.md sets the boundary. Game core and game UI are named for the game; sign-in, the server client, theme and display settings, saved-game storage, the store and analytics are platform code, named for Homefelt.
  • Rules that keep bundling possible: no app-global state named for one game, per-game storage namespaces (homefelt.<game>. on the web), per-game routes on the web (0008), and a game id on the server once a second game exists.

Consequences

Good

  • Nothing to build now that one game doesn’t need: no shell, no picker.
  • The boundary is written down, so a second game knows where its code goes.

Bad

  • The rules are kept without a second game or a shell to test them. A slip, such as a setting named for Canasta in platform code, only shows up when the shell arrives.
  • A shell later means a choice that touches real users: keep one app per game beside it, or move to dev.edsancha.homefelt. Moving needs the new App ID listed for Sign in with Apple, and saved games moved into the shell’s sandbox.
  • The native apps keep one saved-game.json in their own sandbox, which is per game only while each game is its own app.
  • Each new game means another app to publish: another store listing and another App ID to configure for sign-in.

More information

  • Rename and app id: #126.
  • Diary: Day 5, “Homefelt, all of it”.
  • The boundary and “What one Homefelt app would change”: docs/architecture.md.