Author
|
Comment
|
Justin
Registered User
(4/18/00 12:17 am)
Reply
|
Keen Progs
I've written a Keen 1 high score editor and a Keen 4 save game editor in QBasic, but I'm having FTP problems and can't update my page. If anyone has some web space where they could host them let me know and I'll email them to you.
Edited by Justin at: 4/17/00 7:21:32 pm
|
Pimento Cheez
Vortininja
(4/18/00 10:58 am)
Reply
|
Re: Keen Progs
Email it to me, and I'll put it up in a jiffy.
And so you don't have to root around in my profile for my email address.... pimentocheez@cs.com
Long Live the Keen! |
chogall
Grunt
(4/18/00 4:55 pm)
Reply
|
Re: Keen Progs
If you haven't got anything against it, I would like to see the source code.
--
Tore T.S. (AKA Cho'gall) torets@bigfoot.com |
Justin
Grunt
(4/18/00 6:43 pm)
Reply
|
Re: Keen Progs
Well, since they're in QBasic, they *are* source code.
|
chogall
Grunt
(4/18/00 6:53 pm)
Reply
|
Re: Keen Progs
You mean you don't have a compiler?
I have a pirated copy of the full version Qbasic that includes a compiler. If you want I can mail it to you.
There are also quite a few freeware Basic compilers around on the net, but those aren't 100% compatible with QBasic.
--
Tore T.S. (AKA Cho'gall) torets@bigfoot.com |
Justin
Grunt
(4/19/00 1:02 am)
Reply
|
Re: Keen Progs
I don't download pirated stuff. I do have a shareware compiler called FirstBasic, and when I have time I'll probably convert them to that so I can compile them. FirstBasic is the only shareware compiler I've found that's anywhere near QBasic language-wise, but there are several differences. Do you know of any others that are close to QBasic?
|
Justin
Grunt
(4/19/00 1:09 am)
Reply
|
Re: Keen Progs
I just looked at the source code--it would be a pain to port it to FirstBasic (FirstBasic really sucks in the file-access department).
Here's the code for the Keen 1 high score editor:
'Commander Keen 1 High Score Editor v1.0
'by Justin (dkerk@pop3.clearviewnet.net)
'
'I recommend you make a backup of your SCORES.CK1 file before using this.
'
'To use this utility, move it into your Keen 1 folder and then run it with
'QBasic. If you don't have QBasic you can get it at http://www.qbasic.com
'
'Note: This editor can't edit the ship parts. They will remain the same as in
'the original score file when it is edited. If anyone can find out how the
'ship parts are saved in the SCORES.CK1 file, please email me as it would be
'a big help.
TYPE KeenScoreType
Score1 AS LONG
Score2 AS LONG
Score3 AS LONG
Score4 AS LONG
Score5 AS LONG
Score6 AS LONG
Score7 AS LONG
Dunno AS STRING * 84
Name1 AS STRING * 13
Name2 AS STRING * 13
Name3 AS STRING * 13
Name4 AS STRING * 13
Name5 AS STRING * 13
Name6 AS STRING * 13
Name7 AS STRING * 13
END TYPE
DIM Scores AS KeenScoreType
DIM NewScores AS KeenScoreType
OPEN "SCORES.CK1" FOR RANDOM AS #1 LEN = LEN(Scores)
GET #1, 1, Scores
Begin: CLS
PRINT 1; Scores.Score1, Scores.Name1
PRINT 2; Scores.Score2, Scores.Name2
PRINT 3; Scores.Score3, Scores.Name3
PRINT 4; Scores.Score4, Scores.Name4
PRINT 5; Scores.Score5, Scores.Name5
PRINT 6; Scores.Score6, Scores.Name6
PRINT 7; Scores.Score7, Scores.Name7
INPUT "Enter the number of the entry to edit or 0 to save and quit: ", Num%
SELECT CASE Num%
CASE 0: PUT #1, 1, Scores: SYSTEM
CASE 1
INPUT "Score: ", Scores.Score1
INPUT "Name: ", TempName$
DO UNTIL LEN(TempName$) = 13
TempName$ = TempName$ + CHR$(0)
LOOP
Scores.Name1 = TempName$
CASE 2
INPUT "Score: ", Scores.Score2
INPUT "Name: ", TempName$
DO UNTIL LEN(TempName$) = 13
TempName$ = TempName$ + CHR$(0)
LOOP
Scores.Name2 = TempName$
CASE 3
INPUT "Score: ", Scores.Score3
INPUT "Name: ", TempName$
DO UNTIL LEN(TempName$) = 13
TempName$ = TempName$ + CHR$(0)
LOOP
Scores.Name3 = TempName$
CASE 4
INPUT "Score: ", Scores.Score4
INPUT "Name: ", TempName$
DO UNTIL LEN(TempName$) = 13
TempName$ = TempName$ + CHR$(0)
LOOP
Scores.Name4 = TempName$
CASE 5
INPUT "Score: ", Scores.Score5
INPUT "Name: ", TempName$
DO UNTIL LEN(TempName$) = 13
TempName$ = TempName$ + CHR$(0)
LOOP
Scores.Name5 = TempName$
CASE 6
INPUT "Score: ", Scores.Score6
INPUT "Name: ", TempName$
DO UNTIL LEN(TempName$) = 13
TempName$ = TempName$ + CHR$(0)
LOOP
Scores.Name6 = TempName$
CASE 7
INPUT "Score: ", Scores.Score7
INPUT "Name: ", TempName$
DO UNTIL LEN(TempName$) = 13
TempName$ = TempName$ + CHR$(0)
LOOP
Scores.Name7 = TempName$
END SELECT
GOTO Begin
CLOSE
And for the Keen 4 saved game editor:
CLS
DIM Gamename AS STRING * 24
FOR X = 0 TO 5
OPEN "SAVEGAM" + LTRIM$(STR$(X)) + ".CK4" FOR BINARY AS X + 1
PRINT "Slot"; X; ": ";
GET X + 1, &H9, Gamename: PRINT Gamename
GET X + 1, &H61, Score&: PRINT "Score:", Score&,
GET X + 1, &H69, Ammo%: PRINT "Ammo:"; Ammo%,
GET X + 1, &H6B, Drops%: PRINT "Drops:"; Drops%,
GET X + 1, &H7B, Keens%: PRINT "Keens:"; Keens%;
PRINT : PRINT
NEXT X
GetSlot:
INPUT "Slot number (-1 to quit): ", SlotNum
IF SlotNum = -1 THEN GOTO TheEnd
IF SlotNum < 0 OR SlotNum > 5 OR SlotNum <> INT(SlotNum) THEN PRINT "Slot number must be an integer from 0 to 5": GOTO GetSlot
GetGamename:
INPUT "Name of game: ", GN$
IF LEN(GN$) > 24 THEN PRINT "Game name must be 24 characters or less.": GOTO GetGamename
IF LEN(GN$) < 24 THEN GN$ = GN$ + STRING$(24 - LEN(GN$), 0)
INPUT "Score: ", Score&
INPUT "Ammo: ", Ammo%
INPUT "Drops: ", Drops%
INPUT "Keens: ", Keens%
PUT SlotNum + 1, &H9, GN$
PUT SlotNum + 1, &H61, Score&
PUT SlotNum + 1, &H69, Ammo%
PUT SlotNum + 1, &H6B, Drops%
PUT SlotNum + 1, &H7B, Keens%
TheEnd:
CLOSE
SYSTEM
|
chogall
Grunt
(4/19/00 4:52 pm)
Reply
|
Re: Keen Progs
I think there's a shareware compiler called PowerBasic.
BTW, how did you figure out how the information was stored in the scores/savegame files?
--
Tore T.S. (AKA Cho'gall) torets@bigfoot.com Edited by chogall at: 4/19/00 11:54:43 am
|
Justin
Grunt
(4/19/00 7:32 pm)
Reply
|
Re: Keen Progs
I just downloaded PowerBasic, I'll try it out.
The info for Keen 1 I got by looking at the SCORES.CK1 file with MS-DOS Edit. For Keen 4, I started with the C source code for a really old program called KeenEdit that sets your lives and ammo to 255, and built on it by using a utility called BDIFF to compare saved games with different values for things like drops, etc.
|
Justin
Grunt
(4/19/00 10:27 pm)
Reply
|
Re: Keen Progs
Woohoo! PowerBasic will compile them (with a coupla small tweaks)! I've emailed compiled versions to Pimento.
|
pleitorian
Registered User
(4/23/00 2:12 am)
Reply
|
Testing
Justin: I got both files.
Just testing here so I can remember my stupid global password. Garg! There, I got it.
Expect this stuff...sometime. (Notice my hardcore turnaround... )
|
Shocksund
Vortininja
Posts: 62
(11/15/00 4:47 am)
Reply
|
Cho'gall...
Cho'gall, could you e-mail me that pirated version of QBasic that included the compiler. My e-mail address for attachments is:
the_langdons@yahoo.co.nz
I need it for some of my programs!
Dopefish are clever. By shocksund, the ultimate shocksund. |
|