Roves
roves-api

achievements

A platform-agnostic achievements API — Steam-backed today, without locking your game's code to Steam specifically.

Edit on GitHub

A small wrapper over steam's own achievement methods, behind a platform-agnostic interface. Call this from your game instead of steam.unlockAchievement(...) directly, so your game's own code isn't tied to Steam specifically — if a future platform backend is added (e.g. Google Play Games Services), it plugs in behind this same interface and your existing calls keep working unchanged.

import { achievements } from "@drincs/roves-api/achievements";

if (await achievements.isAvailable()) {
  await achievements.unlock("ACH_COMPLETE_CH1");
}

API

FunctionReturnsNotes
isAvailable()booleantrue when at least one achievements backend is available right now.
unlock(id)booleanUnlocks an achievement and immediately persists it.
isUnlocked(id)booleanWhether the player has already unlocked it.
clear(id)booleanResets it — development/testing only.

Achievement IDs are passed straight through to whichever backend is active — this module doesn't remap IDs between platforms, so use the ID scheme the active backend expects (e.g. Steam's own API Name from Steamworks Partner).

On this page