Repository navigation
Eon Commando 2.4.0 — phones use the whole screen
Portrait was using a quarter of your screen. That's fixed — and I measured it rather than guessing.
Before: on a 390×844 phone the canvas was 390×219 — 26% of the height, sprites tiny.
After: 390×390 — 46% of the height, 78% larger.
What was wrong
The view was forced to 16:9 in both orientations. A 16:9 band on a phone held upright can only ever be a strip, no matter how you scale it. Portrait now uses a square logical view (270×270) and the canvas takes the full screen height.
The layout
The play area sits at the top where your eyes are, the earth continues below it with strata and grit, and the thumb pads overlay that lower band — so nothing is wasted and nothing overlaps the action. Sky above, ground in the middle, dirt under your thumbs.
Measured fill, now 100% of both axes at every size I could test: 390×844, 360×640, 412×915, 768×1024, 844×390, 640×360, 1440×810. Landscape was already full and stays full.
Three things this broke, all fixed
- The title screen overflowed a 270-wide view — the control lines, the start prompt and the version string ran off both edges. Shorter copy below 380 px wide.
- The settings screen overflowed the same way; rows and footer reflow now.
- Bosses could walk off screen, because the arena is a fixed 480 wide but a portrait view is 270. Boss movement is clamped to the visible window — verified at 270 wide with the boss centred at x=135 of 270.
Honest limit
A 270-tall world can occupy at most 390×390 on a 390-wide phone. That's geometry, not laziness — to fill more you'd have to show less width than the player needs to see incoming fire. If you want the widest view, rotate: landscape shows 584 world pixels against portrait's 270, which is why the rotate hint is still there.
Numbers
| Game | index.html — 156 KB, single file |
| Gzipped | 43 KB |
| Portrait play area | 390×390 on an iPhone, up from 390×219 |
| Screen fill | 100% × 100% at every viewport tested |
| Dependencies | 0 |
Full notes in CHANGELOG.md.