JavaScript Cold War simulation
simonswain.com
simonswain.com
[1] (https://github.com/simonswain/deepspace) [2] (https://news.ycombinator.com/item?id=8837204)
(Amazing actors' performance included.)
https://www.youtube.com/results?search_query=sage+computer
This thing was off the hook...
(Edit: Similar just intention-wise, else much simpler, since just in ASCII, meant to be EBCDIC.)
BTW: "System Technology" (SDC, 1960) is also an impressive source in this context: https://www.youtube.com/watch?v=Yqu3YX2cLA8
I always used to think that Doctor Strangelove was a really funny movie, but after this, it was a lot less funny somehow (still a great movie, though).
But that doesn't make for a very interesting presentation, so it goes direct to Hot.
The bombers seem too effective in anti-fighter measures, and has been said, the sats are very effective at anti-ICBM, but seem invincible themselves?
Interesting how quickly the tide turns from stalemate to dominance once a few factories or bases fall. And also how long it takes to really finish the opponent off (probably my launch_max is too low).
Also interesting the 'fronts' or lines of bombers that form between oppositions. This happens in naval and ground battle, but I'd think a major air war, with high speed relative to density of fighters would avoid this?
Would be cool to involve some sort of strategic element? I'd hoped the fighters would protect the bombers more, but it seems they are more defensive?
Well done!
Each of the circle structures is a nation state.
It has a capital at the center (square, blinking). Defcon is the number in the capital.
Cities (circles) send people to work at factories.
Factories (triangles) make munitions and send them to bases
Bases (square) stockpile munitions (counts, clockwise from top right: icbms, abms (anti ballistic missiles), fighters and bombers.
Bombers are big and slow (triangles) that select a target (factory, base, city, capital in that order), fly to it and nuke it, reselecting a target if somebody else destroys it first.
As defence perimeters are penetrated, defcon gets more scary.
Fighters launch at Defcon 4 and attempt to destroy bombers.
At Defcon 3, Bases launch ICBMs a low probability amount of the time.
Satellites launch at Defcon 2, and can shoot ICBMs out of the sky, but have fire/recharge lasers.
When one of a nation's assets (factory, base, city) is nuked, they go to Defcon 1.
If your enemy goes to Defcon 1, so do you.
At Defcon 1, all ICBMs will fire.
When your capital is destroyed, it's Game Over.
The control panel lets you tweak the starting parameters. There are a lot more controls for all the actors (e.g, how close do bombers flock.) than are not exposed here.
- circle: city
- triangle: factory
- square: military base
- big plane: bomber
- little plane: fighter
- things with rocket trails: ICBMs
- floaty diamond things: satellites (which shoot down ICBMs)
The square in the middle of each team represents the current defcon. Assuming you start at defcon 5, when an enemy unit crosses the big blinking circle, drop to defcon 4. When a unit crosses the next blinking circle, drop to defcon 3. I haven't figured out yet how the escalation proceeds after that.The dust coming up out of the bases (and to a limited amount, the other assets) are ABMs, trying to take out incoming ICBMs.
Goes to Defcon 2 on enemy bombers reaching city limits (the radius Cities and Bases are at).
Fighters target bombers and fighters. Satellites target ICBMs. Bombers and ICBMs target factories, cities, bases, and defcon. Bombers target in that order; ICBMs seem to target randomly.
Game over when defcon is destroyed.
Launching an ICBM requires defcon <= 3. The choice to launch is a bit random at defcon 3 and 2 but they all launch at defcon = 1.
Defcon changes to 4, 3, 2, and 1 if a bombers crosses the circular boundaries (radar?) around the center. You can see this happen when the boundary flashes.
This makes fighter jets a critical buffer because the only way a defense can prevent mutually assured destruction is to prevent non-ICBM first strikes.
When one of a nation's assets (factory, base, city), they go to Defcon 1.
If your enemy goes to Defcon 1, so do you.
At Defcon 1, all ICBMs will fire.
Bases are limited to how many the can have in the air at a given time.
Not realistic really, but never let the truth get in the way of a good yarn...
It's fallen into abandonware hell, so you can't buy a copy at GOG or anything like that, but cough I'm sure you could find a copy if you looked on the right sites.
Eventually just one did, but then even the volleys get stomped by the satalites.
This game has been running for over 10 minutes at DEFCON 1 for me, the blueside managed to get the first city down but it's now a city each but yellow also lost 2 of their triangles (bases? factories?).
Not so fun to simulate mind you.
This leads to skirmishes between fighters and a few stray icbm's in the beginning, but once one hits the situation escalates extremely rapidly.
Just add ASAT. If they've got ICBM technology and especially if they've got ABMs, they can certainly knock a satellite out of orbit.
(I'm currently running a conventional war scenario -- bombers and fighters only - no icbms or sats).
The game always nearly ends with a couple of bombers sneaking past the bases at the front and taking out the factories and cities until the player runs out of resources.
1. What Javascript frameworks/libraries did you use (if any)? 2. Do the 2 sides always have to be symmetric?
It would be great if you could add some brief notes explaining what is going on (even if you just copy and paste some of the below).
https://simonswain.com/coldwar/assets/pub-script-14324351717...
How long did it take to write and debug?
Looking forward to v0.2!
Please force your customers to upgrade their browser. You'll do the better good for yourself, your customers, and mankind in general. :)
If side A has fighters on side B. A has a bomber just launched. B fighters just try to fly at the bomber, dieing to the B fighters.
Good ol' days.
By the time you narrow it down to the mere handful of epileptics that will have a seizure from one or two flashes (ever hear anyone complain of a single camera flash and epileptics?), you're in a very rare group. At which point, nothing is safe - I heard of one epileptic who had seizures due to orange circles. Other colour circles were fine, other orange shapes were fine, it was just orange circles (which mean no driving...). Another patient had seizures when ice touched their lips. They do exist, of course, but at that point you're optimising for an incredibly rare user. If you're going to optimise for that, there's plenty of usability optimisations that hit way more people that you should be doing first :)
Source: spent four years doing several EEGs on neuro patients per day, each of which had a 5-minute session with a strobe light at various frequencies. Most of those patients were there for epilepsy or suspicion of epilepsy, but not all, of course. Seeing a photosensitive response at 8Hz was uncommon, but not rare. Some people had some response to single flashes (well, 1Hz) but it never built up to a dangerous level - I never saw someone in danger of having a seizure from 1Hz flashes.
/rant (sorry, nothing personal, I just keep seeing this (largely) urban myth)
It is reinforced by those warnings in all games.