Skip to content

Commit 3bb0d10

Browse files
committed
Added MiniScript version of 68_Orbit.
1 parent 60d43ed commit 3bb0d10

File tree

2 files changed

+113
-0
lines changed

2 files changed

+113
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Original source downloaded from [Vintage Basic](http://www.vintage-basic.net/games.html).
2+
3+
Conversion to [MiniScript](https://miniscript.org).
4+
5+
Ways to play:
6+
7+
1. Command-Line MiniScript:
8+
Download for your system from https://miniscript.org/cmdline/, install, and then run the program with a command such as:
9+
```
10+
miniscript orbit.ms
11+
```
12+
13+
2. Mini Micro:
14+
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:
15+
```
16+
load "orbit"
17+
run
18+
```
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
print " "*33 + "Orbit"
2+
print " "*15 + "Creative Computing Morristown, New Jersey"
3+
print; print; print
4+
print "Somewhere above your planet is a Romulan ship."
5+
print
6+
print "The ship is in a constant polar orbit. Its"
7+
print "distance from the center of your planet is from"
8+
print "10,000 to 30,000 miles and at its present velocity can"
9+
print "circle your planet once every 12 to 36 hours."
10+
print
11+
print "Unfortunately, they are using a cloaking device so"
12+
print "you are unable to see them, but with a special"
13+
print "instrument you can tell how near their ship your"
14+
print "photon bomb exploded. You have seven hours until they"
15+
print "have built up sufficient power in order to escape"
16+
print "your planet's gravity."
17+
print
18+
print "Your planet has enough power to fire one bomb an hour."
19+
print
20+
print "At the beginning of each hour you will be asked to give an"
21+
print "angle (between 0 and 360) and a distance in units of"
22+
print "100 miles (between 100 and 300), after which your bomb's"
23+
print "distance from the enemy ship will be given."
24+
print
25+
print "An explosion within 5,000 miles of the romulan ship"
26+
print "will destroy it."
27+
print; input "(Press Return.)"
28+
print
29+
print "Below is a diagram to help you visualize your plight."
30+
print
31+
print
32+
print " 90"
33+
print " 0000000000000"
34+
print " 0000000000000000000"
35+
print " 000000 000000"
36+
print " 00000 00000"
37+
print " 00000 xxxxxxxxxxx 00000"
38+
print " 00000 xxxxxxxxxxxxx 00000"
39+
print " 0000 xxxxxxxxxxxxxxx 0000"
40+
print " 0000 xxxxxxxxxxxxxxxxx 0000"
41+
print " 0000 xxxxxxxxxxxxxxxxxxx 0000"
42+
print "180<== 00000 xxxxxxxxxxxxxxxxxxx 00000 ==>0"
43+
print " 0000 xxxxxxxxxxxxxxxxxxx 0000"
44+
print " 0000 xxxxxxxxxxxxxxxxx 0000"
45+
print " 0000 xxxxxxxxxxxxxxx 0000"
46+
print " 00000 xxxxxxxxxxxxx 00000"
47+
print " 00000 xxxxxxxxxxx 00000"
48+
print " 00000 00000"
49+
print " 000000 000000"
50+
print " 0000000000000000000"
51+
print " 0000000000000"
52+
print " 270"
53+
print
54+
print "x - your planet"
55+
print "o - the orbit of the romulan ship"
56+
print; input "(Press Return.)"
57+
print
58+
print "On the above diagram, the romulan ship is circling"
59+
print "counterclockwise around your planet. Don't forget that"
60+
print "without sufficient power the romulan ship's altitude"
61+
print "and orbital rate will remain constant."
62+
print
63+
print "Good luck. The federation is counting on you."
64+
65+
while true
66+
a=floor(360*rnd)
67+
d=floor(200*rnd + 200)
68+
r=floor(20*rnd + 10)
69+
for h in range(1,7)
70+
print
71+
print
72+
print "This is hour " + h + ", at what angle do you wish to send"
73+
a1 = input("your photon bomb? ").val
74+
d1 = input("How far out do you wish to detonate it? ").val
75+
print
76+
print
77+
a += r
78+
if a >= 360 then a -= 360
79+
t = abs(a-a1)
80+
if t >= 180 then t = 360 - t
81+
c = sqrt(d*d + d1*d1 - 2*d*d1*cos(t*pi/180))
82+
print "Your photon bomb exploded " + round(c) + " * 10^2 miles from the"
83+
print "Romulan ship."
84+
if c<=50 then break
85+
end for
86+
if c <= 50 then
87+
print "You have succesfully completed your mission."
88+
else
89+
print "You have allowed the Romulans to escape."
90+
end if
91+
print "Another romulan ship has gone into orbit."
92+
yn = input("Do you wish to try to destroy it? ").lower + " "
93+
if yn[0] != "y" then break
94+
end while
95+
print "good bye."

0 commit comments

Comments
 (0)