Files
amiga/BoingBall3D/OPTIMIZATION.md
T

1.8 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.

Multitasking update (2026-11-10)

  • Convert, upload and present only the union of the old/new sphere and shadow bounds. Full redraw on resize/refresh.
  • Animation task priority -1: normal desktop applications take precedence.
  • Event-aware timer pacing: up to 30 fps active / 15 fps inactive; paused windows wait for input.
  • Position and rotation use elapsed time; scene, palette, projection and sprites retained.
  • Removed the unconditional WaitTOF, keeping the layer locked only during partial presentation.
  • 476 synthetic comparisons at 240x180, 400x300, 800x600 and 1280x960 passed against full redraw. Synthetic mean damage area 13.3%; this is not a measured CPU percentage.
  • Emulator smoke check: animation, resize and unsent RetroIRC typing with the demo running. Perceived latency still needs the user's judgement.

Previous source and installed executable: versions/before-damage-rendering/.

Fluidity correction

The user found 30/15 fps pacing visibly less fluid. Pacing is now 50 fps in both foreground and background; damage rendering, priority -1 and event-aware waits remain. This supersedes the initial 30/15 fps cap.