Skip to content
CAI
Software that uses CAICheck a score

regb/scala-game-library

65.4

Adequate · 7 November 2026

30.2k

lines of production code

Scala

with Kotlin

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Snake game example with safe-area support and multi-platform builds

A new Snake game example has been added to the examples/snake directory, demonstrating the SGL framework's cross-platform capabilities. The implementation (App.scala) features a fixed-step game loop and explicitly respects the Window.safeArea, centering the playfield within safe insets and displaying a 'No safe area to play in' message when the area is too small. The project includes a Bazel BUILD file defining targets for JVM desktop (AWT), native desktop, HTML5, and Android, along with a README explaining how to run each variant.

examples/snake · high confidence

Added Bazel build rules for Scala Native linking

This change introduces a new Bazel build configuration for the Scala Native linker. It adds a \BUILD\ file that defines a \scala\_binary\ target named \linker\, which depends on Scala Native 3 tools and utilizes specific Scalagl compiler options. The associated \ScalaNativeLinker.scala\ source file implements the linking logic, configuring the Scala Native build with debug mode, no garbage collector, and specific clang paths to produce an executable output.

bazel/scalanative · high confidence

Android backend adds safe area support to window proxy

The Android backend now exposes safe area insets (left, top, right, bottom) through the window proxy, allowing applications to account for device-specific UI elements like notches and home indicators. This is implemented by tracking safe area insets in the GameView and exposing them via the AndroidWindowProxy, ensuring content is rendered within the visible screen area on modern Android devices.

app · high confidence

Initial release of 2D/3D math primitives, collision detection, and game engine systems

This change introduces the foundational math and geometry primitives for the SGL library, including \Rect\, \Polygon\, and \Circle\ classes in the \sgl.math\ package, along with a comprehensive collision detection module supporting circle-circle, AABB, circle-AABB, and convex polygon (SAT) checks. It also adds the core systems for the gameobject engine, such as \Spatial2D\ and \Spatial3D\ transform update systems, \Updatable\ and \FixedUpdatable\ component capabilities, and an OpenGL renderer interface, alongside initial 2D screen examples for board, menu, and platformer games.

(repo-wide) · high confidence

Introduce SGL Bazel build rules and asset tooling

This change adds the initial Bazel build infrastructure for the SGL game library, including Starlark rules for managing typed assets (images, audio, fonts, text, and drawables with density variants) and generating platform-specific main entrypoints for Desktop (AWT, LWJGL, Native) and HTML5 targets. It also introduces a Java-based image asset tool for copying, resizing, and extruding images, along with corresponding tests to verify the build rules and asset processing.

bazel/sgl · high confidence

Introduce metrics instrumentation library with counters, gauges, and histograms

A new metrics library has been added to the core utilities, providing \Counter\, \IntGauge\, \FloatGauge\, and \Histogram\ classes for tracking application performance data. The library includes an \InstrumentationProvider\ trait with a default implementation that supports a warmup period, optional periodic resets, logging of metrics to the console, and on-screen rendering via the canvas. A \NoInstrumentationProvider\ is also available for environments where metrics tracking should be disabled without overhead.

core/src/main/scala/sgl/util/metrics · high confidence

Introduction of abstract AdsProvider interface with interstitial and rewarded ad support

The core ads module now exposes a new \AdsProvider\ trait that standardizes how the game handles advertising. This abstraction introduces support for both interstitial and rewarded video ads, providing methods to load, check availability, and display these ad types asynchronously. It also includes a \NoAdsProvider\ implementation, allowing developers to easily disable ads for testing or ad-free versions by injecting a mock provider that pretends ads are always ready without actually displaying them.

core/src/main/scala/sgl/ads · high confidence

Launch of the Scala Game Library documentation website

The project now includes a dedicated marketing and documentation site built with Astro and Starlight. This new website provides a public landing page featuring the framework's core capabilities, installation instructions, and example showcases, alongside a structured documentation section covering getting started, core concepts, graphics, input, audio, assets, and platform targets. It also includes a migration guide to help users transition from older resource-path-based APIs to the new typed asset system and updated GameObject spatial APIs.

website · high confidence

New Android backend with safe-area support and system text sharing

This change introduces a new Kotlin-based Android backend for the game engine. It adds support for safe-area insets, allowing games to respect system bars and display cutouts via a configurable \SafeArea\ mode. It also enables users to share text from the game using the native Android share sheet. The backend includes full implementations for audio, input, saving, and system interactions, along with ProGuard rules for Firebase services.

backends/android-kotlin · high confidence

New Bazel rules for building and serving Scala.js applications

This change introduces a new set of Bazel build rules in the \bazel/scalajs\ directory to streamline the development and serving of Scala.js web applications. It adds a \scalajs\_html\_template\ rule that generates HTML files by substituting Scala.js output paths into a template, and a \run\_server\ helper that creates a Go-based HTTP server. This server copies the generated HTML, JavaScript, and static assets into a temporary directory and serves them on port 8080, automatically cleaning up the temporary files when the server stops. This allows developers to easily build and locally serve Scala.js applications using Bazel.

bazel/scalajs · high confidence

New Bazel-based Android build system with typed assets and modern Android configuration

This change introduces a new Bazel build infrastructure for Android applications, replacing previous methods with a relocatable runner script and a suite of Kotlin/Gradle templates. The system now supports typed asset packaging, ensuring that drawables and other resources are correctly mapped to Android resource directories (e.g., \res/drawable-mdpi\) and that text assets are placed in the correct assets folder. It configures the Android project to use API level 37, enables R8 optimization with resource shrinking, and includes specific ProGuard rules to preserve drawable resources referenced via \Resources\#getIdentifier\. The generated \MainActivity\ template now supports modern system bar modes (safe-area, edge-to-edge, immersive) and behaviors, allowing games to control how the UI interacts with system overlays. Additionally, the build system integrates optional modules for Firebase, AdMob, and Play Games, and uses Kotlin for the backend configuration.

bazel/sgl/android · high confidence

New GameObject engine and Screen2D examples with headless testing support

This change introduces the \sgl-gameobject\ engine library, providing a component-based architecture for game development, and adds a suite of example applications to demonstrate its capabilities. Users can now run the Asteroids game on desktop (LWJGL and native), HTML5, and headless environments, as well as the Solar System simulation. Additionally, the \sgl-screen2d\ engine is accompanied by new examples for board, menu, and platformer games, including Tiled map support. To ensure reliability, integration tests have been added to verify headless control and rendering correctness.

engines · high confidence

New Tiled map rendering extension with multi-density support

The \extensions/tiled\ module now provides a complete renderer for Tiled maps, including a JSON parser (\TmxJsonParser\) for TMX files, a density-aware resolver (\TiledMapResolvedDensity\) that scales tile coordinates and assets to match the target screen DPI, and a \TiledMapRenderer\ that draws tile layers, image layers, and object layers with support for animations and opacity. Tests verify the correct scaling behavior across different density buckets.

extensions/tiled · high confidence

New desktop and HTML5 backends for the Scala game library

This release introduces new platform backends for desktop (AWT and LWJGL) and HTML5 (Scala.js). The AWT backend provides a Java-based graphics and input implementation, while the LWJGL backend adds OpenGL rendering and OpenAL audio support for high-performance desktop applications. The HTML5 backend enables running the game in web browsers, featuring canvas-based rendering, scalable bitmap loading for different pixel densities, and configurable keyboard capture modes for embedded games.

repository · high confidence

New desktop backends for JVM and Native platforms

This change introduces new backend implementations for desktop environments, organized under the \backends/\ directory. For the JVM, it adds a shared \desktop-jvm-shared\ module providing core system services (resource loading, timing, process exit), LWJGL-based windowing and OpenGL rendering, Java Sound audio, Lift-based JSON parsing, and terminal logging. It also includes a screenshot capture feature for desktop apps, controllable via the \SGL\_SCREENSHOT\_PATH\ environment variable or \sgl.screenshot.path\ system property. For Native, it adds Scala Native bindings for OpenGL and SDL2, enabling headless or windowed desktop execution on native targets.

backends/desktop-jvm-shared, backends/desktop-lwjgl, backends/desktop-native, backends/html5 · high confidence

New headless OpenGL backend and portable font generation tooling

Users can now run the engine without a display server using the new headless OpenGL backend, which uses a surfaceless EGL pbuffer to render frames and accepts input events from external controllers or tests. This backend includes frame capture capabilities for verifying rendering output. Additionally, a new tool in the tools/font-atlas-generator directory generates and verifies portable Noto Sans font atlases, ensuring consistent text rendering across different environments.

backends/headless-opengl, backends/lwjgl-shared · high confidence

New hello-canvas example demonstrating text layout and multi-backend support

Added a new example application in examples/hello-canvas that showcases the canvas rendering system, specifically highlighting text layout features such as blank line preservation, row alignment, and font shrinking to fit within a defined box. The example includes a Bazel build configuration that enables running the app across multiple backends, including desktop (AWT, LWJGL, native) and HTML5 (Screen2D, OpenGL).

examples/hello-canvas · high confidence

New platform backend implementations for Android, HTML5/Cordova, and JVM

This change introduces new backend implementations for SGL across three platforms. On Android, it adds optional modules for Google AdMob ads, Firebase Analytics, and Google Play Games Services, allowing games to opt into these features without bundling their SDKs by default. For HTML5/Cordova, it provides audio providers using the Cordova native-audio plugin (replacing the previous media plugin as the default for CordovaApp) and Firebase Analytics integrations for both Cordova and standard HTML5 environments. On the JVM, it adds a ThreadPool-based scheduler and a Future-backed Loader to handle asynchronous operations using standard Java concurrency utilities.

(repo-wide) · high confidence

New proxy layer for Android/Kotlin platform integration

A new proxy subsystem has been added to the core engine to bridge Scala game logic with Android platform runners. This includes a \ProxiedGameApp\ lifecycle interface for frame updates and capture, and a suite of provider traits (Audio, Canvas/Graphics, JSON, Logging, Platform, Save, Scheduler, System, Window) that delegate engine capabilities to a \PlatformProxy\. This enables the engine to run on Android using Kotlin for the platform side while keeping the game logic in Scala.

core/src/main/scala/sgl/proxy · high confidence

New scene2d module with scene graph and UI widgets

The \modules/scene2d\ module introduces a hierarchical scene graph for organizing renderable objects and handling input routing, along with a set of UI widgets including buttons, popups, dialogs, and scrollable panes. This provides a structured way to build game UIs such as menus and HUDs, featuring coordinate translation, event interception, and smooth scrolling capabilities.

modules/scene2d · high confidence

New utility abstractions for asynchronous loading, chunked scheduling, and JSON parsing

The \sgl.util\ package introduces several new core abstractions to support cross-platform game development. A new \Loader\ trait provides an asynchronous, Future-like API for asset loading with support for callbacks, transformation, and combining multiple loaders. A \ChunkedTask\ system allows expensive computations to be split into small units and scheduled via a \SchedulerProvider\, which includes a default single-threaded implementation that allocates CPU time from the game loop. Additionally, a dependency-free \SimpleJsonProvider\ implements a JSON parser that normalizes all numbers to \Double\ for consistent cross-platform behavior, alongside new utilities for tweening equations, object pooling, and random number generation.

core/src/main/scala/sgl/util · high confidence

Architecture

New Bazel build targets and Gradle wrapper for backends

The backends directory now includes Bazel BUILD files for all backend modules (desktop-awt, desktop-jvm-shared, desktop-lwjgl, desktop-native, headless-opengl, html5, jvm-shared, and lwjgl-shared), enabling builds via Bazel. Additionally, the android-kotlin backend now includes a Gradle wrapper configured to use Gradle 8.13.

backends · high confidence

Behavioural changes

1 commit (0 fixes) modifying (repo-wide)

A change to existing behaviour in (repo-wide) — 1 commit, 8 files: “Upgrade Firebase and add consent, attribution diagnostics and ad observation”. Also in this area: New platform backend implementations for Android, HTML5/Cordova, and JVM.

admob, examples/live-config, modules/live-config-jvm · medium confidence · unverified

2 commits (0 fixes) modifying backends/android-kotlin/firebase, firebase

A change to existing behaviour in backends/android-kotlin/firebase, firebase — 2 commits, 10 files: “Guard Play referrer payload reads with current consent”; “Upgrade Firebase and add consent, attribution diagnostics and ad observation”.

backends/android-kotlin/firebase, firebase, tools · medium confidence · unverified

Core engine architecture refactored with new provider traits and input system

The core engine has been restructured around a cake-pattern architecture, introducing new base traits for application lifecycle (Application), audio (AudioProvider), and OpenGL rendering (OpenGLProvider). A new unified InputProcessor system replaces previous input handling, featuring a CombinedInputProcessor for chaining handlers and a PointerInputProcessor mixin to abstract mouse and touch events for cross-platform compatibility. Additionally, a FrameCaptureProvider has been added to support capturing rendered frames, and a portable font atlas (PortableFontData) is now included for text rendering.

core/src/main/scala/sgl · high confidence

Introduction of configurable analytics providers

The analytics module now supports pluggable implementations via new provider traits. LoggedAnalyticsProvider logs all analytics events (such as level changes, purchases, and achievements) to the application logger for debugging purposes, while NoAnalyticsProvider provides a lightweight, no-op implementation that ignores all events, useful for release builds on platforms without analytics frameworks.

core/src/main/scala/sgl/analytics · high confidence

Test coverage

1 commit adding/updating tests in modules/live-config; Added unit tests for core engine components; Added unit tests for metrics components; Added unit tests for utility components.

Dependencies

Migrate build system to Bazel 9 with Scala 3 and cross-platform support

The project has replaced its previous build configuration with a Bazel-based system (version 9.1.1), enabling cross-platform compilation for Desktop JVM, Android, iOS (via web), and Native targets. This change introduces Scala 3.3.8 as the primary language version, integrates rules\_scala 7.2.6 and rules\_jvm\_external 7.0 for dependency management, and configures LWJGL 3.3.6 for graphics and audio. The new setup includes a \.bazelrc\ for worker strategy and proto toolchain resolution, a \MODULE.bazel\ defining the dependency graph, and a \.gitignore\ tailored for Bazel artifacts, fundamentally changing how users build and run the game engine.

(repo-wide) · high confidence

New Android Kotlin backend and website dependency updates

This change introduces a new Android Kotlin backend module (\backends/android-kotlin\) that provides Gradle build configurations for SGL's Android integration, including submodules for Firebase analytics, AdMob ads, and Google Play Games services. The build is configured to compile against Android SDK 37 with a minimum SDK of 26, using Kotlin 2.1.21 and AGP 8.13.0, and relies on Bazel-built core JARs. Additionally, the website's \package.json\ is updated to use Astro 7.2.9 and TypeScript 5.9.3.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 55 → 65 (+10.9)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 61 → 61 (+0.3)
  • Architecture 97 → 96 (-0.5)
  • Maturity 42 → 66 (+24.4)
  • Readiness 60 → 60 (+0.0)
  • Security 96 → 94 (-2.5)

Resolved (2)

  • Change coupling: NativeInputProvider.scala ↔ NativeWindowProvider.scala (backends/desktop-native/src/main/scala/sgl/native/NativeInputProvider.scala)
  • TodoComment (backends/desktop-jvm-shared/src/main/scala/sgl/desktop/JavaSoundAudioProvider.scala)

New (1)

  • ReferrerCapture.attempt (cognitive 17) (backends/android-kotlin/firebase/src/main/java/sgl/android/analytics/InstallAttribution.kt)

Changes since last survey

  • 7 commits — 7 feature/other, 0 fixes

By area

  • backends/android-kotlin — 2 commits
  • (root) — 1 commit
  • backends/desktop-jvm-shared — 1 commit
  • bazel/sgl — 1 commit
  • examples/live-config — 1 commit
  • website/pnpm-lock.yaml — 1 commit

Notable commits

  • change: Bump astro from 7.2.9 to 7.4.2 in /website
  • change: Guard Play referrer payload reads with current consent
  • change: Handle unavailable JavaSound clips without interrupting playback callers
  • change: Own and pin SGL Maven dependency resolution
  • change: Upgrade Firebase and add consent, attribution diagnostics and ad observation
  • change: Use a managed Java runtime for desktop AWT apps
  • change: prototype for config reload

Architecture

  • Containers 0 added · 0 removed · contexts 1 added · 0 removed · edges 0 added · 0 removed

Added bounded contexts (1)

  • firebase

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

regb/scala-game-library was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 7 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 13396480c86f98260193c1030099573ab2d38ee7 — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-5f8314471808.