Skip to content

Environments

The SDK and the RGS (math server) have separate environment tracks. You point your game's <script> tag at the right SDK URL, and the Rollerz team configures which RGS backend it talks to.

SDK environments

EnvironmentURLUse case
Testinghttps://rollerz-sdk-testing.up.railway.app/Testing your game against a hosted environment
Productionhttps://prod.rollerz.devReleased game with real players

RGS environments

EnvironmentURL patternUse case
Local DevYour own mock RGSFast iteration with predictable results — build any mock server that conforms to the request/response contract
Staginghttps://math-test-nl.reelsoft.net/{provider}-v102/mockSame API as production, with test configuration
Productionhttps://math-test-nl.reelsoft.net/{provider}-v102Real math, real currency, real balances

Proxy Server

In the future, games will not talk to the RGS directly. Both staging and production RGS traffic will go through the Proxy Server instead, with the Staging SDK communicating with the Proxy Server wired to the Staging RGS ("Staging Proxy Server"), and the Production SDK communicating with the Proxy Server wired to the Production RGS ("Production Proxy Server").

Switching environments

Change the SDK script URL in your HTML:

html
<!-- Testing -->
<script src="https://rollerzsdk-testing.up.railway.app/sdk"></script>

<!-- Production -->
<script src="https://rollerzsdk.up.railway.app/sdk"></script>

TIP

Use an environment variable or build-time config in your project to swap the URL automatically. For example, with Vite:

javascript
// vite.config.js
export default defineConfig({
  define: {
    __SDK_URL__: JSON.stringify(process.env.VITE_SDK_URL),
  },
});
html
<script src="%VITE_SDK_URL%/sdk/sdk"></script>

No code changes are needed — the SDK API is identical across all environments. Only the server it talks to changes.

Per-launch overrides

The RGS environment values above are defaults. When a host platform launches your game with ?server= in the URL, that value overrides the default for that launch. See Launch URL parameters for the full picture. The ?session= parameter behaves the same way for the player session token.

This means a single SDK deployment can serve games launched against different math servers per session — the server-side env vars only kick in when the launch URL is silent.