Engineering · Backend · Live opsSample post

A game backend a phone clock can't cheat

Lives, daily rewards and leaderboards break if the game trusts the phone's clock. Here is how we keep timers and scores honest on the server.

An old television set

Many mobile games give you a life back every 30 minutes or a reward once a day. The easy way to build that is to read the time on the phone. The problem: anyone can change the time on their phone.

The server keeps the time

In our games, timers and rewards are worked out on the server, which runs on Node.js with PostgreSQL. The phone asks “how many lives do I have?” and the server answers. Changing the phone’s clock changes nothing.

Scores are checked, not trusted

Leaderboard scores arrive with the moves that produced them, and the server checks they add up. A score that could not have happened never reaches the board.

Purchases are verified

Every in-app purchase is checked with Apple or Google before anything is unlocked.

A panel for the team

An admin panel lets the team look up a player, fix a wallet or hide a cheater, and every change is written to an audit log. We build the same setup for client games.

More from the blog


  1. A Pawsome Rescue board full of pug, husky and beagle tiles
  2. The six starting pets of Pawsome Rescue

Have a game in mind? [email protected]

NIKU STUDIOS :: MACHINE-READABLE INDEX

# PLAIN-TEXT MIRROR OF NIKUSTUDIOS.COM FOR AI AGENTS, CRAWLERS, AND HUMANS WHO PREFER IT RAW.

── ABOUT ─────────────────────────────────────────────────────────
NAME .......... NIKU STUDIOS
SITE .......... NIKUSTUDIOS.COM
WHAT .......... MOBILE GAME STUDIO
PLATFORMS ..... iOS, ANDROID
AREA_SERVED ... WORLDWIDE
TAGLINE ....... EVERY IDEA HAS A WORLD.

NIKU STUDIOS IS A MOBILE GAME STUDIO. WE MAKE OUR OWN GAMES FOR iOS AND ANDROID, STARTING WITH PAWSOME RESCUE, AND BUILD GAMES, GAME BACKENDS AND LIVE-OPS TOOLS FOR CLIENTS.

── GAMES ─────────────────────────────────────────────────────────
* PAWSOME RESCUE

A COSY MATCH-3 RESCUE ADVENTURE. MATCH CARTOON DOGS AND CATS, RESCUE PETS THROUGH GARDEN ZONES, AND RACE FOR TREATS IN A BONUS RUN AFTER EVERY ZONE. IN DEVELOPMENT FOR iOS AND ANDROID.

[MATCH-3] [PUZZLE] [CASUAL] [iOS] [ANDROID] [/PAWSOME-RESCUE]

── SERVICES ──────────────────────────────────────────────────────
* MOBILE GAME DEVELOPMENT

CASUAL AND PUZZLE GAMES FOR iOS AND ANDROID FROM ONE CODEBASE.

[FLUTTER] [FLAME] [DART] [iOS] [ANDROID]

* PROTOTYPES AND GAME DESIGN

A SMALL PLAYABLE VERSION FIRST, SO YOU CAN TEST THE FUN BEFORE A FULL BUILD.

[GAME DESIGN] [PLAYABLE PROTOTYPES] [LEVEL DESIGN]

* BACKENDS AND LIVE OPS

PLAYER ACCOUNTS, LEADERBOARDS, PURCHASE CHECKS, REMOTE CONFIG AND AN ADMIN PANEL WITH AN AUDIT LOG.

[NODE.JS] [POSTGRESQL] [ADMIN TOOLS] [LIVE OPS]

* ART, UI AND LAUNCH

GAME UI, ART DIRECTION, APP ICONS, STORE LISTINGS, TESTFLIGHT AND GOOGLE PLAY TESTING.

[GAME UI] [ART DIRECTION] [APP STORE] [GOOGLE PLAY]

── HOW_WE_WORK ───────────────────────────────────────────────────
01 TALK ....... IDEA, AUDIENCE AND BUDGET. AN HONEST PLAN.
02 PROTOTYPE .. A SMALL PLAYABLE VERSION PROVES THE CORE IDEA.
03 BUILD ...... SMALL STEPS, PLAYABLE BUILDS ALONG THE WAY.
04 LAUNCH ..... STORES, THEN UPDATES, EVENTS AND FIXES.

── BLOG ──────────────────────────────────────────────────────────
/BLOG ......... NOTES ON GAME DESIGN, FLUTTER + FLAME AND GAME BACKENDS
/RSS.XML ...... FEED

── LOBBY ─────────────────────────────────────────────────────────
- NIKU DEFENDER — PLAYABLE ON THE ARCADE CABINET IN THE 3D LOBBY (CLICK IT).
- NIKU SHOT — DRAG-TO-THROW BASKETBALL ON THE LOBBY HOOP (CLICK THE BACKBOARD).

── CONTACT ───────────────────────────────────────────────────────
EMAIL ......... [email protected]

── FOR_AGENTS ────────────────────────────────────────────────────
LLMS.TXT ...... /LLMS.TXT
SITEMAP ....... /SITEMAP-INDEX.XML