Sunday, October 9, 2016

War and Peace

I'm going to start this post off with an anecdote from World War 2.  Pacific theater (1942), the Imperial Japanese Navy is planning an invasion of the American held Isle of Midway.  In order to test the feasibility of their plan, Imperial Navy high command arranges a war game aboard the battleship Yamato.  Senior officers take their respective roles, while a junior officer assumes control over the opposition (in this case, the United States Navy).  Early on in the simulation, American aircraft carriers launch a surprise attack from the north-east resulting in the sinking of three of the four Japanese fleet carriers committed to the operation.  A referee overrules the result claiming that such an attack would be impossible because the Americans could not have know Japanese intentions so early in the battle.

The feeling among the naval staff at the time was that the simulation had failed to capture the reality of the situation.  In actuality it was spot-on.  During the real Battle of Midway, American aircraft carriers were able to launch a surprise attack from the north-east thanks to a partial decryption of Japanese naval codebooks.  Three Japanese carriers were knocked out of action in rapid succession from initial airstrikes with the fourth and final fleet carrier falling victim to the same fate due to a follow-up dive bomber attack soon after.

This war story doesn't have anything to do with video games directly, but there is a new game out on Steam called Children of a Dead Earth that is tangentially related.  If you're not familiar CoaDE claims to be an accurate simulation of what warfare in space would be like.  I've seen a fair amount of criticism directed at this game because of its design goal and central premise.  While we could argue over the theoreticals, I don't see why a simulation using proven mathematical formulas and basic applied physics would be any less accurate at depicting warfare than pushing counters around a map and rolling some six-sided dice.

Now, I should stress that my knowledge of computer programming is pretty limited.  I've only ever coded in Basic, Fortran, and a bit of Turbo Pascal.  Having confessed my relative ignorance though I'm going out on a flimsy limb to say a lot of people who claim to know how to code really don't.  A few months ago, while watching a twitch stream of Kerbal Space Program, one viewer asked about the ETA for the next update.  The streamer's response was to say the bug fixing process would take a long time because (according to him) correcting one issue in programming creates many more.  My response is simply this, only if you are doing it wrong.  Even though I'm a total armature I know enough to understand the importance of structured programming.  It can be tedious and at times and feel like a creativity restraint, but when the time comes to squash bugs the entire process is much quicker and easier.  More than once, I've seen KSP development blogs that go on about some nasty bug that was difficult to track down and isolate.  The layman's term for the cause of these kinds of problems is Spaghetti Code.  I'm pretty confident in saying that KSP has a bad case of it.  A lot of different programmers have worked on this game at different times, some of which were more skilled than others, and while steps have been taken to clean up "legacy code" (basically an eloquent way of saying "poorly planned mess"), I think the best course of action would be to simply start over from scratch.

Doing so would allow Squad, or whoever the developers are now (it seems like most of the original team has jumped ship), a chance to address long standing issues with the game - floating point precision errors, the lack of N-body physics models, and most of all the dreaded Kraken.  A number of improvements that are impossible in the current Unity engine could also be implemented.  The Kerbin system could be fleshed out and expanded.  Internals for parts and astronomical bodies would be great to see.  I'd love it if the damage modeling system allowed deformation (a.k.a. soft body physics) as well.  If you look at how long each update is taking, despite the relatively limited scope of new features) it's clear that there needs to be a sequel, one that incorporates everything learned from the original in addition to a number of excellent ideas from the mod community.  Instead of early access, it would be nice if this hypothetical successor came out the door as a fully fledged campaign (complete with a proper beginning, middle and conclusion) in addition to the sandbox mode we all know and love.  After all, if we can have a well made space war game why can't we have a nice new peaceful space exploration game too?

No comments:

Post a Comment