Hi all,
1. I would like to be able to identify the hardware and OS my timing
critical programs are running on.
To this end, I can use ver$ to identify the QDOS version. However, what ver$
returns do Minerva and SMSQ/E give?
Is there a surefire way to identify if the execution environment is a QL,
Gold Card, Super Gold Card, Aurora, Q40, Q60, etc? This would allow me to
create fast, integrated speed-matching code for as many environments as I
can get information for.
2. I need to collect input to a variable$ while a wider program loop is
running. I'm not sure how to approach this. INKEY$ can tell me what key is
pressed, but then I am faced with somehow debouncing the input, and also
knowing when someone says "flight blah, turn to heading 222 degrees"... I
don't want to pause the aircraft just to take input. I'm a little stuck on
this.
3. I need to be able to draw data blocks to the screen. The data blocks
would look something like this:
AAL3251
030^24
.
/
That data block means flight AAL3251 is at 3,000 ft, climbing, at 240 knots.
Below it there is a blob for the plane, with a trail that shows by angle the
direction it came from, and the speed (faster = longer trail)
I have two problems to solve here: ONE: when aircraft approach the edge of
the screen, the dot and line can go off, but the text cannot and will
generate an error. TWO: I have to often plot these labels overlapping each
other. They will also overlap the runways and beacons. I can't avoid the
need to redraw the airport and beacons occasionally, but I would like to do
so without flicker. It seems the plan will be to draw the positions, store
them in "old" variable copies, do the math, then overdraw the moving tags in
black, redraw the fixed items, then plot the new positions, rinse and
repeat. This seems wasteful. Is there a smart technique I am missing? (It
must apply to SMSQ/E, Minerva and QDOS, so the second screen isn't,
unfortunately, an option.)
4. I need to detect proximity violations (three miles.) I have this cracked.
A simple reducing nested loop minimises work:
FOR first = 0 to (high_slot-1)
FOR second = (first+1) to high_slot
_proximity (first, second)
END FOR second
END FOR first
This compares each pair of planes just once. Thus, with 4 planes, it will
compare:
0 to 1, 0 to 2, 0 to 3, 0 to 4
1 to 2, 1 to 3, 1 to 4
2 to 3, 2 to 4
3 to 4
Sweet!
The _proximity() procedure simply sets the color of close plane tags to red,
and non-close tags to green.
5. Currently, I am estimating that on an unaccelerated QL each loop through
the calculations will be SIX+ SECONDS. This is obviously unacceptable. Given
this horrifying realization, I will have to supply the game Turbocharged,
and include the source. I have downloaded Turbo, and will be reading ASAP,
as I would like to incorporate any special coding at writing time, rather
than editing later. What kind of speed-up factor might I obtain by Turbo-ing
vs. Supercharging?
6. I am having weirdness with zip-files, and am looking forward to obtaining
a floppy so I can put all the files on one floppy. When I release the game,
I will try to offer it in as many formats as possible: floppy, zip, qxl.win,
and the promising QLPAK file - must find out more about that.
7. I am now intrigued by the idea of internet play. What is the state of the
tcp_ option? What good ways are there to get a QL online? If the stack is
accessible from SuperBASIC I could do some wonderful things.
8. I have decided to allow people to choose from different airports, not
just the default one.
I could implement this by reserving lines 30000 - 32767 for DATA statements
and create a format. Then, I could have many airport files on the storage
device, and MERGE the necessary one in. Alternatively, I could create a data
format, and load/save the bytes as needed - much more compact, but less
friendly to future airport additions by others. I fully intend to allow
anyone to read the data format and create/share their own airport
description files. I'd simply check them then add them to the program.
9. Network play. How cool would it be to have 3 or 4 QLs playing a grid, and
passing off aircraft to each other? I recall the inbuilt NET ports were just
slightly better than useless, but I've seen them work, so...
10. I think I need to obtain some form of superior graphics library. It
needs to integrate into SuperBASIC, and be compiler-friendly. Is there such
a thing?
Any and all suggestions and discussion welcome!
Dave
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm