Strat
Wars
Episode
0.VII
"The
Uh...Return...Uhmm Phantom... mmm 7... Huh ran out of movies"
"Space... It seems to go
on and on forever. But then you get to the end and a gorilla starts throwing
barrels at you."
-
Philip J. Fry
This is version 0.7 for Mac OS X and Windows. It has a lot of improvements over
v0.6. I've managed to fix a number
of bugs (including the bugs in the expansion module system) and I've added new
features, new weapons, new effects.
Plus I've improved performance. You are so lucky.
ŇBut what is it?Ó you askÉ
Well, you probably should be more careful and stop
downloading things when you don't know what they are or what they do. But since you seem friendly I'll
explain. Strat Wars is an OpenGL
screensaver that lets you watch a bunch of star fighters duke it out. After about 4 minutes (or the scene has
gotten quiet for too long), the scene resets. While it has shown no problems on
all the test machines and all known bugs have been fixed, I can't guarantee
your results, which brings me to the obligatory disclaimer:
DISCLAIMER!!!!
This program has no warrantee or guarantee of any
kind, in part or in whole. Do not
use this program on any computer that has mission critical functions or
data. This program may cause
defects or damage including but not limited to data corruption, computer
hardware damage, or an explosion bigger then a million suns that will
incinerate the Earth and annihilate all life everywhere, leaving a massive
black hole that will rip through space time and destroy the entire universe and
all parallel dimensions. This
probably won't happenÉbut it might.
Don't say I didn't warn you.
Actually the program has been very well behaved for
me, and has caused no problems on any of the machines I've tested it on, but I
probably didn't test it on your computer (especially if you tend to lock your
door).
HOW TO INSTALL
STRAT WARS
For Macintosh: Place everything (the StratWars.saver file and the StratWars
Ships folder) in the Home/Library/Screen Savers directory.
For Windows: Place everything (the StratWars.svr
file and the StratWars Ships folder) in the C:/Windows directory. Or put it
where ever you like, then right click on the StratWars.svr icon and select
'Install'.
For both versions, to use additional scenarios,
place the 'StratWars Ships' folder in the same folder as the StratWars
screensaver
FEATURES
Really
Really big objects
Hmmnn, I tried to come up with a technical term for
this...but I didnŐt. The objects
in a scenario can range from one meter to several kilometers long. Not only
that, but the ships will behave (roughly) appropriately; small ships can skim
across the surface of large ships - ships up to 6 kilometers long (in one
particularly cool test).
AI
Although it is far from mimicking the best pilots
that ever took off, there is AI controlling each ship. The AI has a few basic modes. The first
is Forming. If the ship's attitude is timid, it will tend to try to find a
friendly ship and fly in formation with it. The second is Attacking. If a ship is aggressive, it will
try to find an enemy ship and attack it. If the attack takes too long, the ship
may become bored and try to find a new target. If a ship can't find a target either to attack or to form up
with, it will randomly fly around looking for one. If it can't find a target after looking for a while (usually
around 20 seconds), it will return to its starting place and patrol. The AI is also responsible for avoiding
collisions.
The mood of a ship is determined by a number of factors,
including the number of friendly ships that it has seen destroyed, the number
of enemy ships it has seen destroyed, and if the shipŐs current target was
destroyed. The AI will also try to
avoid collisions, but it's not great at this task. The degree to which it even tries is determined by how
aggressive it is feeling. The more
aggressive a ship is, the less concerned with collisions it is.
The AI also controls the tracking of the turrets.
Each ship can have any number of turrets, and each turret can track a different
target.
Expansion
Modules
Scenarios and ship files (.scn and .shp files
respectively) can be loaded. This
allows you to add exciting new situations. Want to see a fleet attack a space station? or a starship fighting a giant fish? Then you want to start playing with scenarios. Each individual object corresponds to a
ship(.shp) file, and the orientation and initial situation is defined in the
scenario(.scn) file.
Both files must be stored in the StratWarsShips
folder, which must be in the same folder as the StratWars screen saver
itself. If a file can't load, then
an error is reported, and the default scenario is loaded. On the Mac version errors are reported
to the Console application, which is located in the Applications/Utilities
folder. On the Windows version,
errors are reported in the StratWarsErrors.txt file created in the StratWars
Ships folder, if it exists.
Currently, the expansion files are stored in plain text format, and can
be opened and edited with any standard text editor (though I recommend one that
has syntax colouring). Or you can
use the StratWars Ship Editor and the StratWars Scenario Editor applications.
The files are commented to allow people other than
myself to make new scenarios and ships.
The Y.shp file included with this package, for example, was made using
nothing but a text editor (and a ruler, a piece of graph paper, and a
calculator). However, this is not
the preferred way of editing or creating StratWars files. If you have any questions on how to
make files, contact me. The only
thing I ask is that if you do make a file, you either send me a copy or a
download link.
Camera
Views
There is basic multi-monitor support for the OS X
version. Each additional monitor
shows a different view of the action.
You can disable the rendering on other then the primary display. The camera has five modes which are
determined by the computer.
BigPicture mode: the
camera is looking at the scene and panning around.
Chase Plane mode: the
camera is following a specific ship as if it were on the nose of a chase plane.
Cockpit Mode: the
camera is in the cockpit of a specific ship.
FlyBy Mode: the camera is fixed in space watching
thing fly at, across, or away from it.
Fixed Follow Mode: the
camera remains at a fixed distance and position relative to a specific
ship. This means that one ship is
held in the center of the screen as it flies around. This can make that ship look a bit like it's just twisting
in space, but trust me, it is still moving.
AVAILABILITY
This program is available for Mac OS X and for
Windows. OpenGL is required, so no
Direct3D. I maintain an equal
opportunity policy, so the two versions are feature identical except for the
integrated frame counter which is a Windows only feature, and the multiple
monitor support which is Mac only.
If you got a .zip file you have the Windows
version; if it's a .dmg, .gz, .sit, or .hqx then it's for Mac.
Currently there is no Mac OS Classic version (for OS 9 and earlier) because
there is no native screensaver format for that OS. And it's so very old.
Both the Windows and the OS X versions can be
downloaded directly from my website at:
http://www.execulink.com/~salmonzerbinis/StratsWares/StratWars/StratWars.html
Contact
If you like my work, have a complaint, or just want
to chat, email me.
My
email address: stratwars@gmail.com
Shareware
And speaking of giving me money, this program is
shareware. That means that, if after 30 days you are still using StratWars, you
should send me $5. However, I am
using the honour system to enforce this.
There is no time limit on the software, and it is not feature
limited. But what if you use it
without paying me? Then you will
make a programmer (me) very very sad.
I may also use my mind control satellites to make you hum the theme song
to Enterprise over and over again. That's right, I personally own mind control
satellites, and the best use for them I can come up with is collecting my
shareware fees.
Basically
you should associate paying the shareware fees with delicious candy, while you
should associate not paying the shareware fee with sharp splinters in your
socks.
If you want to help me make a new and better version,
send in your shareware fee. You can do this over the Internet, or the old
fashioned coins-taped-inside-an-envelope-in-the-mail way. If you would like to
pay money to the cause using your credit card or a cheque, go to
www.paypal.com. To access my account, just give them the email address above
and follow the instructions.
SYSTEM REQUIREMENTS
OpenGL and a computer running Mac OS X or Windows
98, ME, 2K, or XP. A
3D-accelerated video card, a Radeon or a GeForce or better. I've run it reasonably (if with reduced
settings) on machines with Rage128Pro and VooDoo3 video cards.
On the Mac, this version has been tested on OS X 10.2,
10.3, up to 10.3.4. Any G4 should
run Strat Wars fine, but there's not much Altivec in it yet, so any high speed
G3 should run it well (basically I enabled the Altivec flag in the compiler,
but have made no Altivec-specific changes to my code yet). For non-Altivec code, a G3 and a G4
should be very close in performance to each other. I even used to run it on an old Pismo PowerBook; the Pismo
runs it quite well for its clock speed.
I've been told it runs rather impressively on a G5.
On the Windows platform, any Athlon, Duron, or
Pentium 3 or above rated at 600MHz or faster should have no problems. I'm less sure of the bottom end, since
the lowest performance Windows machine I've tested on is a Duron 700. On the Duron, I was able to keep an
average frame rate of 30 with about a hundred ships (default scenario). On the
Dual 3.4GHz P4 at work it runs quite nicely.
For both platforms a 3D card is really essential.
This code for this version is a lot more optimized
than the previous version. That said, it should run well (possibly with fewer
ships) on any machine that was legitimately called new since 01 Jan 2000 and has a 3D card.
Naturally to get full effect you want a fast processor and stupidly powerful
video card.
CONTROLS
The
controls are divided into 6 tabs.
General
tab
This
tab has three controls:
1.
Number of
ships
The
number of ships slider lets you set the number of ships in a scene.
2.
Rate of camera
change
This
slider sets how often the camera changes modes.
3.
Scenario
This
drop down list lets you select which scenario to run. As well as be able to select from the available
scenarios (those in the StratWarsShips folder), you have two options: Default, which will run the default
scenario (which will also run if there is a problem loading a scenario); and
Random, which will cause a random scenario to load every time the screen saver
is run.
Graphics
tab
Start
with random view
Selecting
this option will cause the scenario to begin with a random camera mode. If it is not selected, the screen saver
will always start off in Big Picture camera mode.
Use
dynamic starfield
Selecting
this option will use a dynamically generated starfield. This starfield will be
different every time. Otherwise
the original static starfield will be used. Enabling this option will run faster on some video cards.
Use
only primary display (Mac
only)
Selecting
this option will cause the screen saver to only render on the primary display
if the computer has multiple monitors.
Otherwise each monitor will display a different view of the scenario as
the screen saver runs.
Smooth
textures
Selecting
this option will improve the appearance of the objects. Enabling this option can also
reduce the frame rate.
Smooth
shading
Selecting
this option will improve the appearance of the lighting and shading of
objects. Enabling this option can
reduce frame rates.
Polygon
only shading
Selecting
this option enables a lighting and shading system that is slightly less complex
than Smooth shading. Enabling this option can reduce frame rates to a greater
degree than enabling Smooth shading.
Letter
Box mode
Selecting
this option renders the scene in the 16x9 ratio, the same screen aspect ratio
that the original Star Wars was shot in. This wide screen format has black bars
across the top and bottom. The
default mode is full screen. Enabling Letter Box mode improves frame rates.
Enable
laser splash effect
Selecting
this option enables an impact effect whenever a shot hits an object. Enabling this option can reduce frame
rates.
Enable
particle effects
Selecting
this option enables particle debris and fire effects for damaged ships. Enabling this option can reduce frame
rates.
More
particles
Selecting
this option increases the number of particles used in the damage effects. Enabling this option can reduce frame
rates.
Depth
smoothing
Selecting
this option renders objects with more realistic lighting as the move into the
distance. Enabling this option can reduce frame rates.
Enable
frame rate counter (Windows only)
Selecting
this option displays a live frame rate counter on the screen.
Render
quality
There
are three options for this control: Best offers the best rendering settings;
Normal is nearly the same quality as Best, but Normal will provide better
results on some video cards including older nVidia cards; Low enables reduced
rendering settings. Selecting Low
will allow higher frame rates on some older video cards, but will noticeably
reduce image quality.
Camera
tab
The
controls on this tab govern how the cameras operate.
There
is one check box for each camera mode; enabling each one allows the camera to
use that mode. If you check every box, then each mode will be available for
use.
Automatically
cycle cameras
Selecting
this control allows the camera to change modes at a rate governed by the Rate
of camera change control in the general tab. If this control is not enabled then the camera will only
change modes when the object it is currently focused on is destroyed, or
otherwise taken out of the scenario.
Display
tab
This
tab contains controls that affect the display.
Screen
resolution
This
drop down list lets you select the screen resolution that the screen saver runs
at. This control is not functional in the current version.
Brightness
This
slider lets you set the overall brightness of the scene. The darker the scene
is overall, the greater the difference between the light sides of objects and
the shaded sides.
Frame
limiter (Experimental, you probably shouldn't mess with this one much)
This
slider lets you set the maximum frame rate that the screen saver will run
at. Since the idea of a screen
saver is that you'll probably have your computer doing other things, the
default setting is 31 (or 33 something like that) to allow for smooth animation
with out taking too much CPU time.
The higher the frame rate cutoff the more CPU time the screen saver will
take. It should be noted that this
control is still experimental, and I got distracted by other things before I
could test to make sure every thing worked correctly at arbitrary frame rates.
( I think the explosions might not work right at very high frame rates.)
Depth
cutoff
This
slider lets you control the maximum distance from the camera that things will
be drawn. The setting of this control can reduce or increase frame rate on some
video cards.
Controls
tab
This
tab lets you set control keys that you can use while the screen saver is
running. These control settings are case sensitive.
Next
camera focus/mode
Pressing
this key will immediately pick a new camera mode or focus, even if the
Automatically cycle cameras control is disabled.
Start/stop
automatic camera cycling
Pressing
this key will temporarily toggle automatic camera cycling. The Automatic camera
cycling setting that the user selected will be unchanged, so the next time the
screen saver is run, the setting in the control tab will determine whether
automatic camera cycling is enabled or disabled.
Pause
Pressing
this key will pause or restart the action.
About
tab
This
tab contains information about the screen saver.
KNOWN
ISSUES
Performance and rendering quality is terrible on
slow video hardware (i.e. Cyperblade, or RAGE Pro/M1). Not only is the frame rate on
these systems bad, but there are lots of rendering artifacts. These machines and most
"software" OpenGL renderers are below minimum requirements to run
this program.
On slower Windows machines, or if you are running
with too many ships for the hardware, it may take a few seconds for the screen
saver to recognize mouse movements or keystrokes. This is due to how Windows handles passing messages to the
screen saver and how I had to manage the timing. I have put in a load limiting system so that the screen
saver should remain responsive, but depending on how overloaded the system is,
it may take a few seconds to adjust.
NEW IN VERSION 0.7
Improved the visuals, added atmospheric effects and
improved lighting. Added limited physics, and drifting objects (read: asteroid
fields and space stations). Improved the AI system. The AI can handle flying around vast objects. The ships can hunt enemies, follow
friends, and avoid collisions. AI
now shoots better. Turrets track
targets independently. Improved
weapons system, added torpedoes and two kinds of beam weapons. Fixed bugs in and generally improved
the file system. Improved scenario
management. E-mail me if you have
any questions about making or using scenarios, or check the web site. Right now the damage model is like a
limited shield around a ship, so
hitting the engines doesn't slow down a ship. With the new damage model, a laserŐs power dissipates as it
flies. I made some improvements to
the new proximity filter system. I
also wrote a completely new collision detection system that is also
significantly faster, and provides some neat voxilization (for future uses). I
added a damage 'fire' effect. As
well, I managed to improve overall performance significantly and to fix a lot
of bugs.
FEATURE TO-DO LIST
There are a lot of things I want to add, and not
all of these will make it into the next version. There's actually a lot more than what's here... I have very
high standards and a lot of other ideas.
Graphics:
-Better ship models:
higher polygon counts, sub articulation (i.e. turrets that move).
AI:
-improve it. I have a
lot of ideas here. I want to add some adaptability and a learning algorithm.
-Adaptive control (this
will probably be split into a few versions). Here the AI tries to act like a
pilot, not a fish or a locust.
Basically I wrote some neural network code that I wanted to put into the
control system of my undergraduate thesis project, but I ran out of time before
I could. So I have this code, and
have been itching to do something with it. This would be really cool to have, since it could allow for
variation in pilot profile, as well as training and "missions".
Physics:
-Improve the physics
code. I've written a bunch of much
better and more accurate code, but I haven't had time to fully test it or
integrate it into the code base. Full angular modeling probably never will,
unless I can really optimize the code.
-Damage modeling. Hit a
wing, knock off a wing. That sort
of thing. It shouldn't actually cost much to do. So that's actually two
things: Mesh deformation, and
systems damage tracking.
System:
-Optimize optimize
optimize. This version is
significantly better then previous versions, which has allowed me to put more
stuff in. But I can do better.
Miscellaneous:
-I have a few new
surprises up my sleeve. I have
some other ideas that I'm going to keep under wraps for now (mostly because I'm
not sure I can pull them off).
VERSION HISTORY
Version 0.7 (Current) : Fixed a lot of
bugs. Improved AI. Improved file loader. Improved overall performance. Added damage trail effect. Fixed some visual bugs. Improved collision avoidance. Improved
visuals. Improved proximity filter
system. Rewrote collision
detection system. Improved
perception for ships. Added ability to perceive vast size differences properly.
Improved lighting. Added limited physics, and drifting objects. Improved
weapons effects. Improved prefs panel.
Version 0.6 : Fixed a few small bugs. Added AI.
Rewrote file loader.
Improved overall performance.
Added laser splash effect.
Fixed some visual bugs.
Added collision avoidance.
Added basic damage model.
Rewrote proximity filter system.
Added perception for ships (this is the basis for the AI and the
collision avoidance systems).
Version 0.5.5 : Fixed a number of small
bugs. Improved stability. Minor graphics quality improvements,
particularly with explosions. I
now model dissipation for lasers
in flight. Basic multi-monitor
support for Mac OS X added. Slight
optimizations to the texture handling.
Version 0.5: Improved models. Increased performance,
reduced CPU usage. Improved
starfield quality. General
improvement to visuals. Rewrote
weapons, ship handling, and ship control systems. Added scenario system.
Generally cleaned up the code.
Reduced file size.
Version 0.4: Added prefs panel, improved
models (yes, they used to be worse), and managed to reduce performance. Due to
timing issues in the movement code, I had to prematurely move to real time
synching. It was synching per
frame before, and this simplified lots of stuff, since all I had to worry about
was keeping the frame rate roughly steady. This change has also messed up lots
of stuff. My CPU usage has gotten
significantly worse. It's still
far from the slowest screen saver I've seen, but I really intend to speed it up
when I get a chance. Currently the Mac version also uses the real time synching
code, just because I like to keep version consistency, and because this is the
'proper' way to do things. But it
is a pity, since I have a Mac version on my HD that looks identical to this
one, but uses about a third of the CPU time of this one (if not less).
Version 0.3: Added collision detection.
Added a few camera modes.
Version 0.2: Fixed spatial orientation
issues. Made first build of Windows version.
Version 0.1: Basic OpenGL stuff: I drew a
model then moved it a bit.
Version 0.0: The idea crossed my mind.
That's that. Enjoy!
--- Strati D. Zerbinis