PDA

View Full Version : DCG + Qbasic waddles forward...



Ettico
March 1st, 2009, 19:59
I reported earlier that I haven't been able to find a good Qbasic compiler to convert my Qbasic DCG supplemental program into an executable file.

The good news is, that wasn't exactly true. I've had a working Qbasic compiler for some time. I just didn't know how to use it.

The other good news is, the compiler compiled my earlier version of the program perfectly. Click and run.

The bad news is, it doesn't work on my latest version of the program. I'm almost certain the problem is my use of a DOS SHELL command in the program. I don't know how to avoid using the DOS command. The program has to know where it is in order to navigate to all the files it is currently working on. Where it is will vary according to users' setups.

Qbasic, though old, has a pretty good system. It's major shortfall is that it doesn't like long file names. I earlier reported that shortening the long DCG file names doesn't bother DCG, but that was a misunderstanding on my part. It actually bothers DCG very much.

However, this problem can be overcome to a large extent by using DOS type abbreviated filenames in the program, which allows Qbasic to find and open files with long file names. Also, I belatedly discovered that Qbasic automatically clears an existing file when the file is opened for output - which means Qbasic can edit files with long file names in a kind of roundabout way without renaming them.

So I had to re-write some code, but it worked. The program is now successfully navigating to the (correct) DCG campaign folder, and is able to spirit away destroyed ship squadrons from the "ships" and "taskforces" files without annoying DCG.

But I still haven't been able to get DCG to create that creepy intermittent bug in the "squadrons" file. I tried deliberately putting squadrons at enemy airfields so DCG would have to transfer them, but the bug failed to materialize. I need to get a look at the bug's output in order to figure how to swat it when it pops up.

I'm not going to spend forever trying to generate the bug. If it doesn't happen within the next couple of days, I plan to go ahead and upload the program as is, after some play testing. The bug isn't difficult to edit out manually. The problem is, I think the bug occurs during transfers, and may affect the part of the file that tells DCG where the affected squadron is based. If that's the case, it may be necessary to just select some friendly airfield to base the affected squadron at. I've never seen the bug affect more than 1 squadron, and it's usually the first squadron below the player squadron in the "squadrons" file.

If I can't figure out a way to get the program compiled into an executable, I'll just upload the Qbasic 1.1 interpreter, which is now free source. Players can load the program into the interpreter and click on "run" and "start" when they want to run the program.

Running the program will eliminate several possible DCG bugs and will add some interesting complexity to the DCG missions, such as AI escorts, long range escorts, AI escorts for the player squadron on strike missions, re-assignment of the player squadron from CAP to escort, player-determined CAP minimums, and player-determined individual loadouts for the player squadron. Also, fighter flight formations will be changed from echelon left to finger four, and mobile ground units' formations will be changed to columns to facilitate movement along roads. This is all happening now, and there is always the possibility for an upgrade or two.

UncleTgt
March 2nd, 2009, 01:07
:woot:great news!

miamieagle
March 2nd, 2009, 03:53
Ettico you are doing us a great favor. I surely appreciate it.

Thank you!:ernae:

Ettico
March 2nd, 2009, 11:48
Hi miami

I don't look at as a favor. It didn't cost me anything, I used other people's free stuff to make it, I was going to do it anyway, and maybe a few other people would like to have it.

Well, back to the salt mine....:faint:

miamieagle
March 2nd, 2009, 14:40
Looking forward to its completion!


Thank you!