═══════════════════════════════════════════════════════════════════════════════ ARCADIA GAME SDK - DEVELOPER DOCUMENTATION ═══════════════════════════════════════════════════════════════════════════════ Document: Quick Start Generated: 2/13/2026, 7:45:05 PM Version: 1.0.0 ═══════════════════════════════════════════════════════════════════════════════ Quick Start - Step by Step Integration ══════════════════════════════════════════════════════════════════════ Get your game integrated with Arcadia in 5 simple steps. Each step includes only the minimal code needed. Prerequisites ════════════════════════════════════════════════════════════ • Your game hosted and accessible via URL • Your game ID from Arcadia (you'll get this when you register your game) • Basic HTML/JavaScript knowledge Step 1: Include the SDK ════════════════════════════════════════════════════════════ Add the SDK to your HTML file using CDN: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CODE BLOCK [HTML] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Or use NPM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CODE BLOCK [BASH] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ npm install @arcadiasol/sdk ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CODE BLOCK [JAVASCRIPT] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ import { ArcadiaSDK } from '@arcadiasol/sdk'; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 2: Initialize the SDK ════════════════════════════════════════════════════════════ Create and initialize the SDK instance: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CODE BLOCK [JAVASCRIPT] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ // Get SDK class (for CDN usage) const SDKClass = window.ArcadiaGameSDK?.default || window.ArcadiaGameSDK?.ArcadiaSDK || window.ArcadiaGameSDK; // Create instance const arcadia = new SDKClass({ gameId: 'your-game-id', // Replace with your game ID }); // Initialize await arcadia.init(); ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ NPM usage: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CODE BLOCK [JAVASCRIPT] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ const arcadia = new ArcadiaSDK({ gameId: 'your-game-id', }); await arcadia.init(); ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 3: Get Wallet Address ════════════════════════════════════════════════════════════ Retrieve the player's wallet address (your primary user identifier): ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CODE BLOCK [JAVASCRIPT] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ const walletAddress = await arcadia.getWalletAddress(); if (!walletAddress) { // Player hasn't connected wallet in Arcadia console.log('Please connect wallet'); return; } // Use wallet address as user ID console.log('Player:', walletAddress); ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 4: Load Player Data (Optional) ════════════════════════════════════════════════════════════ Use the wallet address to load or create player save data: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CODE BLOCK [JAVASCRIPT] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ async function loadPlayerData(walletAddress) { // Load from your backend API const response = await fetch([https://your-api.com/player/${walletAddress}]); const data = await response.json(); return data; } // Or create new player data function createNewPlayer(walletAddress) { return { walletAddress, level: 1, score: 0, inventory: [], }; } ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 5: Handle Payments (Optional) ════════════════════════════════════════════════════════════ Pay-to-Play ══════════════════════════════════════════════════ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CODE BLOCK [JAVASCRIPT] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ try { const result = await arcadia.payment.payToPlay(0.1, 'SOL'); if (result.success) { console.log('Payment successful!', result.txSignature); // Start your game startGame(); } } catch (error) { console.error('Payment failed:', error.message); } ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ In-Game Purchase ══════════════════════════════════════════════════ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CODE BLOCK [JAVASCRIPT] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ try { const result = await arcadia.payment.purchaseItem('item-id', 0.05, 'SOL'); if (result.success) { console.log('Purchase successful!', result.txSignature); // Add item to inventory addItemToInventory('item-id'); } } catch (error) { console.error('Purchase failed:', error.message); } ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Complete Minimal Example ════════════════════════════════════════════════════════════ Here's everything combined in the smallest possible working example: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CODE BLOCK [HTML] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━