Pudding runner’s speed perception bug fixed by locking view width to 256 pixels

The Pudding Escape: Super Jelly · Game Developme: Super Jelly fixed a 50 % speed bug by locking view width.

The Pudding Escape: Super Jelly team discovered that rotating a phone changed the runner’s perceived speed by up to 50% and resolved it by fixing the horizontal view width to a constant 256 dots, then scaling height or adding pillarboxing as needed.

Why the orientation mattered

The game stores the jelly’s velocity in world units, independent of screen size. However, the apparent speed displayed to the player is calculated as world units per second divided by the logical view width. When the view became narrower in portrait mode, the same world speed crossed more screen‑widths per second, making the run feel faster. Conversely, a wide landscape window reduced the perceived speed.

Originally the desktop 16:9 layout used a 320‑dot width, phone portrait used 214 dots (after a 20 % zoom to address complaints of slowness), and phone landscape expanded to 390 dots because the view grew with the window size. These differing widths caused the 50 % speed discrepancy.

Measuring the bug

The developers timed world displacement over a 3.85‑second segment of a seeded run and divided the distance by the view width. With the old widths the calculated screen‑widths per second were 0.335 (desktop), 0.512 (portrait) and 0.284 (landscape). The numbers show that portrait felt substantially quicker while landscape felt slower, despite identical physics.

Comparison of old and fixed screen-widths per second across desktop, portrait and landscape showing old values of 0.335, 0.512 and 0.284 and fixed values of 0.419, 0.428 and 0.433.

After applying the fix, the same runs measured 0.419, 0.428 and 0.433 screen‑widths per second respectively—effectively identical values within sampling noise, confirming that the camera behaved consistently across orientations.

The solution: a locked horizontal view

The new approach fixes the horizontal view at 256 dots for every layout. For a 16:9 ratio this yields a base height of 144 dots, preserving the original aspect. When the device is taller than 16:9, the width stays at 256 while the height grows up to a maximum of 800 dots, adding extra sky. If the device is wider, the view remains 256 × 144 and the extra horizontal space is filled with pillarbox bars.

The code snippet introduced constants VIEW_W = 256, BASE_H = 144 and MAX_H = 800, with a small viewSize function that computes the appropriate height based on the actual aspect ratio. During a run the view dimensions (W, H) are frozen; only the CSS stage resizes, preventing mid‑jump zooms when the phone is rotated.

Practical impact for developers

By separating the logical view size from the physical window, the developers eliminated a perception bug without altering any physics calculations. The fix is lightweight, relying on a single constant and a conditional scaling routine, and can be adopted in other 2D runners or side‑scrollers that use world‑unit physics combined with camera‑based rendering.

The devlog also provides a checklist: keep perceived speed stable by locking horizontal width, apply letterboxing or pillarboxing instead of changing the width, freeze view parameters mid‑session, and always measure speed in world‑units per second divided by view width rather than raw CSS pixels.

Why consistent view width matters for game feel

A player’s sense of speed is a core feedback loop in endless runners. When that loop is broken by variable view widths, players may perceive the game as unbalanced, leading to frustration or the mistaken belief that the core physics are buggy. Locking the horizontal resolution decouples visual pacing from device dimensions, ensuring that a given world‑unit velocity translates to the same on‑screen motion regardless of aspect ratio. This principle extends beyond casual runners; any genre that relies on uniform motion cues—platformers, side‑scroll shooters, or simulation games—benefits from a stable camera metric. Moreover, the technique simplifies cross‑platform testing because developers no longer need to validate speed perception across a matrix of resolutions. By handling scaling at the view layer rather than the physics layer, the game remains deterministic, and visual adjustments do not introduce hidden state changes that could affect replay‑ability or score‑based competition. The Pudding fix therefore serves as a practical case study for studios aiming to deliver a consistent experience across phones, tablets, and desktop browsers while keeping the codebase lean.

Editorial graphic and headline text by Signal Titans.

Source: Rotating the phone made Pudding 50% faster · Rotating the phone made Pudding 50% faster – Pudding Escape: Super Jelly by oddbout

Share this article
FacebookThreadsLinkedInX

Leave a Reply

Your email address will not be published. Required fields are marked *