Make Your Processing Sketches Frame-Rate Independent with millis()
Processing sketches that move objects by fixed pixels per frame run at different speeds on different displays. Compute delta time from millis() to make motion frame-rate independent.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Processing sketches that move objects by fixed pixels per frame run at different speeds on different displays. Compute delta time from millis() to make motion frame-rate independent.
Learn how to create and reuse a PGraphics buffer in Processing to cache complex drawings and keep frame rates high.
Since Processing 3.0, surface configuration must happen in settings() before the window exists. This guide shows how to migrate legacy sketches, choose renderers, and handle HiDPI pixel density.
Learn how to use Processing’s PGraphics buffer for clean off‑screen rendering, compositing, and image export. A step‑by‑step example shows gradient generation, memory tips, and trade‑offs.
When a Processing sketch stutters because static elements are redrawn every frame, PGraphics offers an off-screen buffer you can composite with a single image() call. Here is how the pattern works, a concrete example, and the memory and renderer trade-offs to check.
Stop using random() for movement. Learn how to use Perlin noise in Processing to create fluid, organic animations and understand the critical role of step size and mapping.
Guide to choosing JAVA2D, P2D, or P3D for Processing 2D sketches, covering compatibility, performance, shader support, and validation steps.
A concise guide to decide which Processing renderer fits your platform, performance needs, and compatibility constraints, with a validation sketch to test frame rate and visual quality.
A concise guide to implementing the Transactional Outbox pattern, covering atomicity, trust boundaries, monitoring, and failure handling in distributed systems.