# MAGNETAR

## Name

magnetar -- pilot a spaceship through magnetic fields with asteroids.

Visit the project page: https://sv.gnu.org/p/magnetar.
Watch demonstration videos: https://vimeo.com/87538257 https://vimeo.com/87538726
See the arcade cabinet art for Magnetar: https://archive.org/details/magnetar-source-imagery

## Synopsis

magnetar [OPTION...]

## DESCRIPTION

Your job is to pilot your ship through an asteroid field near a magnetar. The magnetic fields from the magnetar will have their way with your ship, pushing and pulling it as you try to avoid hitting an asteroid. To deal with the havoc of these powerful magnetic waves, you can steer and use your thrusters, or invert the magnetic polarity of the entire ship.

The ship's heads-up-display shows the magnetic fields as the red bars on the left and right of the screen. The fields on the left push your ship to the right, and the fields on the right do the opposite. As the magnetic fields of the magnetar change, so do the bars. The strength of the magnetic field is indicated by the amount that the bar is filled-in.

The ship's heads-up-display also shows the number of asteroids in the asteroid field, as well as your available energy.

Most of the asteroids aren't magnetic, so the magnetic fields do not usually affect them like they do your ship. You know from prior experience that shooting asteroids usualy only compounds the problem.

Your ship only has a limited supply of energy. Using thrusters and switching the magnetic polarity of the ship cost you valuable energy. It takes a lot of energy to withstand the impact of asteroid on the ship.

When you run out of energy, there is still enough power for life support. But you are at the mercy of the magnetar, powerless to move as asteroids continue to hurl past the ship.

The ship's controls are:

D turns the ship counter-clockwise, F turns the ship clockwise, J burns the thruster, K invert magnetic polarity of the ship

To start the game, add coins by pressing the space bar.

Press 1 to start a one-player game, or 2 to start a two-player game.

Press F3 to reset the game.

## OPTIONS

--coin KEYCODE

Change the keycode which adds coins to the game. The default keycode for coining up is the space key.

--one KEYCODE

Change the keycode which starts a single player game. The default keycode for starting a one-player game is the 1 key.

--p1-ccw KEYCODE

Specify the keycode which rotates player one's ship anti-clockwise. The default keycode for turning player one's ship to the left is the D key.

--p1-cw KEYCODE

Specify the keycode which rotates player one's ship clockwise. The default keycode for turning player one's ship to the right is the F key.

--p1-fire KEYCODE

Specify the keycode which inverts the magnetic polarity of player one's ship or shoots a laser. The default keycode for player one fire is the K key.

--p1-thrust KEYCODE

Change the keycode which propels player one's ship forward. The default keycode for player one's thrust is the J key.

--p2-ccw KEYCODE

Specify the keycode which rotates player two's ship anti-clockwise. The default keycode for turning player two's ship to the left is the D key.

--p2-cw KEYCODE

Specify the keycode which rotates player two's ship clockwise. The default keycode for turning player two's ship to the right is the F key.

--p2-fire KEYCODE

Specify the keycode which inverts the magnetic polarity of player two's ship or shoots a laser. The default keycode for player two fire is the K key.

--p2-thrust KEYCODE

Change the keycode which propels player two's ship forward. The default keycode for player two's thrust is the J key.

--pause KEYCODE

Specify the keycode which suspends and resumes the game. The default keycode for pausing the game is the P key.

--reset KEYCODE

Change the keycode which does a soft restart of the game. The default keycode for resetting the game is the F3 key.

--test KEYCODE

Change the keycode which starts the test mode. The default keycode for entering the test mode is the T key.

--two KEYCODE

Change the keycode which starts a two-player game. The default keycode for starting a two-player game is the 2 key.

--quit KEYCODE

Change the keycode which ends the game. The default keycode for quitting the game is the Q key.

--aspect INT:INT

Change the aspect ratio of the screen. The width of the screen affects how much the thrust works. A wider aspect ratio makes the game easier. The default aspect ratio is the aspect ratio of your screen. A common wide-screen ratio is 16:9, but a more arcade-ish ratio is 4:3 or 3:4.

-f, --fps FLOAT

Try to draw this many frames per second. The default fps is 30.

--greyscale

Draw the display in shades of grey.

--inverted-mono

Draw the display in black and white, but with a white background.

--monochrome

Draw the display in black and white.

--nopause

Don't pause when the cursor leaves the window.

-p, --percent INT

Specify the percent of the display the window should take up. The default is 87%.

--stats

Put gameplay statistics in ~/magnetar-stats-p[1-2].csv.

--windowpos INT,INT

Specify the x and y coordinates of the game window.

--version

Display version information and exit.

--help

Give a list of the available options.

## TEST MODE

Pressing T puts the game into test mode. Entering test mode aborts the current game if one is already started. Changing the settings while in test mode cause the configuration file to be modified.

## CONFIGURATION FILE

The configuration file is meant to be modified by the test mode, but it can also be edited by hand.

The following values are allowed in the configuration file:

free-play

Don't require any credits to start the game.

quiet

Don't play sounds.

quiet-attract

Don't play sounds during the pre-game attract mode.

lives NUM-LIVES

Specify the number of ships that each player begins the game with. The default number of ships is 3.

cocktail

Invert player two's display, and also change the controls.

The default controls for cocktail player 2 are:

X turns the ship counter-clockwise

C turns the ship clockwise

N burns the thruster

M invert magnetic polarity of the ship

extra-ship-15000

Give a new ship to the player when 15000 points are earned. The default number of points needed to gain an extra ship is 10000.

extra-ship-5000

Give a new ship to the player when 5000 points are earned.

extra-ship-20000

Give a new ship to the player when 20000 points are earned.

coins-per-credit INT

Specify the number of coins needed for a single credit. The default number of coins per credit is 1.

starting-level INT

Specify the stage number to start the game on. The default starting stage is 1. The highest stage is 25.

bonus-volume FLOAT

The loudness of the bonus music at the end of a stage and during the entering of initials. The lowest value is 0, and the highest value is 11. The default value is 11.

thrust-volume FLOAT

The loudness of the thrusting sound that the ship makes. The lowest value is 0, and the highest value is 11. The default value is 11.

effects-volume FLOAT

The loudness of all of the other sound effects in the game. The lowest value is 0, and the highest value is 11. The default value is 11.

## KEYCODES

The keycodes are X11 key symbol definitions that refer to the keys on a keyboard. A full list can be seen here: http://cgit.freedesktop.org/xorg/proto/x11proto/tree/keysymdef.h To use a keycode with one of the magnetar command-line options, remove the `XK_' prefix of the keycode. e.g. use `Return' rather than `XK_Return'.

## FILES

High scores are kept in ~/.magnetar/high-score.
Configuration is kept in ~/.magnetar/config.
Statistics files are stored in ~/magnetar-p1.csv and ~/magnetar-p2.csv.

## REPORTING BUGS

Report bugs to https://sv.nongnu.org/bugs/?group=magnetar.