{"slug": "sloth-mode-a-game-you-win-by-moving-slowly", "title": "Sloth Mode: a game you win by moving slowly", "summary": "Developer Zarasyversen built Sloth Mode, an MIT-licensed browser game that uses MediaPipe Pose to track 33 body landmarks and judges movement speed in plain code, letting a sloth climb a vine only when the player moves slowly and smoothly. Gemma, run locally through Ollama, selects exercises from the player's described mood and writes a post-session reflection, while the judging logic stays deterministic so identical movements always score the same.", "body_md": "*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady](https://dev.to/challenges/hacktoberfest-week3-2026-10-19).*\n\nSloth Mode is a webcam game where a sloth climbs a vine only while you move slowly and smoothly. Rush, and the sloth holds on while the vine sways. Stop, and it falls asleep. Slow and steady gets you to the treetop.\n\nI built it for Week 3 of the DEV Hacktoberfest Open-Source AI Challenge, “Slow and Steady”. Everything runs on your own machine: an open-source pose model in the browser, and Gemma, an open-weight model, through Ollama.\n\nMy starting point was a simple idea: move with intention. I like exercising, and most training tells you to go faster, lift more, do one more rep. So I started reading about somatic exercises, where the point is the opposite: slow, controlled movement and paying attention to how it feels.\n\nI wanted to build something where you *have* to move slowly. Not a timer telling you to slow down, but something that only works when you do. The hard part is that slow movement can feel like nothing is happening, so I made it a game. You watch a sloth, the slowest climber there is, and it only climbs when you match its pace.\n\nThat fit the week’s theme almost too well. In Sloth Mode, laziness, or at least slowness, is how you win.\n\nOne session takes a few minutes:\n\n**Who gets to be lazier:** you. There’s no routine to plan, no reps to count and no clock to watch. You say how you feel, Gemma picks the movement and the pace, and the sloth keeps time for you: if it’s climbing, you’re doing it right.\n\nA slow-movement exercise app. Your webcam watches you do a slow somatic movement, and a sloth climbs a vine only while you move slowly and smoothly. If you rush, it holds on and the vine sways. If you stop, it naps. Slow and steady wins the race.\n\nBuilt for the DEV Hacktoberfest Open-Source AI Challenge, Week 3: “Slow and Steady”.\n\n**MediaPipe sees, my code judges, Gemma coaches.**\n\nThe code is MIT-licensed on GitHub: [zarasyversen/Sloth-Mode](https://github.com/zarasyversen/Sloth-Mode). You need Node 20 or newer and [Ollama](https://ollama.com):\n\n```\nollama pull gemma4:26b\nnpm start\n```\n\nThen open `http://localhost:8000`, tell the coach how you feel, and step back from the camera.\n\nThe one rule I set myself: the AI coaches, but it never judges your movement. Judging happens on every frame and has to be fast and fair, so it’s plain code.\n\n**MediaPipe sees.** [MediaPipe Pose](https://ai.google.dev/edge/mediapipe/solutions/vision/pose_landmarker) is open source and runs in the browser. On every video frame it returns the positions of 33 body landmarks, such as shoulders, elbows, hips and knees.\n\n**My code judges.** Each exercise is defined by one measurement: an angle between three landmarks (shoulder, elbow, wrist for an arm raise) or the tilt of the torso. The code smooths that angle, works out its speed over the last half second, and compares it with the target speed, which is the movement’s range divided by the seconds per lift. Too slow and the sloth naps, too fast and it clings on, in between and it climbs. Short delays stop the state from flickering: rushing has to last 250 ms and napping 1.2 seconds. No model is involved, so the same movement always gets the same result.\n\n**Gemma coaches.** Gemma runs in Ollama on your own computer and is used twice per session. Before it, Gemma turns how you feel into three exercise cards. After it, Gemma reads a summary like this one and writes a short reflection:\n\n```\n{\n  \"exercise_id\": \"arms_overhead\",\n  \"seconds_per_lift\": 10,\n  \"reps\": 5,\n  \"finished\": true,\n  \"climb_seconds\": 96,\n  \"total_seconds\": 131,\n  \"rush_count\": 4,\n  \"nap_count\": 2,\n  \"rush_zone\": \"the last third, near the full movement\"\n}\n```\n\nFor that summary, Gemma wrote: “You tended to move a little too quickly as your arms reached the top of the movement.” Both calls use Ollama’s structured output with a JSON schema, and the exercise `id` is an enum generated from the library, so Gemma can only pick movements the code knows how to measure.\n\n`id` in the JSON schema is an enum built from the library, and every answer is checked again in code. If an answer fails the checks, the app asks once more and then shows an error. That keeps Gemma safe, but also means it can’t suggest a movement I haven’t written measuring code for.\nPeople who tried it said there was too much happening at once: a stick figure, a pace meter, a range bar, the sloth and sound. So I cut it down. The stick figure now shows the pace once, before you start. The pace meter moved onto the camera view and got bigger. The range bar, the sound and the pace slider are gone. Now you only have to watch yourself and the sloth.\n\nNext, I want to add a smoothness score so that jerky movement counts as rushing too, and calm down the jitter on side-on movements like the squat.\n\nA camera pointed at your body in your living room is about as personal as data gets. Open models let me keep all of it on your machine.\n\n`coach.js`. Any Ollama model that supports structured output can take its place.\nWith a closed API, every plan and reflection would send how you feel and how your body moved to someone else’s server, cost money per call, and stop working when the network or the provider does. With Gemma in Ollama, the coach is a file on your own disk.\n\n**Best Use of Gemma.** Gemma 4 26B runs locally through Ollama and does all the coaching: it turns how you feel into three exercise cards with pace, reps and cues, and reflects on each session’s summary afterwards. Structured output with an enum of exercise ids keeps it to movements the code can measure.", "url": "https://wpnews.pro/news/sloth-mode-a-game-you-win-by-moving-slowly", "canonical_source": "https://dev.to/madebyzara/sloth-mode-a-game-you-win-by-moving-slowly-3717", "published_at": "2026-10-25 09:40:04+00:00", "updated_at": "2026-10-25 09:42:38.400137+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-tools", "computer-vision", "generative-ai", "ai-products"], "entities": ["Sloth Mode", "MediaPipe", "Gemma", "Ollama", "DEV Hacktoberfest", "Zarasyversen"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/sloth-mode-a-game-you-win-by-moving-slowly", "markdown": "https://wpnews.pro/news/sloth-mode-a-game-you-win-by-moving-slowly.md", "text": "https://wpnews.pro/news/sloth-mode-a-game-you-win-by-moving-slowly.txt", "jsonld": "https://wpnews.pro/news/sloth-mode-a-game-you-win-by-moving-slowly.jsonld"}}