AI Integration Guide
🚀 Quick Start - It's This Easy
// 1. Initialize
const ogp = new OpenGameSDK({ ui: { usePointsWidget: true } });
ogp.init({ gameId: 'YOUR_GAME_ID' });
// 2. Add points during gameplay (display only)
ogp.addPoints(10);
// 3. Save when game ends - auto-logs in if needed!
await ogp.savePoints(totalScore);💡 Key Concepts
Feature
What It Does
1) Install
2) Initialize
3) Identity & Login
✨ Auto-Login: The Easy Way
Manual Login (Optional)
4) Scoring & Saving
The Simple Pattern
Best Practice: Save Only Improvements
Game Type Examples
5) Rewards & Claims
6) UI Helpers
7) Events
8) Complete Example
9) Integration Checklist
API Reference
Methods
Method
Description
UI Namespace
Method
Description
Events
Event
When Fired
Constructor Options
Last updated