Sunday, January 17, 2010

Maze Wars SVG version 1.0b3 Released

Maze Wars SVG, version 1.0b3, has been released. This version began as a minor revision to eliminate an asymmetry between the rules applied to the bots and to the human players. Specifically, for lack of a check to prevent it, bots were able to move and turn at the same time, which human players could not do. Making the bots separate their move and turn operations seemed like it would be a simple change. Instead, it turned out to be a little snowball that started rolling downhill, getting bigger and bigger, until it wiped-out an entire alpine village.

The essence of the problem was that the bots had to go from simply moving directly to the next location they chose in their traversal of the maze, to deciding on the location to which they wanted to move, determining whether they would have to turn to face in a new direction in order to move to that location, turning (if necessary), then moving to the desired location. So, they went from having to decide merely what they would do next, to having to plan up to two steps in advance (or more steps, if they decided they needed to shoot at someone at any time during that process). That one-to-many change forced a complete rewrite of the bots.

Other changes were also made, like a general clean-up of the game engine, and some of those changes introduced interesting bugs that in some cases took a long time to notice, or to fix, or both. But now it's done. The code's cleaner, the bots play fair, and, basically, you won't notice much difference.

Version 1.0b3 Change History

  • The bots have been completely rewritten, and are now bound by exactly the same limits on motion (and everything else) as the human players.
  • The bots traverse the maze a little more efficiently than before, because they don't waste time traversing dead-end corridors. Instead, they just look down such corridors, shoot at anyone they see there, and move on.
  • A general-purpose bot engine has been created that, hopefully, will make it easy to implement bots employing new strategies in the future.
  • Various minor syntax errors in the Javascript (unterminated statements) have been corrected. The bugs had no operational impact.
  • A workaround for the Firefox bug that prevented each player from having a unique iris color has been implemented (and the bug has been reported to the Firefox developers).
  • Lots of redundant synchronization has been eliminated from the code.
  • Logging levels for many logging statements have been adjusted downward, because the information they provide has declined in importance.
  • Added to the game engine periodic checks for some bugs that were a problem during the development of version 1.0b3 (and just might have been present in earlier betas); those bugs have been corrected, but these checks will ensure that they aren't re-introduced in the future.
  • The order in which the final scores are displayed has been changed. Now, when players' scores (kills) are the same, those who died the least will be ranked above those who died more often. (Previously the relative order of players with the same score was undefined.)
  • Altered the SVG in "client.svg" such that the player marker arrow in the maze map swells to a slightly larger size. (Of course, this only applies to browsers that support SVG animation, which currently only seem to be the WebKit-based browsers, at least in this case.)
  • The "bullet list" is now cleared when a game ends, which should eliminate any possibility of additional points being earned in the moments immediately after a game ends, due to bullets already in-flight striking other players.
  • Players are not placed in the maze until they have actually entered the game; previously they were placed in the maze as soon as they registered their name.
  • Minor improvements have been made to the communications between clients and the server.
  • Various improvements and optimizations have been made to the server.
  • Bullet hit testing is now handled in a manner such that, if a player is struck by bullets from multiple players at the same time, all of those players receive a point.
  • The game engine's code has been cleaned-up and made more object-oriented.


  1. Alison in Indiana6:43 PM CST

    I know nothing about your Maze Wars and will never play such a game. But I was delighted to read that there is such a thing as a Firefox bug, since the afficianados of Firefox seem to think it is infallible and why am I still wasting my time with IE... (laziness).

  2. Yes, there is a Firefox infallibility dogma in certain parts of the computing community. It's *very* annoying. But, not I hasten to add, among Firefox's developers - the folks in the trenches always seem to be working hard on improving the product, and, with something as hideously complicated as a web browser, there are always bugs to be chased. That said, there is no worse browser that I know of than Microsoft's Internet Explorer. Microsoft ignored all web standards for the better part of a decade, then (finally!) came along with IE 8, which was a big improvement, but still leaves-out Word-Wide Web Consortium standards that were set 10 years ago, live Scalable Vector Graphics. Microsoft is finally heading in the right direction, but has little be proud, yet.