Back to News
Advertisement
pparzivalt 5 days ago 25 commentsRead Article on kampfinsel.com
I grew up in Germany in the early 2000s playing a browser game called Inselkampf. You built up an island, mined gold and stone, cut down trees for wood, raised armies, sent fleets across an ocean grid, joined alliances and got betrayed by them. Same genre as OGame or Travian. It shut down in 2014 and I never found anything that replaced that feeling of checking in before school to see if your fleet had arrived and your alliance was still alive.

I finally built the version I wanted to play. Kampfinsel is live at kampfinsel.com right now with real players on it. It's not a straight copy of the old game. I gave it its own world. No magic, no gunpowder – just ballistas, fire pots, and slow ships crossing huge distances. Three resources: gold, stone, wood. Travel between islands takes hours, not seconds. It's slow on purpose.

The whole thing runs on Cloudflare's edge. Workers for the game logic and API, D1 for the database, KV for sessions and caching, R2 for assets and Durable Objects for per-island state and the tick system (fleet arrivals, combat, resource generation). There's no origin server at all. Making a stateful multiplayer game work inside Workers' CPU limits and D1's consistency model meant some non-obvious choices: resources are calculated on-read from timestamps instead of being ticked into the database, fleet movements live in Durable Object alarms and combat writes are batched. This helped me a lot!

The look is intentionally rough and text-heavy (Hi HN!): server-rendered HTML, tables, a parchment color palette, Unicode icons, no frontend framework, no build step. The only JavaScript is for countdown timers and auto-refresh. I wanted it to feel the way I remember these games looking, not how they actually looked. Honestly, it looks a lot like HN itself - tables, monospace, no chrome. If you like how this site looks, you'll probably feel at home.

No signup wall, no premium currency, no pay-to-win. Feedback very welcome, especially from anyone who played this kind of game back in the day or has opinions on running stateful stuff on Workers + D1 + Durable Objects. I'll be around for the next few hours.

Advertisement

⚑ Community Insights

Discussion Sentiment

67% Positive

Analyzed from 746 words in the discussion.

Trending Topics

#alarm#fleet#game#fast#still#arrivals#thanks#per#didn#ogame

Discussion (25 Comments)Read Original on HackerNews

avdelazeriβ€’about 18 hours ago
OGame and Travian are two names that really take me back. Those and Tribal Wars, I played them a lot back when I was a teenager.
parzivaltβ€’about 17 hours ago
that matches what i'm seeing - people want both. fast feedback loops in the first hour and stuff that still pulls them back three weeks later. hardest part is making the slow stuff feel like it matters before they've invested the time. still figuring it out with a lot of nice feedback from the community.
hlng2002β€’about 14 hours ago
You mention resources calculated on-read and combat writes batched. When a fleet crosses from DO1 to DO2 and triggers combat, how are you handling that consistency boundary? Colocating everything into the target DO, or something else?

Also, actual alarm drift in prod with concurrent fleet arrivals? And client reconciliation when the countdown hits zero but the alarm hasn't fired?

Clean aesthetic.

parzivaltβ€’about 12 hours ago
durable objects: Most important is the Ocean logic for me. The source Island immedtiatley dispatches ships (fire and forget) and registers the fleet in the Ocean. When the alarm is triggered, the battle takes place within this single DO context: the defender's state is read and the results are written back. in parallel arrivals on the same island are serialized.

no cross DO transactions are happening. the problem won't be (yet) that fleet arrivals will be just miliseconds apart.

with alarm drifts: i havent observes that beahiuvor yet three is a drift check performed every 100 alarm cylces with self correction if necessary.

on the client sync part: countdown runs on the epoch by the server. hits zero, waits a sec for buffer, hard-reloads. if the alarm hasn't fired yet, next alarm cycle (shortly after) resolves it. safety net: any fleet 5+ minutes overdue gets cross-checked, with exponential backoff retry on failed return deliveries. no websocket push on this one as mentioned earlier.... the reload is the reconciliation.

thanks and hope you give it a try!

Edited for typos.

nickandbroβ€’about 18 hours ago
Very cool, though wouldn't using durable objects for a MMO type game become prohibitively expensive vs using websockets with a stateful server? I assume your game is not sending that many requests so its not too bad.
parzivaltβ€’about 17 hours ago
good question. it's not real-time - actions resolve over hours.... request rate per active player is single digits per minute, often zero. DO alarms handle the time-based stuff (fleet arrivals, combat resolution, resource ticks) so there's no persistent connection cost. so far costs have been negligible compared to running an always-on origin.

websockets + stateful server would be the right call for anything realtime. for tick-based strategy with hour-long timers, DOs feel like the cleanest fit - i get per-island isolation, alarms, and storage in one primitive without managing a connection pool.

sophaclesβ€’about 17 hours ago
Durable objects do websockets
parzivaltβ€’about 17 hours ago
yeah, for the game tick i went the other way though. alarms fire on schedule, resources calculated on-read from timestamps. a player can close the tab for 8 hours and the world still moves correctly when they come back, without holding any per-session state.
sophaclesβ€’about 17 hours ago
Fair enough, I didn't mean to criticize your work in any way, or even buy into a criticism of it. I was really just pointing out to GP that their "or" was actually an "and".
parzivaltβ€’5 days ago
Did anyone here actually played Inselkampf, OGame or Travian back then? If you have recommendation or the one and only feature you still remember.
sebastiansm7β€’about 18 hours ago
I played ogame, travian and a mexican pokemon rpg online
slaterβ€’about 18 hours ago
It keeps asking me to accept the privacy policy when registering, but there's no privacy policy checkbox...? Firefox, macOS
Rohansiβ€’about 18 hours ago
Got the same thing. If you switch to German the page is entirely different and has the missing checkbox.
parzivaltβ€’about 17 hours ago
fixed and deployed. missing translation key on the english locale was hiding the checkbox label. thanks both for narrowing it down so fast.
parzivaltβ€’about 18 hours ago
Oh well, that should not be the case! Thanks for highlighting that! On it to fix it.
cute_boiβ€’about 17 hours ago
Well, this is the major problem with vibe coded apps.
bakugoβ€’about 18 hours ago
Looks like OP forgot to remind Claude not to make any mistakes.
parzivaltβ€’about 17 hours ago
funny side note: this started as me nerding around with Cloudflare's stack on vacation, just seeing what was possible. been a 1.1.1.1 WARP fanboy from day one. didn't intend to ship a game. showed an early version to a few friends and they just... kept playing. didn't say much, just kept logging in. that's when it hit me that other people might want this too. so here we are. hope you like it.
fusspawn_β€’about 16 hours ago
Someone needs to bring back nukezone.nu
parzivaltβ€’about 16 hours ago
nukezone i don't know - what made it stick for you? another one for me was OPW (Operation Weltherrschaft).
stavrosβ€’about 18 hours ago
Oh no, I remember those browser games, I will stay well away from them because they're the kind of thing that I will play for a month straight otherwise.
parzivaltβ€’about 17 hours ago
go for it, give it a try! ;-).

it's designed for once-a-day check-ins though, not minute-by-minute refreshing. buildings are fast in the beginning and take real time later to upgrade. more like working in a garden than playing a game. easier to walk away from than you'd think.

stavrosβ€’about 17 hours ago
Hmm interesting, I'll give it a shot, thanks!
parzivaltβ€’about 17 hours ago
nice. honestly the test isn't the first session - it's the 5 minutes tomorrow morning when you check what happened overnight. that's where the genre lives. some alliances are already prepping excel templates and mapping the ocean grid systematically. didn't expect that this fast (or at all). :)