Super star trek text game


















I liked the game so much I put some time into fixing bugs, mainly what could be called continuity errors and loopholes in the game's logic. We even played a couple tournaments. In , I lost access to that PDP I did save the source code listing. It's been slow, tedious work that took over a year to accomplish. There weren't many hits, but there was one that came up with Fortran sources! This version had a few additional features that mine didn't have, however mine had some feature it didn't have.

So I merged its features that I liked. Compared to original version, I've changed the "help" command to "call" and the "terminate" command to "quit" to better match user expectations. However I like "freeze". That later version also mentions srscan and lrscan working when docked using the starbase's scanners , so I made some changes here to do this and indicating that fact to the player , and then realized the base would have a subspace radio as well -- doing a Chart when docked updates the star chart, and all radio reports will be heard.

The Dock command will also give a report if a base is under attack. It also had some added logic to spread the initial positioning of bases. In fact, entering 7 th grade having mastered BASIC, I found myself really confused when my math teacher introduced us to solving simultaneous equations. For instance, find the value of X in this equation:. That was the first time I was introduced to the concept of operator overloading.

The equals-sign can mean variable assignment or numerical equivalence depending on the context. These are not executable statements. The unquoted symbols get substituted with values of variables. I came across some arrays that were never allocated as such. Ultimately, I decided to seek out a better basis for my port. The variable names appear virtually identical, but at least they are all accounted for in this version. Next, I had to decide what language to port it to. Apparently so Want a comparison?

To simulate line numbers, each line starts with a label consisting of an underscore followed by a number. Examine line Subroutines were replaced with methods.

That almost worked. You can leave them via GOTO. That was used only in the case that the player is destroyed to send them back to the beginning of the program to start over.

I replaced that GOTO with a return statement that passes a flag back to the caller. The caller inspects the flag and jumps back to the program start if need be. However, in BASIC, an array and a scalar can share the same name; the interpreter is able to sort it all out. But, C is less kind. To solve the problem, I prefixed array names with underscores. To compensate, I increased the length of all arrays by 1.

Index 0 is never used. When I started testing my port, I noticed some string formatting problems. That means: Print 41 spaces followed by left-parenthesis. That was easy to translate, but the intension was to push the left-parenthesis onto the next line by letting it wrap around the console. I cleaned some of this stuff up.

There are also some tables that get printed in the game. I reformatted them a bit to make them easier to read. It took me a while to realize why they chose that symbol.

Now, I was ready to play the game. As I mentioned above, I never understood the rules before. Luckily, when you run the program, it gives you the option of viewing instructions. I studied them carefully. But, the only way to really understand what to do is to play the game. The game makes itself known by printing out its title. Then, it asks you if you want to view instructions.

Every prompt in the game demands a number. If you hit Enter, zero is assumed. In this case, I hit Enter to skip the instructions. Next, it asks for a seed number to initialize the randomizer. If that was not an option, they should have taken advantage of the instructions prompt. When the instructions prompt appears, it could have entered a loop that timed how long it took the user to enter a value.

That duration could have been used to initialize the randomizer. Again, I simply pressed Enter to skip it. Next, it prints out my mission. I have to destroy 17 Klingon note the game misspells it here ships in 30 units of time with 3 starbases. Then it runs the short range scanner. The short range scanner displays the current quadrant. Each row and column is numbered 1 to 8. The text on the right indicates that I am in quadrant 5,2. The Enterprise is located at sector 5,4. Hence, within this quadrant, the Enterprise is in sector 5,4 as specified.

The goal is seek out quadrants containing Klingon ships and destroy them. This table summarizes 9 quadrants. The center quadrant is your current quadrant. The digits indicate the number of Klingon ships, the number of starbases and the number of stars. In our quadrant, there are no Klingon ships and no starbases, but there are 5 stars.

South of us, there is a quadrant containing 1 Klingon ship. But, first we need to raise shields option 5 :. It asks me how much energy I want to devote to the shields.

I entered If I run out of energy, I lose the game. Starbases replenish energy. They also restock photon torpedoes and repair damage. Navigation requires 2 parameters: direction and distance.

Direction is specified using this:. Angle goes from 1. Note that the y-axis points downwards. You also need to consider the aspect ratio. Each column is 3 characters wide, but each row is only 1 character high. Distance is measured in warp factor units. Navigation is option Navigation automatically runs a short range scan. Note that I moved from quadrant 5,2 to quadrant 5,3. Also, notice that is says that my warp engines are damaged.

Parts of the Enterprise fail spontaneously. As you navigate around, they slowly get repaired. Imagine porting lines of BASIC code, packed as much as possible, to save memory — which means each row contains several instructions separated by a semicolon and without any space. Look at these lines, for example:. I patiently rewrote every line, carefully trying to avoid any mistake.

If you miss a character, everything can change. I started with a 1-to-1 translation, but I soon realized that I could not leave all these goto there; otherwise, I would not be able to read it. So I began transforming some if-then-goto, into if-then-else blocks.

It was not always easy. Soon I realized that some gotos were jumping to unexpected places, like the middle of a function or the middle of a then block. It was like a labyrinth. Patiently identifying and separating all the code blocks was the most difficult part of the job, but it was very useful for understanding game mechanics. You might ask, why would anyone do that on a game written in ?

It was tough to go to sleep with the code unfinished, leaving the mess behind. To do this, I basically checked all the code from scratch. In Perl, I used a lot of next aka continue and last. But, it was useful in the end. After each turn, the Klingons are able to attack the player as well as move throughout the sector. The Enterprise is equipped with shields to reduce damage, however they need to be lowered before the player is able to fire on the Klingons.

If needed, the player can repair or refuel the Enterprise by visiting a starbase. From Mobygames. Original Entry. Uploaded by Jason Scott on December 27, Internet Archive's 25th Anniversary Logo. Search icon An illustration of a magnifying glass.



0コメント

  • 1000 / 1000