For the complete documentation index, see llms.txt. This page is also available as Markdown.

RUN.world SDK

The RUN.world SDK gives your HTML5 game access to monetization, multiplayer, storage, AI, and more, all through a single import.

Quick Start

import RundotGameAPI from '@series-inc/rundot-game-sdk/api'

Every API is accessed through RundotGameAPI. For example:

// Save player progress
await RundotGameAPI.appStorage.setItem('level', '5')

// Show a rewarded ad
const result = await RundotGameAPI.ads.showRewardedAdAsync()

// Get server time
const time = await RundotGameAPI.requestTimeAsync()

API Reference

Monetization

API
What it does

Serve rewarded video and interstitial ads to earn revenue.

Let players spend RUN Bits on digital goods.

List shop items and run the purchase flow for digital goods.

Track and consume what players own (items, passes, power-ups).

Manage digital collectibles and inventory items.

Grant and track player creator credits and balances.

Read and spend player Choices diamond balances.

Messaging & Social

API
What it does

Schedule local notifications for re-engagement.

Display toast notifications and in-app messages.

Host toasts, platform like prompts, and comments sheet.

Record, save, and share video gameplay clips.

Share links, generate QR codes, and handle share parameters.

Post activity feeds and social status updates.

Assets & Media

API
What it does

Load game assets from the CDN with caching, preloading, and WebView support.

Direct CDN asset fetching and signed URL resolution.

Download host-provisioned asset bundles shared across titles.

Query and browse shared platform asset catalogs.

Upload and manage game-specific file attachments.

Hand off video playback to native Picture-in-Picture (iOS today; Android in staged testing).

User-generated content creation and moderation.

Game Systems & Multiplayer

API
What it does

Build synchronous multiplayer sessions with real-time updates.

Shared persistent worlds, turn loops, and matchmaking.

Deterministic rollback netcode, physics, and gameplay modules.

Competitive matchmaking, ratings, and PvP room orchestration.

Drive authoritative game state through the simulation system.

Define entities, recipes, loot tables, and lifecycle hooks in JSON config.

Implement regenerating energy/stamina with offline catch-up.

Add loot boxes with weighted pools, pity counters, and guarantees.

Timed upgrades, build queues, and passive resource generation.

Record and aggregate gameplay metrics and statistics.

Competitive leaderboards with multiple security levels.

Handle exponential economies without losing precision.

Run A/B tests with deterministic per-player variants.

Device, Platform & Input

API
What it does

Storage scopes, the network allowlist, and device features the platform provides.

Detect device type, platform, screen size, and dev mode.

Read safe-area insets to avoid overlapping host UI and notches.

Device specs, Steam detection, pointer lock, and fullscreen.

Standardized controller input, mapping, and vibration.

Open RUN pages, switch games, and manage the navigation stack.

Validate user access gates and pass entitlements.

Native app lifecycle and host window controls.

AI & Generation

API
What it does

Generate text and images using hosted AI models.

Generate and transform images from a running game.

Generate runtime sound effects and musical loops.

Generate AI video clips and animations.

Generate 3D procedural meshes and assets.

Use rundot to make local images, references, edits, and transforms while developing.

Build durable chat agents and game characters with tools, approvals, recovery, and multiple-tab protection.

Utility & Platform

API
What it does

Record gameplay telemetry, funnel steps, and user properties.

Read the web campaign and UTM parameters the player arrived with.

Access launch parameters and share parameters.

Load and manage embedded libraries shipped by the host.

Trigger haptic feedback on supported devices.

React to host lifecycle changes (pause/resume/teardown).

Stream structured logs for debugging and support.

Lightweight UA playable ad hooks and conversion CTAs.

Control the native loading screen during heavy loads.

Access the current user profile.

Platform rate limits and throughput guidelines.

Query version changelogs and platform release notes.

Persist player data at device, app, or global scope.

Server time synchronization and formatting.


New to RUN.world? See Getting Started | Testing Locally With Playground | Deploying Your Game | rundot CLI Reference | Design-time image generation | Marketing Your Game | Runtime Environment | Setting Your Game Thumbnail | Troubleshooting

Last updated