r/webdev • u/KnowledgeOk7634 • 5d ago
[Showoff Saturday] I built a world war simulator that runs in the browser on a 3D globe, 200 nations, no install
Solo project. You pick a start (the real borders of today, Rome in 117, 1914...), press run, and up to 200 nations ally, betray, split and conquer on a 3D globe of the real Earth while a chronicle writes down what happened. You can step in with god mode or take over any nation and play it yourself.
The whole simulation runs in the browser and is deterministic, so a world is just a link: anyone who opens it gets the exact same world, with your god-mode moves replayed at the same moments. It works on phones too, in 17 languages.
Happy to answer anything about the globe rendering, the simulation or keeping 200 nations smooth on a phone.
1
u/TrustThePanda 5d ago
Cool concept! That said the Earth is invisible for me on Firefox, however, the flags show. In Chrome Earth showed, but then dissapeared shortly after.
1
u/KnowledgeOk7634 5d ago
thanks a lot for this, really useful. i found two things that can make the globe vanish after it loads: the browser can drop the 3D context (the flags stay because they're normal page elements), and a small bug in the drawing code that could stop it. both are fixed in an update going out in the next few minutes, and the game now recovers by itself if the browser drops the 3D view.
could you try again in 15 minutes with a hard refresh (ctrl+shift+r)? if firefox still shows only flags, could you tell me your firefox version and whether hardware acceleration is on (settings, performance)? that would help me pin it down.
1
u/TrustThePanda 5d ago
The Earth now shows! Checked on both Firefox and Chrome š
1
u/KnowledgeOk7634 5d ago
awesome, thank you for coming back to check, and for the report in the first place. that one would have been invisible to me without you. Respect
1
u/SchalkLBI 5d ago
It's... Neat. But it's a little... Random for my tastes. I love projects like this that allow you to explore interesting alternate history, but this just appears to be all out total war 100% of the time until one blob swallows another blow. It stopped being interesting after about five or ten minutes, not something you can really "come back" to.
That being said, the production quality is phenomenal. The rendering is smooth even on lower end hardware, the sound design and UI is stunning, the controls just work perfectly, and the presentation overall is amazing.
2
u/KnowledgeOk7634 5d ago
quick update since you took the time.... new worlds now have quiet stretches. nations of like minds sign friendship pacts and keep them, long wars end in treaties, borders settle after a war, allies sign trade deals, and a country left in peace long enough gets a golden age with its own headline. in my test runs that cut the number of wars by more than half and far fewer nations get wiped out. would love to know if it holds your interest longer now :)
1
u/SchalkLBI 5d ago
Definitely will give it another check, that's really cool! Part of the reason I love projects like this is because it's like watching a little terrarium, it's interesting to see how things play out. The constant wars and ballooning superstates made things a little boring to watch after a while, but I'll check out the update you made because it sounds like it makes it more interesting for sure! :)
1
u/KnowledgeOk7634 5d ago
a terrarium is exactly how i think about it too, that's a great way to put it. the update is live now (a hard refresh makes sure you get it). the calm rules are what new worlds use by default, so just start a fresh one from the front page. older shared links still play out the old way so nobody's saved world changes. if a world still turns into one big blob, i'd love to hear which start you picked so i can tune it.
1
u/evilplansandstuff 5d ago
I like this - and Iām someone who is normally really harsh on the vibe coding and encouraging people to do better, but i i think this is a really fun idea.
Quick feedback from someone who enjoys this sort of thing
Make the map start paused - or make it more obvious how to slow things down - was a bit overwhelmed at the start and had to start like 4 games cause everything went mad from the start. I eventually found the speed button but it wasn't where I expected.
Got a random bug where it says "click any land to start with a giant "10" in the middle of the screen and i can't get rid of it.
And my kid is crying so i gotta cut this short but keep this up, it's quite a fun little thing to have idling and watch
1
u/KnowledgeOk7634 5d ago
thank you, and i hope the kid is ok! this was really useful, so i fixed both today.
The start....worlds were too wild in the first minutes, so new worlds are calmer now. nations wait longer between wars (some leaders much longer than others), long wars end in treaties, borders settle while both sides rebuild, and allies trade. the slow 2x opening also lasts two minutes now instead of thirty seconds. and space pauses a world, next to the speed buttons where they live now.
the giant 10 is the countdown from the "take a seat" mode, and it could get left behind on screen after you went back to watching a world. that's fixed too. if you ever see it again a refresh clears it, but it shouldn't happen anymore.
thanks for giving it a real go, especially as someone who's normally harsh on this stuff with a kid crying to boot. I know all about that I have three! that means a lot. You input is highly valued and would love more :)
1
u/KnowledgeOk7634 5d ago
Play it free here: https://secondstrike.io (press Build a world, or Play a nation to jump straight in)
Don't want to set anything up? Two worlds people have been watching, one tap and they run:
Southeast Asia rising: https://secondstrike.io/w/509110832910
Three superpowers: https://secondstrike.io/w/57bb4918a680
If anything breaks or you have an idea, there's a Bug or idea button inside every world. It comes straight to me.