Game SDK

↓ Download SDK 1.8.1

Internal VORIVOX development. Candidate package: remaining gates are listed under compatibility.

Example: precision target

A 10-shot series with 1–10 rings, one visible last-hit marker and a total score out of 100.

Scene structure

PrecisionTarget sceneOne UI canvas for the game HUD and one dedicated controller object for round logic
CanvasGame UIThe target, HUD and result panel live on the same Canvas.
TargetPlayfieldTarget playfieldContains the target artwork and the last-hit marker.
ScorePanelScore panelCurrent total score and hit count.
ShotCounterShot counterShows progress from shot 1 to shot 10.
ResultPanelRound resultAppears after the tenth shot.
GameControllerController objectHosts VorivoxGameSdk, game state and hit handling.
  • subscribes to HitReceived;
  • maps each hit to a scoring ring;
  • replaces the previous hit marker with the new one;
  • refreshes the HUD and completes the round after 10 shots.
ObjectPurpose
RingsBackground artwork for rings 1–10.
LastHitMarkerThe only visible impact marker. Every new shot should move or replace it instead of stacking markers on screen.
ScorePanelShows the accumulated score for the 10-shot series.
ResultPanelDisplays the final result when the series is complete.
Players should only see a single LastHitMarker. When the next shot lands, the previous marker must be removed or re-used so it does not block the center.

Hit logic

private void OnHit(VorivoxHit hit)
{
    if (!roundActive || shotCount >= 10)
        return;

    Vector2 point = hit.ToCanvasLocal(playfield);
    float radius = point.magnitude / targetRadius;
    int ring = CalculateRing(radius);

    shotCount++;
    totalScore += ring;

    MoveLastMarker(point, ring);
    RefreshHud();

    if (shotCount == 10)
        FinishRound();
}

Ring calculation

private static int CalculateRing(float normalizedRadius)
{
    if (normalizedRadius > 1f) return 0;
    return Mathf.Clamp(10 - Mathf.FloorToInt(normalizedRadius * 10f), 1, 10);
}
For a real sports target, store ring radii in configuration or a ScriptableObject rather than assuming identical ring widths.
Teaching samples are scripts requiring a Unity scene and assigned references. Production needs pause/countdown guards, connection-loss handling, shot_id deduplication and listener disposal. Older samples may require adaptation; complete gameplay is not claimed.

Playground demonstrates the shared contract in a browser. It is not a Unity Player or a C# package test.