🕸️Game Engine Licensing
OmniSigma Game Engine — Technical Documentation
🎯Purpose & Scope
The OmniSigma Game Engine (OSGE) is a cross-platform, responsive runtime for instant, browser-based games. It provides:
Deterministic visual/state orchestration over math outcomes from the Math API.
A modular plugin system for rapid addition of new reels, features, animations, audio, and UI skins.
Native integration with OmniSigma RGS, sessions, telemetry, and compliance tooling.
Targets: Chrome, Safari, Firefox, Edge (desktop & mobile), iOS WebView, Android WebView.
🧩Architecture Overview
Core (minimal and stable)
Application(boot, resize, ticker)SceneManager(scene stack + transitions)ResourceManager(PixiAssets, atlases, fonts, json, sounds)EventBus(typed pub/sub, no hard dependencies)Time/Ticker(bridging GSAP and Pixi ticker)AbstractDrawable(your base view: attach/detach, zIndex, mask, cleanup)
Systems (cross-game services)
Audio(SoundManager)Input(pointer/keyboard, click guards)Localization(i18n/)Networking(game.websocket.ts+ request/response queue)State(store + selectors; already usingstore.dispatch)Config(game configuration, RTP tables, paytable)UIFramework(modal/popup service, toast, fullscreen, verifyComponent)
Game (slot runtime)
Grid(layout, symbol matrix)Reels(spin/stop mechanism, inertia, RNG hook)Symbols(atlas/id → sprite/spine)Lines(line calculation, highlight, win mask)Payout(win evaluation, scatter, bonus triggers)Controllers(orchestrators:FreeSpinController,LinesController, etc.)Assets(game-specific atlas mapping)
Features (self-contained mini-mechanics)
freeSpin/(enter/exit flow, counter, retrigger)wheel/(wheel-of-fortune)bigwin/(animation sequences, multipliers)loaderBonus/,bonusBalls/(e.g.BaseBonusBall)Each feature includes:
FeatureController,FeatureView,FeatureState(+ events)
UI (HUD + screens)
menu/,balance/,betControlBar/,button/,volume/,fullscreen/popUpDialog/,noFundsMessage/,verifyComponent/responsiveText/,multiColorText/,slider/,scrollBox/,scrBox/tutorial/,gameNameLogo/,blueBackground/
Scenes/Flows
LandingPage,MainPage,LoadingPageSlotMachine(main gameplay scene)
📱 Responsiveness & Aspect Ratio
Supported Aspect Ratios
Landscape: 16:9, 16:10, 21:9
Portrait: 9:16, 3:4
Square: 1:1
Layout Strategies
Adaptive Canvas Scaling (fit/cover with min/max scale).
Anchors & Constraints for HUD, buttons, meters.
Safe Area Insets (iOS notches, Android cutouts).
Dynamic Grid: symbol cell size derives from viewport and reel/row count.
Asset LOD: swap textures/audio quality by DPR & bandwidth.
Config Example
⚡ Renderer & Performance
WebGL2 renderer with Canvas2D fallback.
Sprite batching, texture atlases, object pooling.
Delta-time capping (avoid jump animations on tab return).
VSync aware; 60fps target, graceful degrade to 30fps.
Memory budgeter (mobile): evict least-recent atlases, audio streams.
🔄 Lifecycle Flow
Application.boot()→ initializes Pixi app, EventBus, ResourceManager, loadsgameConfig.SceneManager.push(LoadingPage)→ loads all resources viaResourceManager.preload().SceneManager.replace(SlotMachine):Initializes
Grid,Reels,SymbolFactoryRegisters
ControllerstoEventBus(e.g.,FREE_SPIN_TRIGGERED,SPIN_START,SPIN_STOP, etc.)Binds HUD to state/selectors (
balance,bet, etc.)
Gameplay loop (spin → evaluation → feature → settle).
Cleanup (
scene.destroy()callsAbstractDrawable.destroy()recursively).
📏 Conventions and Rules
Unidirectional flow:
UIandFeaturesnever callGridorReelsdirectly — they go throughEventBusor controllers.Typed events & selectors: no
anyusage, rely on TypeScript for safety.GSAP only in views: Controllers only emit "start/stop/highlight" events.
ZIndex policy: centralize in
ZLayers.ts(e.g.BACKGROUND=0,REELS=10,HUD=100,MODAL=1000).Destroy discipline: every
AbstractDrawableunsubscribes fromEventBus/Tickerindestroy().
🎬 Animation & Tweening System
Timeline-based sequencer with easing curves, bezier paths, spring.
Row/line tweening (e.g., shimmer/trace across a payline, pulse on win).
Symbol choreography: drop, bounce, shake, explode, trail, particle systems.
Event-addressable “summoning” of animations:
Animations.summon(id, payload)to call any registered VFX.
Async composition: parallel/sequential groups with awaitable Promises.
Animation Registration
🔊 Audio Engine
WebAudio with fallback to HTML5 audio.
Cue system tied to state events (spin_start, stop, feature_enter).
Dynamic ducking for voice/VFX, latency-aware scheduling.
Per-device volume caps; mute/persist via local storage.
Audio Cue Map
🗺️ Game State & Flow
State Machine
IDLE → SPIN_REQUESTED → RESULT_RECEIVED → REVEAL → WINS_APPLIED → FEATURES → ROUND_END → IDLE
Round Controller
Accepts Math API result; orchestrates reel stops, cascades, feature entries.
Guarantees deterministic reveal order.
💻 Minimal Entry Point Example
🎰 Reels, Symbols & Mechanics
Reel Manager
Supports fixed strips, weighted symbol bags, virtual reels, stacks, tower reels, expanding reels, reel sets switching.
Stop map construction based on math outcome.
Mechanics Engines
Lines (n-line), Ways (e.g., 243, 1024), Clusters, Cascades, Hold-and-Spin / Respin, Multipliers, Wild behaviors, Symbol upgrade, Link features, Pick features, Trail/meters.
Volatility tuning via math inputs; RTP targets handled server-side.
Sample Game Definition
🎁 Feature Framework (Bonus/Events)
Feature Bus: subscribe/emit lifecycle events (
feature:enter,feature:exit).Pluggable modules for free rounds, respin, pick bonus, progressive multipliers, random events (e.g., symbol swaps).
UI overlays and persistent meters with serialization.
Feature Contract
🔗 Math/API Integration
Server-authoritative results via RGS Math API.
Client consumes
SpinResultand renders accordingly; no client math decisions.
Spin Flow
Math Result (Example)
🌐 RGS/Platform Integration
Session API: create/resume, currency, limits, jurisdiction flags.
Wallet Adapter: debit/credit, transactional safety, idempotency keys.
Telemetry: round timings, fps, error codes, device profile.
Remote Config: A/B feature toggles, RTP profile selection (server-side).
🖼️ Asset Pipeline
Texture atlases (multi-dpi), webp/png fallback.
Audio: ogg/opus primary, aac fallback.
Localization: ICU messages, RTL support, font fallbacks.
Theming/Skinning: color tokens, typography, symbol packs hot-swappable.
🤲 Input, Accessibility & UX
Pointer/touch/keyboard; gesture affordances for mobile (swipe to spin).
Focus order, screen-reader labels for controls, high-contrast theme.
Haptics (where available), reduced-motion preference respected.
🧪 QA, Simulation & Telemetry
Deterministic playback: record/replay of rounds (devtools).
Auto-sim runner generating heatmaps for outcomes, feature hit rates.
Golden-frame tests for reels/stop positions and animation baselines.
Crash reporting with symbolicated stacks and breadcrumb logs.
🔒 Security & Compliance Hooks
Obfuscation, runtime integrity checks, asset signature verification.
Jurisdictional flags to toggle features/UX.
Hooks for reality checks, session timers, limit banners (where required).
➕ Adding New Content (Fast Path)
Add a new reel set
Create strip CSV/JSON.
Reference in
reels.sets[].Bind to state (base/feature) via rules.
Add animations
Add sounds
EventBus.on("row:highlight", r => Audio.play("row_trace"));
Add a feature
Implement
Featureinterface, register withFeatureRegistry.register("myFeature", impl).
📡 Example of Public APIs
⚙️ Configuration Schemas (Excerpts)
EngineConfig
TweenOpts
🔁 Versioning & Backward Compatibility
SemVer across engine core, mechanic plugins, and UI kits.
Back-compat layer for schema evolution (symbol aliases, reel set migration).
Deprecation window policy (two minor versions).
✅ Deliverables & Checklists
✅ Cross-device responsive behavior verified (phones, tablets, desktop, notches).
✅ 60fps target under typical loads; fallback to 30fps with quality scaling.
✅ Animation summon APIs & row tweening implemented.
✅ Easy addition of new reels, features, sounds, animations via registry.
✅ Integration with RGS Math API, sessions, telemetry.
✅ Security & compliance hooks wired.
Last updated


