═══════════════════════════════════════════════════════════════════════════════ 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] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ My Arcadia Game
Initializing...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Next Steps ════════════════════════════════════════════════════════════ Now that you have the basics working: 1. Learn about Wallet Integration - See Wallet Integration Guide 2. Implement Payments - See Payments Guide 3. Explore Examples - See Examples for real-world use cases 4. Read the API Reference - See API Reference for complete documentation Common Setup Issues ════════════════════════════════════════════════════════════ SDK Not Loading (CDN) ══════════════════════════════════════════════════ If you're using CDN and the SDK doesn't load: 1. Check your internet connection 2. Verify the CDN URL is correct 3. Check browser console for errors 4. Try using NPM instead Wallet Not Connected ══════════════════════════════════════════════════ If [getWalletAddress()] returns [null]: 1. Make sure the game is running inside Arcadia's iframe 2. Ensure the player has connected their wallet in Arcadia 3. Check that [init()] was called successfully Payment Errors ══════════════════════════════════════════════════ If payments fail: 1. Verify the wallet has sufficient balance 2. Check that the game ID is correct 3. Ensure the game is running in Arcadia's iframe 4. See Error Handling Guide for specific error types Need Help? ════════════════════════════════════════════════════════════ • Check the FAQ for common questions • Review the Error Handling Guide for troubleshooting • See Examples for complete working code • Contact support@arcadia.com for additional assistance ═══════════════════════════════════════════════════════════════════════════════ For the latest documentation, visit: https://arcadia.obeliskprotocol.io/developer For support, email: support@arcadia.com ═══════════════════════════════════════════════════════════════════════════════