Compare commits

...
4 Commits
Author SHA1 Message Date
waozi 8332bb879e Release Apfelwurm 0.2.7: desktop play starts at once and the site loads faster 2026-10-27 17:43:55 -03:00
waozi b4508b84a7 Start every desktop build with swipe steering
The default desktop build has no PLATFORM_DESKTOP define, so the
choice now applies to every build that is not Android, the browser or
a hosted copy.
2026-10-27 17:42:53 -03:00
waozi cbdcbdd40e Load wurm.waozi.xyz with a small title picture
The page's loading background was the 2.7 MB title PNG. The web build
now makes a 280 KB WebP for it and a 300 KB JPEG for link previews from
the same art, with no visible difference; the game keeps the original.
2026-10-27 17:41:00 -03:00
waozi 6cc71cf7c4 Start desktop play with swipe steering instead of asking
A desktop always has a keyboard and a mouse drag steers like a swipe,
so Play goes straight into the run there. Pause and Settings still
switch to the direction pad; phones and the browser keep asking.
2026-10-27 17:33:03 -03:00
7 changed files with 26 additions and 10 deletions

No files matched your search

+5
View File
@@ -1,5 +1,10 @@
# Changelog
## [0.2.7] - 2026-10-27
- On the desktop, Play starts right away with mouse steering; the keyboard always works, and Pause still switches to the direction pad.
- wurm.waozi.xyz opens faster with a much lighter loading picture.
## [0.2.6] - 2026-10-27
- Glowing portals arrive from level 61: first on a few boards, then more often, with two pairs late in the mountains. Steer into one ring to come out of its partner, keeping your direction. Each ring stands in open ground, so you can always go around it.
+7
View File
@@ -59,6 +59,13 @@ Load :: () {
bytes: [2]u8
count := ReadRecord("controls.dat", bytes[:])
if count == 1 && bytes[0] <= 1 { mode = cast(s32)bytes[0] }
// A desktop always has a keyboard, and a mouse drag steers like a swipe,
// so it starts with swipe steering instead of asking. Phones, browsers
// and hosted copies still ask.
#if #defined(ANDROID_BUILD) || #defined(PLATFORM_WEB) || #defined(WURM_PORTABLE) {
} else {
if mode < 0 { mode = 0 }
}
}
Chosen :: () -> bool { Load(); return mode >= 0 }
Pad :: () -> bool { Load(); return mode == 1 }
+2 -2
View File
@@ -9,12 +9,12 @@
<link rel="canonical" href="https://wurm.waozi.xyz/">
<meta property="og:title" content="Apfelwurm — 200 levels, one little worm">
<meta property="og:description" content="Meadow, woodland, lake and mountains. A little orange worm. A long apple adventure. Play free online.">
<meta property="og:image" content="https://wurm.waozi.xyz/assets/art/title.png">
<meta property="og:image" content="https://wurm.waozi.xyz/social.jpg">
<meta property="og:url" content="https://wurm.waozi.xyz/">
<style>
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;background:#202b26;color:#e0e7d9;font:16px system-ui,sans-serif;overscroll-behavior:none}
body{overflow:hidden}#canvas-frame{position:fixed;inset:0}canvas{display:block;width:100%;height:100%;touch-action:none;outline:none}
#loading{position:absolute;inset:0;display:grid;place-content:center;gap:16px;text-align:center;background:linear-gradient(#303c33e8,#202b26e8),url('assets/art/title.png') center/cover;font-size:18px}#loading strong{font-size:32px}#loading[hidden]{display:none}
#loading{position:absolute;inset:0;display:grid;place-content:center;gap:16px;text-align:center;background:linear-gradient(#303c33e8,#202b26e8),url('loading.webp') center/cover;font-size:18px}#loading strong{font-size:32px}#loading[hidden]{display:none}
</style>
</head>
<body>
+3 -5
View File
@@ -107,12 +107,10 @@ def main():
assert ((title_pixels.max(axis=2) > 40).mean()) > 0.95, "title artwork is missing or black"
# Launch from build/, as the actual desktop launcher does, then use
# the single Play button. Q from a paused level returns to the title.
# A desktop has a keyboard, so Play starts swipe steering without
# asking, straight into level 1: no controls, stage or level menu.
pointer(480, 530)
time.sleep(0.15)
capture("controls-choice")
pointer(340, 428)
assert (level_directory / "controls.dat").read_bytes() == bytes([0]), "swipe choice was not persisted"
# The choice goes straight into level 1: no stage or level menu.
assert not (level_directory / "controls.dat").exists(), "the desktop asked for controls"
time.sleep(0.2)
key("space")
time.sleep(0.15)
+1 -1
View File
@@ -25,7 +25,7 @@ main :: () -> s32 {
unused File.CreateDirectory("build/progress-test-data")
unused File.RemoveFile("build/progress-test-data/controls.dat")
Clear()
Expect(!Controls.Chosen(), "first play asks for controls")
Expect(Controls.Chosen() && !Controls.Pad(), "a desktop starts with swipe steering without asking")
Expect(Controls.SetPad(true) && Controls.Pad(), "choose direction pad")
Controls.mode = -2
Expect(Controls.Chosen() && Controls.Pad(), "pad survives restart")
+6
View File
@@ -76,6 +76,12 @@ def main():
for source in (ROOT / 'src/web').iterdir():
if source.is_file():
shutil.copy2(source, OUT / source.name)
# The page shows the title art while the game loads and in link previews.
# Small copies keep that first paint fast; the game keeps the original.
from PIL import Image
title = Image.open(ROOT / 'assets/art/title.png').convert('RGB')
title.resize((1280, 853), Image.Resampling.LANCZOS).save(OUT / 'loading.webp', 'WEBP', quality=86, method=6)
title.resize((1200, 800), Image.Resampling.LANCZOS).save(OUT / 'social.jpg', 'JPEG', quality=88, optimize=True, progressive=True)
version = json.loads((ROOT / 'version.json').read_text())['version']
revision = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=ROOT, text=True).strip()
(OUT / 'version.json').write_text(json.dumps({'version': version, 'revision': revision,
+2 -2
View File
@@ -1,4 +1,4 @@
{
"version": "0.2.6",
"version_code": 16
"version": "0.2.7",
"version_code": 17
}