home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware 1 2 the Maxx
/
sw_1.zip
/
sw_1
/
GAMES
/
LINEWARS.ZIP
/
LINETECH.DOC
< prev
next >
Wrap
Text File
|
1990-03-10
|
5KB
|
90 lines
L I N E W A R S Version 1.5x
Made in Finland by Patrick Aalto
Technical Information
LineWars is compiled with Turbo Pascal 5.0 (currently 1600 lines)
and Microsoft Macro Assembler 4.0 (very many lines). The source
code takes about 500KB of disk storage. LineWars is constructed as
a Pascal main program having various Assembler units to call. The
whole graphical game is one unit.
Initial Procedures
When LineWars is started, it first checks that you have enough
free memory to run it. Then it checks the type and speed of the
machine. After that, LineWars checks the currently active display
adapter. Currently supported adapters are: CGA, EGA, EGA with only
64K RAM, Monochrome-EGA, Monochrome-VGA, MCGA, and VGA.
After that check LineWars reads in the settings-file. It first
checks the command line parameters and reads the file mentioned, if
it exists. If not, default settings are used. If no command line
parameters are given, LineWars tries to read a file LINEWARS.SET.
If it cannot be found, again default settings are used.
When settings are read in, LineWars checks wether DESQview (tm)
or some other multitasking program is active. If it is, then music
can not be played. Then it checks for the presence of a mouse driver,
if it should use mouse.
After that the current screen contents are saved and Main menu is
shown. If Connect Mode is 'BBS-"door"', LineWars sends it's logo to
communications line. Cursor is also made hidden now.
While in Main Menu, the line is constantly monitored to check if
we received an order to play ('ε' = ascii 238) or to start terminal
('∞' = ascii 236) or, if 'BBS-"door", a request to quit (ctrl-X).
If none of these is received, LineWars checks if the user requested
an action. If so, that action is taken. If the action was Terminal,
an ascii 236 is sent to line, and if the action was 'quit', ctrl-X
is sent, unless in BBS-"door" mode, when ascii 236 is sent to make
the other side start terminal mode and receive 'LineWars quitting'-
texts. If mode is 'Single', nothing is actually sent or received.
If Play is selected, then appropriate graphics mode is selected
and the Cobra IV cockpit drawn on the screen. If War Mode is Duel,
LineWars shows a 'wait for connection'-message and begins to wait
for incoming 'ε'. If one is not received within about half a second,
'ε' is sent to line. This repeats until 'ε' is received or the user
presses ESC. After a succesfull connection, LineWars sends to line
your codename plus information whether your Key Damp is on or off.
It then tries to receive that information. When this is done, the
game starts.
When in game, first the keyboard interrupt is changed to make a
distinction between control- and letter keys. Then all meters are
drawn, the MainViewer opened and the line begins to transfer info
about which keys the user presses.
After your shield energy is totally exhausted, your computer will
display a large 'GAMEOVER' - text, and your opponent will see your
ship explode.
Line Protocol
When in actual battle, LineWars sends and receives three bytes per
every new frame. That means the line must be able to transfer 60
characters per second if the Framerate is 20Hz. This is because the
game needs to be synchronized between two machines running possibly
at different speeds. If you press a letter-key (or <┘ or BACKSPACE)
it will be sent between these synchronizing bytes so that the line
should actually be able to transfer about 80 bytes/sec. at maximum.
The transferred bytes are coded as follows:
7 6 5 4 3 2 1 0 = bit position
┌─┬─┬─┬─┬───┬───┐
1.│1│E│A│M│crc│seq│ = Enemy died/Asteroid died/Missile fired.
├─┼─┼─┴─┴───┴───┤ crc = Checksum, seq = Send Sequence Number.
2.│L│H│ Roll │ = Laser fired, miss/Laser fired, hit.
├─┼─┼───────────┤ Roll = roll position + 30
3.│D│I│ Dive │ = Decrease speed/Increase speed.
└─┴─┴───────────┘ Dive = dive position + 30
As you can see, only the most important information is passed.
This may result into very different environments at different ends
of the line, but usually one battle does not last long enough for
this to be notable.