ftp.nice.ch/pub/next/games/action/xox/XoxWars94.NI.bs.tar.gz#/pack/XoxWars.bproj

Actor.h
[View Actor.h] 
ActorMgr.h
[View ActorMgr.h] 
BackView.h
[View BackView.h] 
Bullet.h
[View Bullet.h] 
CacheManager.h
[View CacheManager.h] 
Commander.h
[View Commander.h] 
Commander.m
[View Commander.m] 
CrazyMander.h
[View CrazyMander.h] 
CrazyMander.m
[View CrazyMander.m] 
DisplayManager.h
[View DisplayManager.h] 
English.lproj/
 
Explosion.h
[View Explosion.h] 
GOLetter.h
[View GOLetter.h] 
KeyTimer.h
[View KeyTimer.h] 
Makefile
 
Makefile.dependencies
 
Makefile.postamble
 
Makefile.preamble
 
PB.project
 
README.XoxWars.rtf
[View README.XoxWars.rtf] 
README.rtf
[View README.rtf] 
Scenario.h
[View Scenario.h] 
Ship.h
[View Ship.h] 
SoundMgr.h
[View SoundMgr.h] 
SpaceGen.h
[View SpaceGen.h] 
Thinker.h
[View Thinker.h] 
TrackMander.h
[View TrackMander.h] 
TrackMander.m
[View TrackMander.m] 
Tracker.h
[View Tracker.h] 
Tracker.m
[View Tracker.m] 
XWBullet.h
[View XWBullet.h] 
XWBullet.m
[View XWBullet.m] 
XWMeteor.h
[View XWMeteor.h] 
XWMeteor.m
[View XWMeteor.m] 
XWScoreView.h
[View XWScoreView.h] 
XWScoreView.m
[View XWScoreView.m] 
XWShip.h
[View XWShip.h] 
XWShip.m
[View XWShip.m] 
XWSpaceGen.h
[View XWSpaceGen.h] 
XWSpaceGen.m
[View XWSpaceGen.m] 
XWSun.h
[View XWSun.h] 
XWSun.m
[View XWSun.m] 
XoxList.m
[View XoxList.m] 
XoxWars.h
[View XoxWars.h] 
XoxWars.m
[View XoxWars.m] 
claw0.tiff
 
claw1.tiff
 
claw2.tiff
 
dart0.tiff
 
dart1.tiff
 
dart2.tiff
 
spbullet0.tiff
 
spbullet1.tiff
 
sun.tiff
 
swmeteor.tiff
 
sym/
 
xoxDefs.h
[View xoxDefs.h] 

README.XoxWars.rtf

This module has been shamelessly ripped off from Sam Streeper's SpaxeWar module.  Due to the brilliantly modular way he wrote it (and the power of NeXTSTEP!), it was easy for me to add computer players.   Otherwise, the game is the same.

The object of the game is to annihilate your opponent before he gets you.  In XoxWar (as oppposed to SpaxeWar), the opponent may be a computer instead of another human!  The popup lists select the type of computer player. 

"Commander" means no computer player - the human is in complete control.  
"CrazyMander" involves random movement
"TrackMander" attempts to match velocity then fire on you.

In addition, the difficulty switch controls how often the computer player can move, and hence how hard it is to fight him.  Other than that, the computer players are "fair" - they are not stronger or weaker than the human players.

You can set zero, one, or two computer players.  The human controls are always accepted, although they may be overriden by the computer.  You can of course choose to play either side:

The blue player's controls are:
z - rotate left
x - rotate right
(comma) - thrust
(period) - fire
(space) - shields

The red player's controls (on the keypad) are:
1 - rotate left
2 - rotate right
6 - thrust
9 - fire
(enter) - shields

README.rtf

XoxWars extends SpaxeWars in several key ways.  It maintains virtually all the old SpaxeWars code, except for eliding items like meteors that are not used.  All the names are changed from 'SWxxx' to 'XWxxx' to avoid collisions.

The modifications are entirely to the XoxWars.m method, except for some convenience methods for alliance information.  There are also several new classes:  Tracker and the Commander classes.

The scenario class XoxWars now has:
1.  A list of the computer player "classes", as well as a list of the commanders in play.
2.  A "oneStep" method, so Xox will periodically call it to move the computer players.
3.  Methods for initalizing and responding to the "player" PopUpLists.

The generic "Commander" class has the basic methods for being "oneStep"ed and owning a Ship, and being assigned "Targets", but no actual order-giving ability.  The idea was to make it general enough to allow one commander to move several ships against several targets.

CrazyMander simply implements a random choice of actions, between turning, thrusting, or firing.  These actions have the same affect as keystroke from a human player.

TrackMander makes use of the Tracker class to find information about the relative position and velocity of a Target.  It even attempts to compensate for the motion of the target.  Its strategy is to match velocity, then move in and fire.  The Tracker class can order the owning ship to 'track' the Target in various ways.

If one implemented playerClasses as a class which could search for bundles, instead of just filling it in XoxWars, it could easily dynamically load new players.

Feel free to use and mangle this source code to do new and interesting things, even as I did to SpaxeWars.

-- Ernie Prabhakar
December 15th, 1994

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.