Index
Charge Help Index

To learn how to use Help, press F1.

How To Play

Setup

Autoplay

Keyboard

Mouse

Theory

Next Version


How To Play
How To Play Charge

Charge is a simple game for 1 to 6 players.

The left side of the Charge window contains various controls that a player uses to select an initial angle and speed for a projectile.

 When the Fire button is clicked, the projectile is released to travel through an array of positive and negative charges in the playfield in the right half of the window.

The object of the game is to choose an initial speed and angle so that your projectile impacts the playfield wall as close as possible to the lower right corner.  Your score is the distance from the corner that your projectile impacts the wall.

Each player's best score is displayed, as well as the best overall score and the score attained by the last projectile.  Color is used to identify the player responsible for each of the score table items.

Game control menu selections

New	Clears the playfield and redistributes the charges.

Clear	Clears the playfield but leaves the charges undisturbed.

Related Topics

Setup

Keyboard

Mouse


Keyboard
Using the Keyboard

The following keys are used in playing Charge:

F, Enter	Releases projectile.

A	Stops a projectile currently in motion. Typically used if chosen step size (see setup) is too short or if the projectile inadvertently goes into orbit.

Left/Right Arrows	Increment and decrement the initial projectile angle.

Up/Down Arrows	Increment and decrement the initial projectile speed.


Mouse
Using the Mouse

The following objects in Charge are manipulated by the mouse:

Fire Button	Releases projectile.

Abort Button	Stops a projectile currently in motion.  Typically used if chosen step size (see setup) is too short or if the projectile inadvertently goes into orbit.

Angle Indicator	Choose initial projectile angle by typing a number in the box or clicking the increment and decrement buttons.

Speed Indicator	Choose initial projectile speed by typing a number in the box or clicking the increment and decrement buttons.


Setup
 Charge Setup

The Game menu bar item is used to access the Charge Setup dialog box.  Using the mouse or the keyboard, you can change several parameters that affect Charge.

Buttons

OK	Install new parameters, clear the playfield, and begin a new game.

Cancel	Exit setup box without any changes.

Default	Sets all parameters to their default states.

Save	Save parameters on disk as the new defaults.

Parameters

Number of Charges	Controls the number of + and - charges on the playfield.

Discrete Step Size	Control the tradeoff between accuracy and speed.   The larger the number, the faster the game.  The smaller the number, the more accurate the physics.  A reasonable value is 10 for a system with a coprocessor, and 100 for one without.

Charges	Controls distribution of + and - charges.  You can select all +, all -, or randomly chosen.

Projectile	Selects the charge of the projectile.  Remember opposite charges attract and like charges repel.

Number of Players	Choose any number from 1 to 6 players.  Different colors are used for the projectile tracks on the playfield.

Window Size	Large and small playfield sizes are available.  The window is automatically scaled to accommodate the playfield size.

Use Color	Select color or black-and-white for drawing projectile tracks and the score table.


Autoplay
Charge Autoplay

The autoplay feature of Charge can be used to create art on the playfield.

By sequencing through all projectile angles from 0 to 90, tracks are drawn on the playfield, resulting in some interesting patterns.  The current initial speed selection is used to draw all 91 tracks.

Select Autoplay through the Game menubar item.

To stop autoplay, reclick the Autoplay menu item.  The Abort button does not stop autoplay, but rather stops just the current projectile.  Autoplay continues with the next higher angle.


Theory
Charge Theory

The projectile track is calculated using discrete time steps.  At each step, the force vectors from each of the charges on the playfield are summed and applied to the projectile using the formula a=F/m.  The resulting acceleration determines the velocity vector for the next iteration.  All calculations are done using floating point math.

When the projectile is very close to a charge, the force can be so great (inversely proportional to the square of the distance) that the acceleration can be tremendous.  A "speed limit" is enforced whereby if the velocity is greater than a certain threshold, the time step is reduced.  This feature makes the physics much more reliable.

Still, because of the size of the discrete time step, the physical behavior of the projectile does not quite match reality.  In some cases (try one negative charge with a low initial speed, maybe 3-5), the projectile will go into an unstable orbit around a charge.  We all know this behavior does not conserve energy.

The charges themselves have finite size (1/10 of a pixel) so occasionally the projectile will impact a charge and the player's turn will end.

If you have any suggestions for making projectile tracks more realistic, please write.


Next Version
In the Next Charge Version

All registered users will receive an announcement of the next version of Charge, when it is released.  The next version is expected to have the following improvements (please write if you have any other suggestions):

>	Charges in the playfield may be moved by dragging with the mouse.

>	Set initial angle and speed using the mouse to drag the business end of the velocity vector.

>	More accurate physics.

>	Setup parameters will enable moving charges (Brownian motion).  This will make it more difficult to hit the target.  Possibly different motion speeds and magnitudes.

>	More accurate control over initial speed and angle (tenths or hundredths).

>	...and more...


Projectile

The Fire button releases the projectile.  As the projectile moves through the playfield, it is affected by the playfield charges.  The projectile leaves a colored track as it travels.


Projectile Track

The path taken by a projectile as it travels through the playfield.


Playfield

The square area on the right side of the screen.  Projectiles start at the upper left and travel toward the lower right, leaving tracks as a record of their paths.  Charges are distributed randomly throughout the playfield.