Starship Soccer
Version 0.94a - 29 December 1999
Copyright 1997-1999 Simon P. Bullen - simonbullen@yahoo.com
http://www.oocities.org/simonbullen
Contents
-
Copyright
-
Credits
-
Contacting the Author
-
Introduction
-
System Requirements
-
Porting
-
To Do
-
Revision History
-
Internet Resources
-
The Rules of Starship Soccer
-
Team Development
-
The Physics of Starship
Soccer
-
User Team C++ Reference
-
Universal constant reference
-
Rating System
-
Command Line Parameters
-
Screen Saver configuration
-
Keyboard controls
-
Troubleshooting
Copyright
Starship Soccer is Copyright ©1997-1999 Simon P. Bullen.
It may be freely distributed, with the condition that no more than
a nominal fee is charged for media.
Everything in this distribution must be kept together, in original,
unmodified form.
The material is provided "as is" without warranty of any kind.
This software may not be used for the construction, development, production,
testing, or use of weapon systems of any kind.
Credits
Starship Soccer was designed, programmed and documented by Simon P. Bullen.
Vector fonts designed by Nick King.
Additional Win32 programming by Ben Michell and Jason Williams.
Noise3 and turbulence functions by Ken Perlin. Thanks Ken!
Catering provided by Greasy Joe's, St Kilda.
Testing and design feedback: Ben Michell, Jason Williams, Rob Welsh
Contacting the Author
web: http://www.oocities.org/simonbullen
e-mail: simonbullen@yahoo.com
Snail:
Simon P. Bullen
PO BOX 12138 A'Beckett St
Melbourne 3000
Australia
Introduction
In the tradition of "Planetary Pool", Starship Soccer is a game of spacecraft
and geometry.
In the tradition of C-robots and Core Wars, Starship Soccer provides
an environment in which algorithms can compete directly against each other
for the amusement of humans.
Opposing teams of 2 dimensional starships thrust around a zero gravity,
low friction arena attempting to score goals in a fast paced, dynamic and
explosive sport from the future.
Starship Soccer is intended as a programmer's game. It makes a good
spectator sport, and you can even play manually -- but the real challenge
of Starship Soccer is to write your own team, then watch it compete against
teams written by others.
The level of programming required is minimal -- Starship Soccer takes
care of running the game world. The user teams only need to control the
ships.
Documented source code to a sample team has been provided to help get
you started.
System Requirements
-
Intel/Win32 - Windows NT 4 / Windows95 / Windows98 / Linux (running WINE)
-
C++ compiler required to develop your own teams.
-
A Pentium processor.
Porting
The game engine has been written in portable C++.
It will run on other platforms given an appropriate display driver
implementation.
Teams can be directly compiled into the engine as an alternative to
a DLL.
The scripting language may change to Java at some point to allow platform
independent team implementations.
To Do
This is an alpha release!
Here's the list of things I haven't done yet.
Planned for Version 0.95a:
-
debug background should only be available to developers
-
Fix melts for non-standard arena sizes
-
Fix pre-game screen for non-standard arena sizes
-
Fix border size for non-standard arena sizes
-
Fix hard-wired ship size
-
installer should be capable of automatically uninstalling the previous
version
-
Real command line handling
-
Fix current directory issues
-
Configuration file
-
batch mode for registered users
-
add average team processor usage to the statistics
-
More statistics - per opponent / constant set
-
Test CygWin, and add documentation and links for it
-
Planned for Version 1.00:
-
Team bio screens
-
Custom ship designs
-
"cosmetic lines"
-
better mouse controls (drag and drop! J )
-
Configurable screen-saver
-
installer should offer to set screen-saver
-
multi-threading protection in team DLL skeleton
-
fix weird bugs: left graph disappears sometimes at the end of a match.
top edge changes scale slightly if redcaps are playing
-
DirectX support for registered users
-
better timing under GDI - multimedia timers, or busy-wait for '95
-
prettier documentation
-
Merge screen-saver and interactive executables into a single exe to cut
down the distribution size
Somewhere in the distant future, maybe:
-
Game playback controls: Pause, slow-motion, fast-foward, replay, rewind,
etc.
-
network play
-
angular momentum (beams, etc)
-
more than 2 teams
-
more than 1 ball
-
multiple cameras - ie a map view, with n windows zooming on the action
-
sound
-
Direct3d/OpenGL support
Revision History
Version 0.94a - 29 December 1999
-
Installing to the root of a drive now works
-
Paths with slashes (/) now work
-
Extra long names are now scaled in all cases
-
normalizeRadians in utility.hpp now works
-
Screen-saver now supports -debug to turn on debug lines (exception handling
is still enabled)
-
Mirror matches are now disabled by default, and can be enabled with -allowMirrorMatch
-
Fixed Random number seeding bug
-
Random seed can now be specified on the command line with -seed value
-
Fixed a few instances of the engine using hard-wired values instead of
universal constants
-
Slow motion, pause and fast-foward support.
Version 0.93a - 22 October 1999
-
Universal constants can now be specified in a text file.
-
Objects now have configurable masses.
-
Exception handling can now be disabled to aid team developers' debugging.
-
Collisions are now elastic.
-
Documentation is more substantial.
-
A few corrections have been made to the DLL interface files.
-
Distribution is now a self extracting installer, instead of a ZIP file.
-
Bullets launched by the current manual ship now display yellow
-
Command line options: -fullscreen and -debug
-
Flatlines and total games played are now displayed on the pre-game screen.
-
Version number is now displayed in the initial copyright screen
-
New palette for debug lines
-
const fixes in userteam.hpp uTeam::debugLine()
-
A bug with collision detection when the frames weren't being drawn has
fixed
-
Debug lines are now discarded for frames that aren't being drawn
-
Teams are presented with updated sensor arrays for frames that aren't being
drawn :-)
-
Added support for Borland
-
Explosion physics are back.
-
Games where a team plays itself no longer update the statistics
-
Installer/uninstaller
-
Install directory can now cope with spaces
Version 0.92a - 23 September 1999
-
Lots of graphical improvements.
-
DLLs can now draw debug lines into the world.
Version 0.90a - 31 July 1999
-
Resurrected after sitting in a dusty corner of my hard drive for 18 months.
-
DLL based team support.
Internet Resources
Starship Soccer has an eGroup for the team writer community.
It is a space on the net where team developers can discuss tactics
and techniques, announce new teams and run competitions.
Updates to the Starship Soccer engine itself are also announced to
this list.
If you're looking for teams to download, or somewhere to upload --
come here.
The Rules of Starship Soccer
The classic Starship Soccer Arena is a rectangle, 280m by 200m.
It is walled by a reflective force field; objects that collide with
the field will bounce like a pool ball off a cushion.
The players are starships, with very simple controls: turn left, turn
right, thrust, and fire (yes, you can thrust while turning and firing).
Two teams of three starships compete to score goals in a 2 minute game.
The ball and goals are free moving objects that can be bounced and pushed.
Bounce the ball into the goal, or the goal into the ball, and your
team scores a point.
When the ball bounces off a wall it is displayed with a double hex.
If a goal is scored while the ball is a double hex, two points are
scored instead of one.
The double hex will remain active until the ball has collided with
another object.
Once a goal has been scored, the ball becomes "dead".
While dead, the ball will not score points if it collides with a goal.
To help the ball escape the vicinity of the goals before play resumes,
it shrinks to half its normal size and accelerates in the direction it
is already moving.
When the ball is far enough away from both goals, it will then return
to normal and play may continue.
This continues until the game time runs out.
If the two scores are even when the time runs out, then the game goes
into Extra-Time.
During Extra-Time, the explosions from bullets destroy starships. Note
that the launch time of the bullet is not relevant - bullets launched
before extra time are still deadly if they explode during Extra-Time.
Shooting a ship scores one point (to the dead ship's opposition). Bouncing
a bullet off a wall into a ship scores two points.
Goals can be scored in the normal manner during Extra-Time.
Extra-Time continues until one team has been completely destroyed, or
the time limit runs out.
Thus it is still possible for a draw, but it should be rare.
Rating System
The teams in Starship Soccer are ranked by a self balancing rating system.
Each new team is given 100 points.
When a team plays it bets 5% of its current rating.
The winner of the match receives the bet made by the other team. If
there is a draw, each team gives their bet to the other team.
The higher the rating, the stronger the team. The stronger the team,
the bigger the reward for defeating it.
Starship Soccer displays the rating along with other statistics for
each team between games.
The goal rate is "the number of goals scored for each goal scored
against you".
Command Line Parameters
Specifying Team DLLs
Starship Soccer accepts 1 or 2 wild card patterns for team DLLs to load.
If one pattern is provided, the teams found will play on the left and the
right sides of the screen. If two patterns are provided, the DLLs that
match the first pattern will play on the left; the DLLs that match the
second will play on the right. You may specify the same DLLs in each pattern.
For example:
StarshipSoccer teams\s*.dll
teams\*.dll - DLLs that start with s will play on the left. All
DLLs will play on the right.
Configurable Constants
Specifying -constant filename on the command line will cause Starship Soccer
to use the universal constant from the named files, instead of the built-in
default (Classic). Wildcard patterns can also be used.
For example:
StarshipSoccer -constant
constants\*.ssc
Debug Mode
Normally if a team crashes, Starship Soccer will flat-line it. If you are
trying to debug a crashing team, you may need to specify "-debug" on the
Starship Soccer command line to disable its exception handling. This should
allow the debugger to trap the crash in your DLL.
This mode also turns on debug lines for both teams.
Fullscreen Mode
F12 and 2 both toggle the fullscreen mode. By default the program starts
in a maximized window.
Specify -fullscreen on the command line to start in fullscreen mode.
Mirror Matches
A game where a team plays against itself is called a "Mirror Match". (e.g.
Sample vs Sample)
You can learn a lot about a team by watching how it plays against itself,
but this type of match does not affect the ratings system.
They are disabled by default, and can be enabled with "-allowMirrorMatch".
Note: Mirror matches can still happen if there is only one team loaded
on a side (and that team is also loaded on the other side).
Random Seed
The seed used to initialize the random number generator is normally the
system clock.
You can specify a value on the command line if you wish to be able
to play "the same game" over and over again.
This can be useful for debugging and tweaking your team.
Note that the seed does not effect the team selection process -- only
the inital locations of the objects.
Example Usage:
StarshipSoccer -seed 47
Batch mode
Specifying -batch on the command line causes Starship Soccer to run in
"fast-foward" mode. This mode can be toggled by pressing '5' in the non-screen
saver version.
Screen Saver configuration
The screen-saver is installed into your Windows directory so that Control
Panel can find it.
It currently reads its command line from the registry, and will write
its default setting there if none is found.
The registry value supports the same command line format as the interactive
StarshipSoccer.exe.
Debug mode does not disable exception handling in the Screen-saver,
but it does turn on the debug lines for both teams.
For example:
[HKEY_CURRENT_USER\Software\Continental
Laboratories\Starship Soccer\ScreenSaver]
"CommandLine"="Teams\\*.DLL
-constant constants\deathmatch.ssc"
Keyboard controls
Category |
Action |
Keys |
Manual
Ship
Controls |
Manual On. |
Home |
Manual Off. |
End |
Next ship. |
Page Down, or X |
Previous ship. |
Page Up, or Z |
Fire. |
Control, or Cursor-Up |
Thrust. |
Cursor Down |
Left. |
Cursor-Left |
Right. |
Cursor-Right |
Team
Debugging
Controls |
Toggle left team debug lines. |
Insert |
Toggle right team debug line. |
Delete |
Toggle left team AI. |
Not yet available. |
Toggle right team AI. |
Not yet available. |
Game
Management
Controls |
Exit program. |
Esc |
Extend current screen. |
Hold Shift |
Skip current screen. |
Space |
Quit current screen. Same as
Skip except it also works for
the game and Extra-Time. |
Q |
Toggle fullscreen display |
F12 or 2 |
Features
in
Development |
Toggle mouse-ball mode |
3 |
Toggle debug background |
4 |
Toggle super-fast-forward |
5 |
Toggle slow-motion |
6 |
Toggle pause |
Pause |
Troubleshooting
Problem: Game appears jerky
Solution: Reduce the size of the Starship Soccer window, the
resolution of your screen, and switch to a 16-bit display mode.