Captain Pork's World of Violence
Version 1.0
A game by Captain Pork (Copyright 2003 Captain Pork)
Produced using the DJGPP compiler and the RHIDE interface. Graphics 
made with the GIMP and displayed with the Allegro game programming 
library by Shawn Hargreaves et al, which also does sound and various 
other things. Networking through Libnet by George Foot et al.

Thanks to:
Jek for playtesting and various suggestions
The Prof for putting up with my devotion to my art
The various people who responded to my Libnet question in 
comp.os.msdos.djgpp
Anyone who's ever contributed to any of the software used in the 
production of this game.

Captain Pork's World of Violence is distributed under the terms of the 
General Public Licence (GPL) - see the file LICENCE.TXT. It comes with 
no warranty, express or implied, and no liability is accepted for any 
harm it may do to you or your computer. In the unlikely event that it 
injures you somehow, contact your MP or other local representative. 
Read the licence for more information.

The source code should be available from users.olis.net.au/~zel/
If it's not there, try contacting captainpork@fastmail.fm to find out 
where it's gone.

Contents -

1. Introduction
2. Getting Started
3. Configuring Keys
4. Player Configuration
5. Options
6. Challenge Mode
7. * What the game is actually about *
8. The Setup Game menu
9. Weapons & Equipment
10. Networked Games
11. Modifying the game


**************************
1. Introduction
**************************

Captain Pork's World of Violence is a side-view platform game in the 
style of Molez and Liero. It can be played against computer opponents, 
against another human using a split screen, against other humans on 
other computers connected to yours via a null-modem cable (or possibly 
over an IPX network, but this is experimental), or any combination of 
the above.

System requirements:

 - Minimum
P150 
32MB RAM

That's the tested minimum, although it will probably work on a less 
powerful computer - I just haven't had the chance to test it on eg a 
computer with 16MB RAM. You'll probably want something better, though, 
so that you can run in 640x480 mode with a decent framerate.

- Recommended
P233 or better
32MB RAM
Some kind of sound card that Allegro can autodetect (probably most of 
them)

If the game refuses to load or just crashes, try changing your video 
mode (320x200 should work on most monitors). If that doesn't fix the 
problem, edit the proj.cfg file and change 
Sound=1 
to 
Sound=0 
It may be that the sound autodetection is causing problems.


**************************
2. Getting Started
**************************

After loading the program you'll be asked which screen resolution you 
want. 640x480 looks much nicer, but if you have a slower computer 
(say, a Pentium 200 or less) you may want to choose 320x200.

The next thing you'll need to do is set up your controls under the 
'Define Keys' menu (see 'Defining Keys' below). Once you've done this, 
go to the 'Configure Players' menu to name yourself and choose a 
colour and team. The 'Options' menu allows you to set a few interface 
options. If you want to leave a menu, press escape to back out. 

You can now set up a game through the 'Setup Game' menu, which allows 
you to set things like the type of game you want to play (kill 
everything, capture the flag etc), the number of players present and 
the number of AI opponents (bots), or you can take on the 'Challenge' 
mode which presents you with seven increasingly difficult levels to 
defeat.


**************************
3. Configuring Keys
**************************

You can configure your controls in the menu accessible from the main 
menu. The controls are as follows:

 Left & Right - Moves you to the left or to the right.

 Up & Down - Raises or lowers your firing angle.

 Shoot - Fires the current weapon.

 Jump - If you're standing on a solid surface, you jump up in the air. 
Otherwise it activates your jetpack or rockets, if you have them.

 Change - Hold this key down and move left or right to change your 
current weapon.

 Grapple - Fires your grappling hook, if you have one.

 Score - Displays a list of players or teams with their current 
scores.

 Names - Toggles the display of player names on the screen.

There are also a few composite commands:

 Grapple - Hold the change key and press jump to activate the grapple 
(same as the grapple command above, but for people who are used to 
Liero).

 Pick up - By holding the change key and pressing fire, you pick up 
whatever you're standing on. You also use this to select your type 
when you enter the game or are respawned.

 Dig - While moving right, tap the left key to dig through dirt. The 
same goes for left/right.

You may notice that some combinations of keys don't like being pressed 
all at the same time, the exact combinations affected varying from 
computer to computer. This is a limitation inherent to your keyboard.


**************************
4. Player Configuration
**************************

Choose your colour by changing the proportions of red, green and blue. 
Enter your name (maximum 11 characters). Choose which team you belong 
to. And set your handicap - a handicap of less than 100 reduces the 
amount of health your player has proportionally (so a Heavy with a 
handicap of 50 has 75 hit points: 50% of 150). You can't set your 
handicap above 100.

You also choose which class of player you are. Currently there are 
two, Soldier and Cyborg. This affects what you look like in the game, 
and also whether you bleed or give out sparks when injured. It doesn't 
affect anything else. Your type (Light, J-Heavy etc) is something 
quite different (see 7 below).


**************************
5. Options
**************************

These options govern aspects of the interface.

- Screen Sync
If this option is on, the game waits for the end of your monitor's 
current vertical retrace before writing to the screen. This stops the 
screen flickering but is slow, so turn it off if you want a better 
framerate.

- Cloud Stipple
If you don't like the stippled cloud effect that I put so much thought 
and effort into, you can turn it off here and make all clouds opaque.

- FPS Counter
Displays the frames per second, ticks per second, inputs per second 
(should be same as ticks) and spare milliseconds per tick that the 
game is running at. Maximum FPS is 34.


**************************
6. Challenge Mode
**************************

Takes a single player through a series of increasingly difficult 
levels. Some are free-for-alls, where each player is trying to score 
by killing any of the others. In some you will find all of the other 
people are on one team against you. You must win each round in order 
to advance to the next. If you lose a round you have to start again. 
Level 1 is an easy match against Norbert, but the later levels are 
much harder and level 7 is very difficult.


**************************
7. How to play the Game
**************************

Here is a digression from my description of each of the game's menus 
to explain what the game is actually about.

Basically you're a person or robot walking or otherwise travelling 
around an enclosed arena full of dirt, rocks and useful objects. 
Unfortunately there are other people and robots in this arena - people 
and robots who don't like you. They may even try to kill you. You 
should kill them first, but they'll keep coming back until they run 
out of lives.

Before you are transported into the arena, though, you must choose 
what type of soldier or robot you want to be incarnated as. Depending 
on the game settings you will have some or all of the following 
options, which you select with the pickup command:

 - Light: a lightly armed and relatively fragile soldier. Lights have 
75 hit points and can carry only two weapons with two clips (one to 
use, one spare to reload with) each. They also tend to get thrown 
around a lot by impacts and the recoil from their own weapons. Lights 
are, however, much faster and more agile than the other types, and can 
sometimes fit through smaller spaces.

 - Medium: Better armed and more robust than the Light, but slower. 
Mediums have 100 hit points and carry three weapons with three clips 
each.

 - Heavy: Big and slow. 150 hit points, and four weapons with four 
clips each.

 - Grapple: The Light, Medium and Heavy types are each equipped with a 
grappling hook which is fired by whatever command you chose in the 
Define Keys menu. The grapple is probably the fastest way to travel 
around a level, but it's tricky to use. If you want the hook to reach 
a high ceiling, jump just before you fire it to give it some extra 
momentum.

 - Jet: The J-Light, J-Medium and J-Heavy types are equipped with a 
jetpack each (see the fins sticking out?). To activate it, just hold 
down the jump key. The jet takes a second or so to spin up to full 
power, and if you run it too long it will overheat and give reduced 
lift until it has a chance to cool down. The jetpack is easy to get 
the hang of, but the spin-up time can be fatal if you're trying to get 
out of trouble quickly.

 - Rocket: The R-Light, R-Medium and R-Heavy types have rockets. Press 
the jump key while you're in the air to activate them.


You might start out armed, but if you're not you can pick up the 
weapons scattered around the level (depending on the game settings). 
To do so, change weapons to the one you want to replace, or to an 
empty slot, and use the pickup command (change + fire) to pick up a 
box of weaponry. Equipment can be picked up in the same way, and it 
also takes up a weapon slot. Medical kits (the red and white things) 
which heal you can also be picked up, and don't take up any slots.

The green bar below the screen represents how healthy you are. Any 
injuries you take reduce it. The yellow bar indicates how much 
ammunition you have left, and the yellow boxes underneath that show 
how many reloads you have left for your current weapon.

That's about all there is to say here, really. The details, such as 
what weapons are available and how they work, are explained below. 


**************************
8. The Setup Game Menu
**************************

A collection of options and submenus which let you configure various 
aspects of the game.

The options are:
 - Players
How many players at the computer? (1 or 2)
 - Teams
If set to `On', each player belongs to the team they've selected in 
the player configuration menu. Teams share their score but not their 
lives. Some game types (eg Capture the Flag) force this setting On.

**********
8a. Level Menu
**********

Allows you to set the parameters for generating the arena. The 
following settings are available:

- Style
   - Classic - just rocks and dirt, in a tasteful colour scheme.
   - Anything - rocks, dirt and walls.
   - Platform - rocks, dirt and plenty of horizontal platforms.
- Colours
   - Classic - a nice set of browns and greys.
   - Earth - A range of earthy tones.
   - Crazy - usually ugly, always garish.
- Dirt
   - None - No dirt
   - Full - Level completely full of dirt
   - Tunnelled and Hollowed Out - some dirt
- Solid Density - how many solid (undiggable) objects are there on the 
level?
- Height and Width - how large the level is, in pixels.
- Level file - lets you open a bitmap image and load a level from it. 
The file
   must have a .bmp extension, which you leave off when entering it 
here, and should be in 
   the maps subdirectory.

Note: if Dirt is set to None, all dirt will be removed from any level 
file which is loaded in. This is a slow operation, though, so you 
might want to avoid it. 

**********
8b. AI Config
**********

This is the menu you use to set up the AI players (bots). You can 
choose their name (or leave blank and a random name will be chosen), 
their team, their level of skill and a couple of other things.

The AI in this game can be a challenging opponent, but it's not a 
supreme example of intelligent autonomous actor design. The bots are 
quite accurate with most weapons, but their pathfinding abilities are 
not spectactular and they only understand how to play the Kill 
Everything game mode (and, I suppose, Last One Standing, although they 
don't play very defensively). The skill level affects their accuracy 
and aggressiveness.

To help them out a little, you can set a few cheating options in this 
menu (at the bottom). You can protect them from any falling damage, 
give them unlimited ammunition, and give them access to all weapons 
available in the present game. They also prefer to play on wide levels 
rather than tall ones, and are easily confused by too many obstacles.

**********
8c. Custom Game Config
**********

You can change various game settings in the `Custom Game' menu. You 
also have several slots for saved game configurations. Whenever you 
select one of these, it replaces the current `custom game' settings 
with its own.

The settings are:

 - Name
The name of the current game slot.

  --- Rule Settings
 - Game Type
There are several types of game, from Kill Everything to Capture the 
Flag. These are listed in 8d.

 - Health
How robust the people in your game are. Robustness is further modified 
by the handicap of each individual player. Unlike handicaps, Health 
can be set to be above 100%.

 - Types
Which player types are available. Can be set to Medium, Grapple Only 
(only Light, Medium and Heavy) or All.

 - Score Limit
The game ends when someone reaches this score.

 - Lives
Each player has this many lives before they're eliminated. Can be set 
to be unlimited.

 - Number of Fruit
In a Hunt for Fruit game, this sets how many fruit can exist at once. 
It's meaningless in any other game type.

 - T&H Bases
In a game of Take and Hold, this sets how many bases are on the level.

 - Penalty
The number of seconds someone has to sit out for when killed. Useful 
in games like Capture the Flag where kills don't score.

 - Radar
Switches the radar window on and off.

  --- Physics Settings
 - Gravity
Affects the downwards acceleration caused by gravity. A setting of 30 
is about right for a normal game, and is the setting for which the 
jetpack and rockets were designed. Anything higher or lower may make 
these useless or overpowered.

 - Impact Damage
Affects the amount of damage you take from hitting a stationary object 
at speed. Can make the game much harder. AI players can be exempted 
from this in the AI config menu, as they don't understand physics very 
well.

 - Blast Bullets
If on, bullets, missiles and other projectiles are affected by the 
shock waves from explosions, and also by implosion fields. Not 
recommended for slower computers, and can lead to odd results in 
netgames.

 - Soft Dirt
Soft dirt is much easier to destroy with bullets and explosives.

  --- Weapon Settings
 - Starting Weapons
If None, players enter the game unarmed. If Limited, they get to 
choose one weapon each to enter the arena with. If Full, they get to 
choose four.

 - Reload Time
Shortens or lengthens the amount of time it takes to reload a weapon. 
10 is standard, but if you're playing with unlimited clips a higher 
value might be more appropriate.

 - Unlimited Clips
If on, you never run out of reloads.

 - Bullet Speed
Slow, Fast or Very Fast. Only affects those weapons which fire actual 
bullets (includes shotguns), as opposed to grenades or balls of plasma 
or whatever.

 - Exploding Bullets
Do bullets explode?

  --- Pickup Settings
 - Number of Pickups
The maximum number of pickups (boxes containing weapons, equipment or 
medicine) that can exist at once. Doesn't include fruit.

- Speed of Pickups
How long it takes for new pickups to arrive.

 - Health Pickups
 - Weapon Pickups
 - Equipment Pickups
How rare or common each type of pickup is, in relation to each of the 
other types.

**********
8d. Game Types
**********

The following games are available:

 - Kill Everything
You get a point for every kill, and lose a point if you kill yourself. 
Kill Everything can be played alone or in teams.

 - Last One Standing
The last one alive wins. Rankings are based on the order in which the 
players or teams are eliminated, with score (number of kills) being 
irrelevant.

 - Hunt for Fruit
An assortment of juicy and delicious fruit is scattered around the 
level. Pick up (with the pickup command) a berry or small fruit for 1 
point, a medium fruit for 3 or a large fruit for 5. The number of 
fruit present at any time is set in the game configuration menu.

 - Capture the Flag (must be played in teams)
Capture your opponent's flag by picking it up, and bring it back to 
your base when your own flag is there. If someone steals your flag, 
kill them and pick up your flag to return it to your base. The team 
scoring gets 2 points, the team whose flag was taken gets zero points 
and everyone else gets one point. Once you've scored five times, your 
base is moved around.
* Note: Capture the Flag is currently unavailable in netgames.

 - Porkball (must be played in teams)
Grab the porkball and shoot it into an opponent's base or deliver it 
personally to score. Scoring in Porkball works the same way as in 
Capture the Flag.
* Porkball is also unavailable in netgames.

 - Quest for the Holy Grail (must be played in teams)
The Grail lies somewhere on the level. Return it to your base to win 
favour in the eyes of the Lord, who will then test you by taking it 
away and leaving it somewhere else.

 - Take and Hold (must be etc...)
1-4 bases are placed in the level (choose how many in the game config 
menu). You claim a base for your team by moving onto it and starting 
it rotating. After about twenty-five seconds of rotating it gives you 
a point. Players from other teams can claim it from you by moving onto 
it when it's unguarded, resetting the countdown.


**************************
9. Weapons & Equipment
**************************

There are around 40 different weapons in the game. Most of them are 
more or less balanced (although you can change the balance with 
various of the game settings, like fast or exploding bullets), but 
there are some weak ones tucked away at the end for use if, for 
example, you want players to start out poorly armed. There are also a 
few super-weapons, like the nuclear missile and the rectifier.

You can set the availability of each of the weapons. They can be 
turned off, in which case they'll never appear, they can be made 
available for choosing at the start of each game, and they can be rare 
or common in boxes (common weapons appear around four times as often 
as rare ones).

Here's a list of the weapons, with a brief description of each:

Autocannon
Fires a series of heavy exploding shells.

Blunderbuss
A large, powerful shotgun. Fires a broad spray of pellets.

Bouncy bomb
Every time this annoying weapon bounces, it locks on to the nearest 
person and chases them. This may be you, so watch out.

C-Remote Rocket
A remote controlled missile with corrected avionics which make it slow 
but easy to use. Steer it with your left and right controls. Jump 
causes you to relinquish control (useful if you're under attack) and 
Fire makes it explode.

Clod of Dirt
Ever played Scorched Earth? This weapon explodes into a lump of dirt.

Dirt Bomb
Like the Clod, but takes a few seconds to explode into a larger lump 
of dirt.

Disrupter
A nasty sonic weapon. On impact it releases a shock wave which passes 
through walls for a short distance.

Firebomb
A vessel which shatters on impact to release a shower of sticky 
flames. Often best fired into a wall or ceiling.

Flakker
Fires a heavy shell which explodes in the air after a certain period 
of flight. Good for taking out hovering jetpackers.

Flamethrower
Very effective at close range.

Fragmentation Grenade
A long-fused grenade wrapped in segmented metal. Releases a lot of 
double-strength shrapnel (twice as harmful as the normal kind released 
by most other weapons).

Funky bomb
More Scorched Earth nostalgia. Multicoloured chemical warheads or 
something.

Gas Grenade
Releases a cloud of toxic, corrosive gas. Deadly in a confined space.

Grenade
A basic grenade. While producing fewer pieces of ultra-jagged shrapnel 
than the frag grenade, it has a more powerful blast.

Heavy Machine Gun
A basic high-calibre machine gun.

Hunter-Seeker
Shoots out a containment vessel which releases four deadly little 
drones to hunt down anything that moves. They occasionally look around 
to see who's closest, so keep well away once they get out. Very nasty.

Implosion Device
Creates a short-lived implosion field.

Laser Beam
Fires a low-output but still painful laser beam.

Laser Pulse
Fires a much more powerful laser beam, but can only maintain it for a 
fraction of a second.

Light Machine Gun
A basic machine gun.

LR Rocket
A rocket launcher. Probably not as good as the other rocket launcher, 
as it starts off moving slowly but accelerates.

Mortar
A mortar. Useful for firing over walls at enemy positions.

Nibbler
Fires lots of small bullets very quickly.

Nuclear Missile
The ultimate weapon! A bit difficult to aim, but very effective if 
used properly. Try standing still to fire it.

Plasma Cannon
An energy weapon which shoots out a ball of superhot plasma.

Plasma Rifle
A faster but less powerful version of the plasma cannon.

Plinker
Like a plasma cannon, but bouncy. If you can reliably use it to kill 
anyone other than yourself you're doing better than me. It's fun, 
though.

Prongthrower
Unleashes a hail of erratic little prongs.

Rectifier
A super plasma cannon. Only the nuke is more destructive.

Remote Rocket
Uncorrected version of the C-Remote Rocket. More difficult to steer, 
but faster.

Rocket Launcher
Fires a rocket.

Scattergun
A small-bore automatic shotgun with a high rate of fire.

Seeker Rocket
A homing missile. Turns your normal targetting reticule into a radar 
acquirement thing which locks on to whoever's closest to it. Once you 
have your target you can fire and forget.

Shotgun
Your basic shotgun.

Slug Gun
Fires a very heavy depleted uranium slug.

Swarm Rockets
Lots of little rockets. They're good at long range, when they've had a 
chance to accelerate.

Tracker Rocket
A corrected-flight seeker.

Toxin Grenade
On explosion releases dozens of globules of highly corrosive toxin. 
Can make a large area uninhabitable for a while

--- Weak Weapons

Bomb
A weak and unpredictable grenade.

Grapeshot
A very light shotgun which fires little pellets.

Needler
A weak flechette gun.

RPG
A weak and unpredictable rocket propelled grenade.

Semi-Automatic
Not very effective.

--- Equipment

Armour
When armoured you take only half damage from all attacks. Looks like a 
grey jacket, and your health gauge is grey when you're wearing it.

Cloak
Makes you almost invisible, although shooting uncloaks you for a few 
seconds. Looks like a purple box with a transparent centre.

Shield
Surrounds you in a transparent bubble of force which reduces the 
damage you suffer from each bullet, explosion etc by a small and 
unpredictable amount. Makes you effectively immune to things like 
shotgun pellets, nibbler bullets or shrapnel, but heavier things punch 
right through it. Looks like a blue box.


**************************
10. Networked Games
**************************

Null-Modem linkups through your computer's serial ports are supported, 
allowing you to play with up to four players on two computers. It's a 
little bit complicated getting them to work, though.

First, plug the computers together with your null modem cable (you may 
want to turn your computers off first). Don't ever plug both ends of 
the same cable into a single computer. This hurts it.

Next, edit the file libnet.cfg in the game directory of each computer. 
There should be a line looking something like this
Autoports 0 1
If you're using COM1 on that computer, change it to autoports 0. If 
COM2, change to autoports 1. If you don't know, you could leave it as 
autoports 0 1 but that may not work, so you'll have to use trial and 
error.

Now, load up Captain Pork's World of Violence on both computers. 
Clients should set up their players and key configurations, then go 
straight to the netgame menu. Set the game type to 'join a game' and 
the com port to whatever port your computer uses (yes, you do have to 
do this again). In the netgame menu there are shortcuts to the 'Number 
of Players' and player team options, in case you want to change these.

Meanwhile, the server sets up the game as you would for a single-
computer game. Subject to the restrictions listed below, any options 
can be changed. AI players can be added. If you want to load a level 
bitmap file, it must be present under the same name on all clients as 
well as the server. After all this is done, the server should go to 
the netgame menu, select 'host a game' and set the com port 
appropriately. Now select 'wait for connections'.

When the server is waiting, the clients should (one at a time) select 
'join game' or 'establish connection' or whatever it's called, I 
forget. When all clients have joined, the server should start the game 
as normal.

When the game is over, you go back and do it all again as above.

 - Restrictions in Netgames
Unfortunately I'm not a very good programmer, and this is my first 
multiplayer game (have a look in async.c for something scary). So 
there are a few features which are not available in netgames:
    - Dirt. Sorry, but this is difficult to get right in theory, let 
alone in  
       practice. Whenever you start a netgame, dirt is set to 'None' 
and 
       earthquakes to 'Off'.
    - Capture the Flag and Porkball game modes (yes, I know, the most 
       interesting ones, although T&H is fun too). All others are 
okay.
    - Certain weapons: Clod of Dirt, Dirt Bomb and Hunter-Seekers are 
all 
       disabled. Laser beam is available but doesn't work very well.
    - Only the server can add AI players.
I've seen a netgame crash a computer, but that was a P150 running at 
640x480 acting as a client in a game with 2 humans and 7 AIs, so I 
wasn't particularly surprised. More reasonable set-ups should be 
stable.

Ways to improve performance:
   - Take out AIs (these use as much bandwidth as human players)
   - Take out all pickups (weapon boxes etc)
   - Take out smart weapons (trackers, seekers, bouncy bombs and 
remote
      missiles), as these require extra bandwidth

 - Experimental modes:
   - Three-computer null-modem
If your server computer has two available serial ports, you can try 
plugging two other computers into it. Edit libnet.cfg to include this 
line:
autoports 0 1
and connect with each client computer as above (the server should 
change the com port setting between waiting for connections from each 
client). This mode doesn't work very well on my computers (apparently 
due to a limitation in Libnet, according to a number of posters to 
comp.os.msdos.djgpp), but if yours have different IRQ settings you may 
have better luck. 

   - IPX
This mode is completely experimental, as I don't have access to a LAN 
to test it out on. As far as I know it might damage your network or 
interrupt your city's power supply. Basically the clients use the 
broadcast channel to try to attract the server's attention before they 
settle down and start communicating together. In theory you should be 
able to have multiple clients (up to six, I think). Just make sure 
that only one client is trying to connect at a time, and reselect the 
'wait for connections' item on the server for each client once the 
previous one has established contact. You shouldn't have to worry 
about the com port settings or messing around with libnet.cfg.
If anyone gets this working, please contact me! 
(captainpork@fastmail.fm) If anyone knows a bit about Libnet and IPX 
and wants to help make this into a non-experimental mode, also please 
contact me.

   - Other modes (UDP/IP etc)
I guess if you were interested in adding support for other modes you 
could spend some time hacking around in connect.c. If you're 
interested in doing so, please contact me.


**************************
11. Modifying the Game
**************************

Captain Pork's World of Violence is highly configurable through the 
game config menus, but has little other support for modifications 
unless you want to mess around with source code. One thing you can do 
reasonably easily is edit the sprites used for the little people, 
provided that you have a decent graphics program (I use the GIMP, 
which is free) and a lot of patience for pixel-by-pixel mousework.

To do this, open the soldier.bmp or cyborg.bmp file. You will notice 
that each row is a different soldier type (light, j-light, r-light, 
medium etc) and that each column is a different frame of animation. 
The first frame is the legs when standing still. Then come a dozen or 
so frames of the body aiming up and down. Then there's the backpack 
frame followed by several frames of legs walking to the right. Finally 
there is a frame of legs used when in the air followed by a few empty 
frames that aren't used.

The picture you see on the screen is assembled more or less like this:
- The current leg animation frame is blitted to the screen. If you're 
facing left, the sprite is flipped horizontally.
- The backpack frame is blitted in, also flipped if facing left.
- The body frame is blitted, flipped if necessary (meaning that the 
soldiers look oddly ambidextrous).
(Actually it's double-buffered and some assembly is done beforehand, 
but you get the idea)

Some notes about colour also need to be added here. Captain Pork runs 
in 8-bit 256 colour mode, so forget about fancy airbrushing or anti-
aliasing! You may be able to extract the indexed palette from the 
soldier.bmp file, but if you can't the palette is included in 
palette.bmp. Just use these colours to make your new pictures. Or some 
of them, at least - the following colours are special:
- Black (R:0, G:0, B:0) is the transparency colour. Don't worry if 
black turns up as colour index 224 sometimes; the game adjusts for 
this. If you want a very dark grey, use colour 31 (R:32, G:32, B:32).
- Colours 224 upwards should not be used, as they are required for the 
unique colour of each player and are unpredictable.
- Colour 232 (R:198 G:40 B:40) is the exception. It is replaced by the 
unique colour of each player when displayed.
- The colour of the pixel at (0,0) is replaced by the team colour 
wherever it's used, or left as is in a non-team game. It's used for 
the soldiers' legs in both of the models that come with the game. 

If your image editor doesn't support this kind of indexed palette 
operation (I couldn't get it to work in Photoshop) you can use the 
eyedropper or equivalent to transfer colours from palette.bmp. Or you 
could just forget about the whole indexed colour thing, use whatever 
colours you want, then let the game convert the colours for you. As 
long as you get the RGB values of the special colours right and don't 
mind a bit of approximation this might work.

If you do manage to produce a nice set of sprites, email them to me 
and I'll put them in any future releases there happen to be.

You can also use an image editor to create levels (maps), which are 
stored in the Maps subdirectory. Level files work like this:
- The file should be a bitmap with a .bmp extension. RLE encoding is 
supported.
- The bitmap should be as wide as the level and twice as high. Neither 
level dimension should exceed 1200 pixels or be less than 300.
- The upper half of the bitmap is what you see. The lower half is a 
sort of mask which determines whether each pixel is empty space, dirt 
or undiggable rock.
- Where the lower half is colour zero (black), the corresponding area 
of the level is empty space, with whatever's in the top half being the 
background.
- Where the lower half is colour 250 (R:178 G:40 B:198), the 
corresponding area of the level is undiggable rock.
- Where the lower half is any other colour, the corresponding area of 
the level is dirt. When the dirt is destroyed or dug, whatever's in 
the top half is replaced by what's in the bottom half, which then 
becomes the background.
- Colours 224+ shouldn't be used.

Is all that clear? If not, there is an example map (example.bmp) which 
will hopefully help you understand what's going on.

If you set the 'dirt' option in the level menu to None, all dirt will 
be removed from the map after it's loaded. This will also be done in a 
netgame.

So much for the easy part. If you want to mess around with source 
code, keep in mind that I'm not a very good programmer (I taught 
myself C after learning Commodore 64 BASIC - at least I don't use 
gotos any more). The following things are needed to compile Captain 
Pork's source code:

- DJGPP (not sure which version is required. Probably 2.something)
- The Allegro low-level game routines library by Shawn Hargreaves et 
al.
- The Libnet networking library by George Foot et al (you could do 
without Libnet by commenting out all references to it). Despite 
references to it in some comments, you don't need DZCOMM (a serial 
port library) as I replaced it with Libnet.

Just compile everything and link it all with -lalleg and -lnet. main() 
is in proj.c, along with an index to all source files.

Now that you've got it compiling, good luck! If you have any 
questions, I may be contactable at captainpork@fastmail.fm, but then 
again I may not be depending on when you are reading this.


