Introduction to Computer Science for Majors II James Tam | Return to the course web page |
Among science fiction programs the Star Trek universe has one of the largest and most diverse set of alien races. Although many of them are largely humanoid (bipedal and approximately the size and mass of an average human) some are quite exotic: silicon-based "rock monsters", many gaseous life forms (e.g., the Calamarian), energy-based entities like the Medusans whose appearance is so alien that they drive most humanoids to madness when viewed, even ones that have no fixed shape or form such as the allasomorphs or the changelings but can change their appearance at will. Each has their own unique characteristics, culture, history and technology.
The Federation
The United Federation of Planets (or "the Federation" for short) is an egalitarian union of hundreds of species and cultures. To bring together such a large and diverse number of races requires something other than combat to settle differences of opinion. One of the founding races of the Federation and perhaps the most ubiquitous are humans. Most humans are equal parts explorer and diplomat, and provide the glue that holds the Federation together. Their ships are well equipped with defensive and offensive weapons that aren't designed to start a fight but to end them.
The federation is a peaceful union of numerous races. "Infinite diversity in infinite combinations."
The Klingon Empire
This warrior race has a genetic predisposition to hostility and a well-known streak of fatalism. Klingons are also famous (or perhaps infamous) for their celebrations in which there's a great deal of boasting, growling, wrestling, snarling and all-around extroverted revelry. If you look beyond their boisterous and rather loud exteriors the Klingons are perhaps the most noble race of all: they hold honor above everything (even their own life). Klingon ships are equipped with powerful offensive capabilities that suit their aggressive natures.
A young Klingon warrior wielding a Bat'leth in mock combat. "Kapla!" (Success!)
The Dominion
The Dominion is a mighty planetary alliance composed of several hundred dominated races led by a race of shape shifters (know as the "Founders" or changelings), administered by a devious and cloned race (the "Vorta") and defended by a genetically bred race of soldiers (the "Jem'Hadar"). The founders are the dominion and dominion are the founders. Their goals are simple: the imposition of (their) order on the galaxy. Much like Klingon warships, Dominion ships are built for a fight.
A Jem'Hadar soldier on guard. "Victory is life!" The Borg
They are a cybernetic life-form which is part organic, part artificial with a singular unifying goal, the consumption of useful technology. They do this by "assimilating" other species (i.e., turning them into Borg) which they claim will, "..raise the quality of life for that species."1 The Borg skill at assimilating new technology allows their ships to adapt their defensive systems which will reduce the effectiveness of some enemy attacks over time. Each attack on a Borg ship allows them to adapt their defenses to the attack. In addition the Borg are not native to the Federation quadrant (quarter) of the galaxy: only the advanced Borg propulsion systems in their ships have made contact between humans and the Borg possible.
A squad of Borg drones. "You will be assimilated. Resistance is futile."
Menu option
Effect
Invulnerability (option 'I')
The player's ship becomes immune to all attacks until the player invokes the cheat menu again and turns off invulnerability mode.
Invoke the quantum slip stream drive (option 'S')
A very high speed means of travel allowing the player's ship to move to any unoccupied sector in the galaxy.
When invoked the program will prompt the player to enter the destination (row, column) values and if the sector is unoccupied the player's ship will move to the new sector. The ship cannot open a slip stream tunnel to the current sector.
- This is a separate means of propulsion from the regular engine and conceivably both can be invoked during a turn e.g., during the movement phase the player moves one sector using conventional warp drive while for the attack phase the player invokes the slip stream drive and moves to yet another sector.
Fire the photonic cannon (option 'P')
The player's ship discharges a high-energy burst that will totally destroy any ship, anywhere in the galaxy (except for the player's ship of course).
The firing of the photonic cannon is independent of the firing of the other weapons. If the player invokes cheat mode during the movement menu and fires the photonic cannon, the phasers and the quantum torpedo (for the latter weapon refer to the description of the Federation star ship) can also be fired during the attack phase.
Enter debugging mode (option 'D')
- It's to be implemented in a fashion similar to the previous assignment (off by default, and when turned on it will display debugging messages to help you find the errors in your program. Because of the many new features to be implemented for this assignment, the information displayed while debug mode is turned on is now more specific than it was with the previous assignment. This will help speed up marking.
Quit the cheat menu (option 'Q')
- Invoking the cheat menu will use up some time in the game. That means that if the cheat menu was invoked from the movement menu then exiting the cheat menu (either by selecting quit or another option) will return the player to the attack menu (and vice versa).
0
1
0
C
1
F
C
2
Computer-controlled ship at (0,1)
Ship's system
Point value
Shields
2150
Hull
400
Computer-controlled ship at (1,1)
Ship's system
Point value
Shields
4000
Hull
400
The person controlling the Federation ship chooses to fire the quantum torpedo at the first ship and enters (0, 1) for the (row, column) value. Next comes the targeting of the phasers. Although the player can (and probably should) attack the same ship he or she is not required to do so and in this example doesn't: 800 points of damage are inflicted on the shields of the second ship. After this combat phase the computer-controlled ships end up at the following state:
Computer-controlled ship at (0,1)
Ship's system
Point value
Shields
0 (down)
Hull
400
Computer-controlled ship at (1,1)
Ship's system
Point value
Shields
3200
Hull
400
A Sovereign class star ship. When debug mode is turned on the program should show the shield value of the targeted enemy before the torpedo was fired (point value before being hit by the torpedo) and the shield value after it was fired (it should now be zero).
A Jem'Hadar battleship. When the program is in debug mode it should show the amount of damage generated by the Jem'Hadar anti-proton beam, the shield and hull value of the player's ship before and after the attack.
Example: The human player is controlling one of the standard star ships from the previous assignment and is taking on a Klingon attack cruiser.
Human player's ship
Ship's system
Point value
Shields
600
Hull
400
The damage generated for the cruiser's disruptor fire is 700 points. Because the disruptor fire has double the effect on shields, only 300 points of damage are required to cause the shields on the human player's ship to go down. That leaves 400 points of disruptor energy left. This damage is now deducted from the hull of the human player reducing it zero. Because Klingon ships attack first the human player's ship is destroyed and the player has lost the game. The results of the attack on the human player's ship is displayed and the game now ends with a status message indicating that the game was lost.
A Negh'var class attack cruiser de-cloaking for attack If the game is in cheat mode then the game should display: 1) The amount of disruptor damage generated 2) The amount deducted from the shields 3) The amount deducted from the hull (if any).
A Borg sphere ship travelling at transwarp (faster than warp) speed.
Attack number Damage reduction to the cube First
No damage reduction
Second
Damage is reduced by 25%
Third
Damage is halved
Fourth and successive attacks
Damage is reduced by 75%
All fractional values are removed when determining damage. For example, if 355 points of damage were randomly generated by a phaser hit on a Borg cube and this were the 4th attack then the damage inflicted would equal 88 points (355 / 4 = 88.75 which is reduced down to 88 points).
Example: The human player is controlling one of the old star ships from the previous assignment (an instance of class StarShip). The first time the player tangles with the Borg her phasers generate 800 points of damage. All of this damage will be deducted from either the shields or hull of the cube depending on whether the shields are still up or not. The next turn the player fires on the cube again. Her ship generates 800 points of damage. A quarter of the energy is dissipated by the Borg's defensive systems (200 points) while the remaining 600 points are again deducted from the shields or hull of the cube. The player fires a third time on the cube and the phasers generate 100 points of damage but now the cube absorbs only 50 points of damage, the other 50 points have been dissipated. By now the player has had enough and flees the battle. Should she try to tangle with the Borg again the phasers on her ship will do only a quarter damage to the Borg.
Note however that the Borg ability to adapt only applies to energy based weapons like the phaser. It will have no effect on either the quantum torpedo or the photonic cannon.
A Borg cube attacking a Federation task force When the program is in debug mode the program should show the full amount of damage generated by the player's phasers, the number of times that the Borg ship was hit by the player's ship and the damage that will actually be inflicted on the cube.
1. The official Trek web site: www.startrek.com |
2. "The birth of the federation" by Microprose |
3. "Star Trek: Borg" published and developed by Simon & Schuster Interactive |
4. "Star Trek: Armada" published by Activision. |
1 From Star Trek: The next generation, "The best of both worlds, Part II"
Note: The use of the Star Trek © trademark was for educational purposes only and not meant as a copy write challenge.