Xox Wars: WarKit as a Xox module Tuesday, 20 September 1993, Ernest N. Prabhakar The goal is to start an iterative path that will ultimately lead to the grand overall goal of providing a full-fledged kit for doing wargames, but in the meantime is fun and interesting enough to keep us motivated. Leveraging other people's work is a good way to do that, although ultimately I'm sure we'll want to create something "pure" from scratch. Having spent the last week looking at the Xox source code, I am confident that it is a useful platform for working out our goals. To recap, those are to write something that is: - quick to implement - fun to use - useful for exploring WarKit ideas (in that order). WHAT IS XOX? For those who may not know, "Xox" is a game engine supporting loadable bundles for various scenarios. It is written by Sam_Streeper@NeXT.com, of "BackSpace" fame, and indeed incorporates many of the same concepts. Sam is apparently on sabbatical, but Erik Kay is manning the "Xox" mail alias, and was kind enough to answer some of my questions about Xox. Xox is primarily oriented towards space-based games. Put another way, its movement is "velocity" based: each piece has a well-defined velocity, and a timed entry automatically moves each piece every tick of the clock. This is to contrast with "position-based" movement, where pieces move from point to point, largely ignoring inertia and acceleration. Xox comes bundled with both "Asteroids" and "SpaceWar" types games. That is, one ship vs. asteroids, and one ship vs. another ship. It is the latter scenario (SpaxeWar, its called) that I believe would be ideal for purposes. WHAT CAN WE DO WITH IT? As "Prime (sole?) Mover" I hereby declare our goals as: 1. Developing computer players for SpaxeWar-type games 2. Developing a Xox module to support such players 3. Extending Xox to support "strategic" multi-ship/multi-side as well as "tactical" players. Erik mentioned that with Sam gone, Xox is in maintenance mode. However, he would be happy to consider enhancements, although his main concern is probably backward compatibility. There are not that many non-Sam Xox modules out there, so even non-compatible extensions might be possible. The major limitation of Xox is that it is designed for a single-player, non-networked video game playing. Thus, it is not designed for: - networked, multi-player games - long-term, non-real time games both of which are key interests of the WarKit group! However, this is not to say such uses may not be possible. Only time will tell. My intent is to push the Xox paradigm as far as possible, then change course when we hit the proverbial brick wall. :-) WHAT IS THE PLAN? The first goal is to write a functional (if somewhat stupid) computer player for Spaxewar (which I'll probably rename XoxWar). The current user interface consist of detecting keyUp and keyDown events to rotate, accelerate, or fire the ship. The Ship class declares: - setThrusting:(BOOL)val time:(long)time; - setTurning:(ROTATION)dir down:(BOOL)keyDn time:(long)time; - fire; - setShields:(int)state; The simplest way to interface to Xox would be to create an object (Commander) that runs in a separate thread and is triggered by timed entries. It would send messages to Ship (either directly or by creating keyUp/Down events on the stack). In addition to sending the following actions, it would need to know the: - position - velocity - orientation of BOTH ships. (While the SpaxeWar module also allows for asteroids, a star w/gravity, and boundary conditions, I intend to ignore all of those for at least the near future). Once we get something usuuseableable, I would hope the WarKit group could bang on it to try different strategies of combatant. [Pick up Xox and xoxsrc if you have space on a NEXTSTEP machine nearby]. Then we would want to do something like: - allow human vs. computer or computer vs. computer - create computer players as loadable bundles - abstract strategies into categories or superclasses Once we understand the ship vs. ship command & control problem, I would like to try multi-ship combat (i.e., where one Commander has two ships). We can also increase the ability of ships to take progressive damage, etc. We could probably set it up to have loadable ships as well as commanders, if we defined appropriate protocols. I think there's even more exciting stuff we could do along these lines, but I hope that gives you the flavor for where we want to go. My main concern is whether anybody else in the group would find this interesting, at least to the extent of being willing to play the game, and perhaps create new Commanders and Ships. My main concern is just improving my skill base (and padding my resume :-), so I'm not too concerned about getting a quick payoff on proper "WarKit" type activities. However, it would be a lot more fun if other people thought it was useful.