How nikamimi/dk64rekong-retroachievements works
DK64 RetroAchievements is an in-game RetroAchievements mod. The game-loop hook defers achievement evaluation until gameplay state is updated; the native bridge then evaluates game memory, tracks progress locally or through the online client, and exposes achievement and account data to the in-game browser. The browser supports badge browsing, account actions, and progress reset, with optional badge imagery and unlock audio. The README documents these major features; some implementation wiring is inferred only where the sampled excerpts do not show it, so uncertain links are omitted.
Main entry points: client_bridge.cpp Client bridge · ui.c Achievement browser · probe.cpp Native probe · mod.c Game-loop hook
Components 21
Game Integration
- Game-loop hook
src/mod.c - Native probe
native/probe.cpp
Achievement Tracking
- Client bridge
native/client_bridge.cpp - Game memory
native/memory.cpp - RA client runtime
- HTTP transport
native/http_transport.cpp - Award safety
native/online_awards.cpp - Guest catalog
native/guest_catalog.cpp
In-Game Browser
- Achievement browser
src/ui.c - Browser input
native/browser_input.h - Grid navigation
include/ra_browser.h - UI API
include/ra_ui_api.h
Persistence and Media
- Local progress
native/local_progress.cpp - Badge cache
native/badge_cache.cpp - Unlock notifications
native/toast_sound.cpp
Other components
- Player
- DK64 runtime
- RetroAchievements
- Recomp UI
- RA badge media
- Local files
Connections 23
- DK64 runtime → Game-loop hook: fires hooks
- Game-loop hook → Native probe: calls per frame
- Native probe → Client bridge: evaluates frame
- Client bridge → Game memory: reads game state
- Client bridge → RA client runtime: evaluates achievements
- Client bridge → HTTP transport: dispatches requests
- HTTP transport → RetroAchievements: sends HTTPS
- Client bridge → Award safety: checks submissions
- Client bridge → Local progress: records local unlocks
- Local progress → Local files: reads and writes
- Client bridge → Guest catalog: loads guest catalog
- Guest catalog → Local files: reads and writes
- Player → Native probe: provides input
- Native probe → Browser input: captures controls
- Browser input → Achievement browser: supplies navigation
- Achievement browser → Grid navigation: uses grid logic
- Achievement browser → UI API: calls UI imports
- UI API → Recomp UI: renders interface
- Achievement browser → Client bridge: requests account and achievement data
- Client bridge → Badge cache: serves badge images
- Badge cache → RA badge media: downloads badges
- Client bridge → Unlock notifications: plays unlock jingle
- Client bridge → Achievement browser: provides toast details