═══════════════════════════════════════════════════════════════════════════════ ARCADIA GAME SDK - DEVELOPER DOCUMENTATION ═══════════════════════════════════════════════════════════════════════════════ Document: Getting Started Generated: 2/13/2026, 7:46:04 PM Version: 1.0.0 ═══════════════════════════════════════════════════════════════════════════════ Getting Started ══════════════════════════════════════════════════════════════════════ This guide will help you get up and running with the Arcadia Game SDK in just a few minutes. Prerequisites ════════════════════════════════════════════════════════════ Before you begin, make sure you have: 1. A game that runs in a browser - HTML5, JavaScript, or any web-based game framework 2. Your game hosted - The game must be accessible via URL (for iframe embedding) 3. A game ID - You'll receive this when you register your game on Arcadia 4. Basic JavaScript knowledge - Familiarity with async/await and promises Installation ════════════════════════════════════════════════════════════ Choose your preferred installation method: Option 1: NPM (Recommended for TypeScript/Modern Projects) ══════════════════════════════════════════════════ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CODE BLOCK [BASH] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ npm install @arcadiasol/sdk ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Option 2: CDN (Quick Start) ══════════════════════════════════════════════════ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CODE BLOCK [HTML] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ For detailed installation instructions, see the Installation Guide. Basic Setup ════════════════════════════════════════════════════════════ Step 1: Initialize the SDK ══════════════════════════════════════════════════ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CODE BLOCK [TYPESCRIPT] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ import { ArcadiaSDK } from '@arcadiasol/sdk'; // Create SDK instance const arcadia = new ArcadiaSDK({ gameId: 'your-game-id', // Replace with your actual game ID }); // Initialize SDK await arcadia.init(); ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CDN Usage: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CODE BLOCK [HTML] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 2: Get Wallet Address ══════════════════════════════════════════════════ The wallet address is your primary user identifier. Use it to link save data, track progress, and identify players. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CODE BLOCK [TYPESCRIPT] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ const walletAddress = await arcadia.getWalletAddress(); if (!walletAddress) { // Wallet not connected - show message to user showMessage('Please connect your wallet in Arcadia to play'); return; } // Use wallet address as user ID console.log('Player wallet:', walletAddress); // Load or create save data const saveData = await loadSaveDataByWallet(walletAddress); ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 3: Handle Payments (Optional) ══════════════════════════════════════════════════ If your game requires payment, you can process it like this: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CODE BLOCK [TYPESCRIPT] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ try { // Pay-to-play example const result = await arcadia.payment.payToPlay(0.5, 'SOL'); console.log('Payment successful!'); console.log('Transaction:', result.txSignature); console.log('Amount:', result.amount, result.token); // Start game after successful payment startGame(); } catch (error) { console.error('Payment failed:', error.message); showError('Payment failed. Please try again.'); } ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Complete Minimal Example ════════════════════════════════════════════════════════════ Here's a complete, minimal example that you can use as a starting point: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CODE BLOCK [HTML] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━