Files
amiga/MatrixRain/OPTIMIZATION.md
T

1.6 KiB

Rendering optimization (2026-11-06)

Preserves the existing palette, dimensions, animation rates and visual design.

  • Boing/Matrix: fuse resized pixel sampling and RGB15 conversion into one pass; duplicate scanlines with memcpy.
  • Boing: ellipse shadow spans replace repeated per-pixel multiplications with identical coverage.
  • Boing 3D: cache horizontal sphere sampling coordinates per apparent size.
  • Matrix: cache sparse glyph pixels, preserving glow and core drawing order.
  • Chrono: cache horizontal sampling coordinates and date conversion; omit invisible analog/digital calculations.

Original source and executable retained in versions/before-optimization/. Build with build.ps1. No frame-rate reduction.

Cell cache update (2026-11-10)

  • Cache glyph and brightness per stationary grid cell; clear and redraw only changed 8x12 cells, including glow.
  • Convert/upload/present the bounding rectangle of changed cells; full presentation on resize or refresh. When changes are scattered, the rectangle can still cover most of the frame.
  • Preserve 50 fps pacing in foreground and background, with event-aware timer waits, process priority -1 and idle pause.
  • tests/verify-cache.py: 240 deterministic frames identical to full redraw, with 8.8% of cells changed on average in the synthetic workload. This is not a measured CPU saving.
  • Built from C:/git, installed and observed running alongside RetroIRC and Boing 3D. Interactive resize test was interrupted by user input and is not claimed as verified.
  • Previous source and installed executable: versions/before-cell-cache/.