Dec 222017
Add 'wormholes' to VGA Planets 3.1. You can also make blackholes, one-way wormholes, moving wormholes, and wormholes that make ships blow-up.
File WORM031.ZIP from The Programmer’s Corner in
Category Games and Entertainment
Add ‘wormholes’ to VGA Planets 3.1. You can also make blackholes, one-way wormholes, moving wormholes, and wormholes that make ships blow-up.
File Name File Size Zip Size Zip Type
WORM.DOC 15661 5756 deflated
WORM.EXE 54352 29844 deflated
WORMHOLE.TXT 164 110 deflated

Download File WORM031.ZIP Here

Contents of the WORM.DOC file

Erlangen, Jan 23th 1994

**** WORM.EXE ****

Version 0.31beta

A small "add-on" tool for Tim Wisseman's game "VGA-Planets".

This is the first "wide-beta" release of the wormhole utility. I was
pretty busy the last few months, so I dropped the project for a while.
But since there still are no wormholes for the game, I picked it up
again. This was due to *your* response, asking me for the next version.

* read the following *
* paragraph *

Disclaimer (thats what it's called?)

This program is a quick and dirty hack. IF YOU USE IT, YOU USE IT AT YOUR
OWN RISK. I will not be held responsible for any consequences that may
be caused by the use of this program. Should you loose data or should even
worse problems be caused by this program you will be entirely on your own.
Don't blame me for using this program. You have been warned. If you don't
like this, then don't use this program. If you use it, you agree to these

This is no more but an early betaversion but is very likely to remain
so forever.

** Contents

1. Introduction
2. What are these "wormholes"?
3. Scanning for wormholes.
4. Travelling through wormholes.
5. On the HOST side.
6. Generating WORMHOLE.HST
7. Rules and some mathematics.


1. ** Introducing WormHoles for VGA Planets

Some time ago I read about WormHoles in the USENET newsgroup I kind of liked the idea, so I decided to try
and implement wormholes.

2. **********************************
** What are these "wormholes" ? **

WormHoles are closely related to those famous black holes. In fact some
wormholes are just that: black holes. Matter is being sucked into them
and never comes out again.
Quite a few wormholes however are very useful things. Matter does come
out and reappears several hundred or maybe even thousand lightyears away
just one turn after entering the wormhole. Better still, quite often
the matter remains intact thus enabling spaceships to travel "through"
these wormholes. In traveling through wormholes, ships can cover very
long distances in just one turn.

A wormhole is defined by the following four components:
- two endings given in X/Y coordinates
What goes in one end will (usually) reappear at the other end.
Some wormholes however are one-way only.

- A size given in KT (mass)
While the relation to black holes makes it plausible to measure the
size in KT, the reason I choose this was another one. The size of
the wormhole also gives information on the size of ships, that can
travel through the hole savely.
Size also determines how easily a hole can be detected. Bigger holes
can be detected more easily and over greater distances than smaller

- A stability factor (in percent)
This factor is the base chance of a travel going wrong.

3. *****************************
** Scanning for wormholes. **

Since the Privateer raid on the Crystal high-tech science lab, wormhole
scanning equipment has become widely available. So today, every ship
is equipped with a Raghla-17 wormhole detector. This standard detector
will scan for wormholes and can detect one wormhole per turn if activated.

To activate the wormhole detector, set the friendly code of the ship
to 'WRS' (WoRmholeScan).

Scientists of the Solar Federation have developed an advanced version of
the Raghla-17 detector. All "Bohemian Class Survey" ships are equipped
with this improved wormhole scanning device. This device can detect
more than one wormhole per turn. Since this device is built into the
ship, it can be traded with other races.

4. ***********************************
** Travelling through wormholes. **

To travel through a wormhole, the ship sets an intercept course with the
wormhole. Once it reaches the "entry", it will be sucked into the hole.
Set the friendly code to 'WRT' (WoRmholeTravel) in order to override the
computer safety circuit that prevents the ship from being sucked into a
wormhole accidently (most of the time that is).
The ship will (or will not) reappear at the other end of the hole the
following turn.
Cloaking devices must be deactivated in order to travel through a wormhole.

The entry is a region in space where the ship gets sucked into the hole
without having any chance of escaping the pull. The entries size depends
on the size (mass) of the wormhole.

The order of events is:

Turn 1
Deactivate the cloaking device. This must be done one Turn before the
actual travel to and through the wormhole takes place. Keep in mind that
the wormhole might move.

Turn 2
Set the friendly code to 'WRT' and the waypoint to the wormhole you want
your the ship to enter. The ship will travel to the wormhole, enter it
and (sometimes ) reappear at the other end. Wormhole travel itself
does not take time at least when looking at it from the "outside". The
ship will reappear the very next moment. Inside the wormhole time is
running normally for the ship, so it does burn fuel.

Turn 3
Travel wherever you want and set whatever mission you like at the other
side of the wormhole.

Wormhole travel is dangerous. Instabilities in the space-time structure
can damage the ship sometimes destroying it entirely. Also the size
of a wormhole limits the mass that can travel savely through it. If
a mass greater than the size of the wormhole enters the hole, the hole
gets "stretched" and the probability of damage increases. It is possible
to use a 100KT hole with a 300KT ship but it is risky.

Also while travelling through a wormhole, the ship needs to manouver
constantly in order to stay on track. Therefore wormhole-travel burns
fuel, although up to 100 times less than the equivalent distance would
need. This manouvering has to be done at warp 9, better engines will
reduce the amount of fuel needed to cross a wormhole.

If a ship runs out of fuel while still in a hole, it will take massive
damage or will be destroyed entirely. If it survives the damage, the
ship will reappear at a random point in the universe with empty fuel

Since the length of a wormhole and thus the amount of fuel needed is
not known prior entering a wormhole for the first time, it is advisable
to enter it with full tanks.

5. **********************
** on the HOST side **

If you are hosting a game and want to allow wormholes, here is what you need
to do.

- copy WORM.EXE into the same directory as HOST.EXE
- generate a WORMHOLE.TXT data file and copy it into the directory that
holds the games data (.HST file). This is the directory you specify as
a parameter for HOST.EXE. The format of the WORMHOLE.TXT is described
- every turn start WORM.EXE right before starting HOST.EXE
since WORM.EXE modifies the TRN files, all TRN files of the participating
players need to have arrived in the games directory.
As a parameter for WORM.EXE specifiy the games directory just as you
do with HOST.EXE

thats it.


your HOST.EXE directory be \planets
your games directory be \planets\mygame

copy WORM.EXE to \planets.
generate WORMHOLE.TXT and copy it to \planets\mygame

;X1 Y1 X2 Y2 size stable dX1 dY1 dX2 dY2
2280 1558 2674 2480 -100 10
2670 2480 1180 2670 360 14
1185 2672 2280 1554 70 5
1560 2133 2045 1455 1000 27

write a batch-file: DOTURN.BAT and copy it to \planets

WORM mygame
HOST mygame

Now run DOTURN.BAT instead of HOST mygame. There you go: wormholes...

6. *****************************
** generating WORMHOLE.HST **

The WORMHOLE.TXT file is a textfile. You can create it with any editor
you like. The format is simple: six numbers seperated by spaces
x1 y1 x2 y2 size stability
You can add comments to the file. All lines up to the first number
beginning with ';' are treated as comments. Only the lines up to the
first number are saved back to the file, when WORM.EXE changes it.

The X/Y coordinates are given in the usual starchart coordinates. The
size is given in KT (see above). The stability is the base-chance of

If you specify a negative Size, the wormhole becomes one way only,
going from x1/y1 to x2/y2

2477 1200 1834 1338 400 10 a stable, medium size wormhole
1445 1923 2988 3067 -800 15 a mostly stable, large size wormhole
(leading to the outside of the galaxy)
1288 1399 1556 1717 10000 100 a very large black hole
(gravity pull is not _yet_ implemented,
but I am working on it)

*** moving wormholes **

Wormholes are not static phenomena. Their ends can "travel" through
the universe.

WORM.EXE will change your TXT file to allow moving wormholes. When the
data is written back, 4 more numbers appear in every line. These numbers
are the destination (waypoint) of the front and backend of that wormhole.
You can "reset" the destination by simply deleting the last 4 numbers
in a line.

If you don't want WORM.EXE to change the wormholes, simply set the
read only attribute for WORMHOLE.TXT or start WORM.EXE with the
"-s" static wormholes parameter.

7. **********************
** some mathematics **

************** Wormhole detection: ***********

is based on the size of the wormhole.
The maximum 100% detection distance is
maxDetect = 10 * pow (size, 1/3)
ten times the cube root of the size of the hole

up to this distance the wormhole will always be detected

beyond this distance the chance of detecting a wormhole is
chance = (100*maxDetect)/pow (size, 1/3) - 100

thus the maximum distance a wormhole has a chance of being detected
is 2 * maxDetect. Wormholes being further away will not be detected.

Examples: wormhole size | maxDetect | maxDistance
100KT 45LY | 90LY
900KT 98LY | 192LY

a 100KT size wormhole will always be detected if within 45LY distance.

A detection check is made for every wormhole in the universe. The ship
will report the nearest wormhole, for which the check is positive. That
way it may be possible that a wormhole of 500KT size will be reported
although a 80KT size wormhole is nearer to the ship.

************** Wormhole travel: ***********

Wormhole fall into six categories.

wormhole max base-chance
very stable 5%
stable 15%
mostly stable 30%
unstable 50%
very unstable 80%
completely unstable >80%

The base-chance gives the percentage of failure for a ship with the same
mass as the size of the wormhole.
A 250KT ship has a chance of up to 5% for failure when travelling through
a 250KT size "very stable" wormhole. The chance for failure for a 100KT
ship going through a 100KT "unstable" wormhole is up to 50%.

This base-chance is modified by the ships size in relation to the wormhole.

The relation (ships_mass/size-1)^2 is called the "stress-factor" s.
The actual percentage of travel going amiss is
s + base_chance + s*base_chance/10

The following table give some examples

ship-size > 1 2 3 4 5 in multiples of the hole-size
base_chance% |
0 | 0 1 4 9 16
1 | 1 2 5 10 18
5 | 5 6 11 18 29
10 |10 12 18 28 42
15 |15 17 25 37 55
20 |20 23 32 48 68
25 |25 28 39 56 81

A ship three times the mass of the wormholes size will have a 32% chance
of failing its travel through a 20% base_chance (mostly stable) hole.

A 800KT ship will fail its travel through a 160KT 5% hole (very stable)
with a probability of 29%.

Failure will cause damage or the loss of the ship. A random number between
0 and 99 is generated in order to determine the success/failure of the
wormhole travel. Should the number be less than the chance, the travel
fails and causes the square of the difference between that number and
the chance worth of damage.

Example: A ship travels through a wormhole with a chance of 18% for
failure. Actual random number was 13. The damage caused is (18-13)^2,
25 points of damage.

Obviously the worst case scenarion for a ship travelling with a 5%
failure is 25 points of damage.

*************** the wormhole entry ****

The entry of a wormhole is the region in space where the gravity pull is
strong enough to capture a ship that does not have its waypoint set to
a point beyond the entry. The effect is: you don't have to be in the exact
position as the hole. The entry is a cirular area around the hole. The
entries diameter is entry = pow (mass, 1/4)


The Author (me 🙂

I am a student at our university here. Computer Science.
This is my very first try in releasing a program via internet. In fact
this is my first try releasing a program to a widespread public. If
you find this little tool useful and feel you'd like to encourage me,
drop me a note. I've been thinking of writing some shareware programs but
have neither experience nor conception of how successful or how "tiresome"
this can be.
My question: "Is it worth it?"

How to contact me:

via Internet: [email protected]
CompuServe: 100024,712


** History **

first external release

- removed a floating point domain error when a ship scanning for
wormholes was right on top of one.
- removed an integer overflow causing "negative" damage on a ship,
if chance of success was 0%.

internal release only. Wormholes will travel and change in size
and stability. Wormholes will appear or vanish.

Wormholes will no longer change size/stability. They will travel
only. Also no new holes are being added. This has proved to be

- gravitronic accelerator ships were not handled correctly.
- You now can enter moving wormholes. They will stay in place
long enough for you to intercept them in the following turn.
- fuel consuption was calculated incorrectly. Warp 9 engines
would use an undefined amount of fuel.


 December 22, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>