-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added MiniScript version of 68_Orbit.
- Loading branch information
Showing
2 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Original source downloaded from [Vintage Basic](http://www.vintage-basic.net/games.html). | ||
|
||
Conversion to [MiniScript](https://miniscript.org). | ||
|
||
Ways to play: | ||
|
||
1. Command-Line MiniScript: | ||
Download for your system from https://miniscript.org/cmdline/, install, and then run the program with a command such as: | ||
``` | ||
miniscript orbit.ms | ||
``` | ||
|
||
2. Mini Micro: | ||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter: | ||
``` | ||
load "orbit" | ||
run | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
print " "*33 + "Orbit" | ||
print " "*15 + "Creative Computing Morristown, New Jersey" | ||
print; print; print | ||
print "Somewhere above your planet is a Romulan ship." | ||
print "The ship is in a constant polar orbit. Its" | ||
print "distance from the center of your planet is from" | ||
print "10,000 to 30,000 miles and at its present velocity can" | ||
print "circle your planet once every 12 to 36 hours." | ||
print "Unfortunately, they are using a cloaking device so" | ||
print "you are unable to see them, but with a special" | ||
print "instrument you can tell how near their ship your" | ||
print "photon bomb exploded. You have seven hours until they" | ||
print "have built up sufficient power in order to escape" | ||
print "your planet's gravity." | ||
print "Your planet has enough power to fire one bomb an hour." | ||
print "At the beginning of each hour you will be asked to give an" | ||
print "angle (between 0 and 360) and a distance in units of" | ||
print "100 miles (between 100 and 300), after which your bomb's" | ||
print "distance from the enemy ship will be given." | ||
print "An explosion within 5,000 miles of the romulan ship" | ||
print "will destroy it." | ||
print; input "(Press Return.)" | ||
print "Below is a diagram to help you visualize your plight." | ||
print " 90" | ||
print " 0000000000000" | ||
print " 0000000000000000000" | ||
print " 000000 000000" | ||
print " 00000 00000" | ||
print " 00000 xxxxxxxxxxx 00000" | ||
print " 00000 xxxxxxxxxxxxx 00000" | ||
print " 0000 xxxxxxxxxxxxxxx 0000" | ||
print " 0000 xxxxxxxxxxxxxxxxx 0000" | ||
print " 0000 xxxxxxxxxxxxxxxxxxx 0000" | ||
print "180<== 00000 xxxxxxxxxxxxxxxxxxx 00000 ==>0" | ||
print " 0000 xxxxxxxxxxxxxxxxxxx 0000" | ||
print " 0000 xxxxxxxxxxxxxxxxx 0000" | ||
print " 0000 xxxxxxxxxxxxxxx 0000" | ||
print " 00000 xxxxxxxxxxxxx 00000" | ||
print " 00000 xxxxxxxxxxx 00000" | ||
print " 00000 00000" | ||
print " 000000 000000" | ||
print " 0000000000000000000" | ||
print " 0000000000000" | ||
print " 270" | ||
print "x - your planet" | ||
print "o - the orbit of the romulan ship" | ||
print; input "(Press Return.)" | ||
print "On the above diagram, the romulan ship is circling" | ||
print "counterclockwise around your planet. Don't forget that" | ||
print "without sufficient power the romulan ship's altitude" | ||
print "and orbital rate will remain constant." | ||
print "Good luck. The federation is counting on you." | ||
|
||
while true | ||
a=floor(360*rnd) | ||
d=floor(200*rnd + 200) | ||
r=floor(20*rnd + 10) | ||
for h in range(1,7) | ||
print "This is hour " + h + ", at what angle do you wish to send" | ||
a1 = input("your photon bomb? ").val | ||
d1 = input("How far out do you wish to detonate it? ").val | ||
a += r | ||
if a >= 360 then a -= 360 | ||
t = abs(a-a1) | ||
if t >= 180 then t = 360 - t | ||
c = sqrt(d*d + d1*d1 - 2*d*d1*cos(t*pi/180)) | ||
print "Your photon bomb exploded " + round(c) + " * 10^2 miles from the" | ||
print "Romulan ship." | ||
if c<=50 then break | ||
end for | ||
if c <= 50 then | ||
print "You have succesfully completed your mission." | ||
else | ||
print "You have allowed the Romulans to escape." | ||
end if | ||
print "Another romulan ship has gone into orbit." | ||
yn = input("Do you wish to try to destroy it? ").lower + " " | ||
if yn[0] != "y" then break | ||
end while | ||
print "good bye." |