Doodle
-
- Super Gold Card
- Posts: 725
- Joined: Mon Nov 24, 2014 2:03 pm
Re: Doodle
Hi Derek, Dilwyn and All,
Here is version5, which incorporates your requested modifications, tested ok under SMSQ/E in QPC2 and SGC.
Of course it halts under QDOS, because of the CURSOR# problem already discussed.
In high resolution, text CSIZES are best set to 3,1, as otherwise they are too small to identify. (In 800x600, circles are squashed).
I must work out how to adjust the bottom edge detection limit with big characters in high resolution too....
Thanks guys for the tips ! Regards, Steve.
Here is version5, which incorporates your requested modifications, tested ok under SMSQ/E in QPC2 and SGC.
Of course it halts under QDOS, because of the CURSOR# problem already discussed.
In high resolution, text CSIZES are best set to 3,1, as otherwise they are too small to identify. (In 800x600, circles are squashed).
I must work out how to adjust the bottom edge detection limit with big characters in high resolution too....
Thanks guys for the tips ! Regards, Steve.
-
- Super Gold Card
- Posts: 725
- Joined: Mon Nov 24, 2014 2:03 pm
Re: Doodle
Hi Folks,
I have read that most QL Keywords can be replaced in the name table, so as to modify any that need extending.
One such candidate is CURSOR, which under QDOS needs to be able to accept a channel parameter.
SMSQ/E's CURSOR# works fine, so can it be snipped and added to the QDOS name table in BOOT to make that system compatible ?
Only a few keywords of 'standard' basic cannot be redefined. Would this be too hard a project to undertake ?
For example, TURBO's MOVE_MEMORY is easy to emulate... and is now freeware anyway.....
Regards, Steve.
I have read that most QL Keywords can be replaced in the name table, so as to modify any that need extending.
One such candidate is CURSOR, which under QDOS needs to be able to accept a channel parameter.
SMSQ/E's CURSOR# works fine, so can it be snipped and added to the QDOS name table in BOOT to make that system compatible ?
Only a few keywords of 'standard' basic cannot be redefined. Would this be too hard a project to undertake ?
For example, TURBO's MOVE_MEMORY is easy to emulate... and is now freeware anyway.....
Regards, Steve.
- Mark Swift
- ROM Dongle
- Posts: 33
- Joined: Fri Jul 18, 2014 9:13 am
- Location: Blackpool, Lancs, UK
- Contact:
Re: Doodle
Hi Steve,
...enjoying playing around with your program.
I notice there is an initialisation bug that's causing some explosions where there are no collisions.
This may be because x and y need to be cleared on lines 700 and 740 before each test.
700 x=0:SELect af:=ac(j)-z TO ac(j)+z:x=1
740 y=0:SELect df:=dn(j)-z TO dn(j)+z:y=1
Also, it's possible to get rid of the flicker by removing the CLS, and drawing the character in XOR mode using OVER -1.
I would upload a prog with the mods, but my copy is hacked around so as to get it to run on normal QDOS
Basically, you get a smoother transition if you only clear the character from the old position, after you have drawn it in the new position.
I added these lines:
432 REMark first go flag
434 fg=1:OVER -1
460 REMark Consider any one sprite
562 REMark remember old position
564 oa=ac(n):od=dn(n)
600 REMark draw char in new position
601 CURSOR#c,ac(n),dn(n),-3,0
603 INK#c,ik(n): PRINT#c;CHR$(n+21)
604 REMark wipe char from old position, unless its the first go
605 IF fg=0 THEN
606 CURSOR#c,oa,od,-3,0
608 INK#c,ik(n): PRINT#c;CHR$(n+21)
609 END IF
1012 REMark This is no longer the first go
1014 fg=0
...and I removed these lines:
930
940
950
955
960
970
Many thanks, Mark
...enjoying playing around with your program.
I notice there is an initialisation bug that's causing some explosions where there are no collisions.
This may be because x and y need to be cleared on lines 700 and 740 before each test.
700 x=0:SELect af:=ac(j)-z TO ac(j)+z:x=1
740 y=0:SELect df:=dn(j)-z TO dn(j)+z:y=1
Also, it's possible to get rid of the flicker by removing the CLS, and drawing the character in XOR mode using OVER -1.
I would upload a prog with the mods, but my copy is hacked around so as to get it to run on normal QDOS
Basically, you get a smoother transition if you only clear the character from the old position, after you have drawn it in the new position.
I added these lines:
432 REMark first go flag
434 fg=1:OVER -1
460 REMark Consider any one sprite
562 REMark remember old position
564 oa=ac(n):od=dn(n)
600 REMark draw char in new position
601 CURSOR#c,ac(n),dn(n),-3,0
603 INK#c,ik(n): PRINT#c;CHR$(n+21)
604 REMark wipe char from old position, unless its the first go
605 IF fg=0 THEN
606 CURSOR#c,oa,od,-3,0
608 INK#c,ik(n): PRINT#c;CHR$(n+21)
609 END IF
1012 REMark This is no longer the first go
1014 fg=0
...and I removed these lines:
930
940
950
955
960
970
Many thanks, Mark
Re: Doodle
Thank you Mark. Looks like you've already done some of the things I was hoping to do to adapt the program to what I want to do with it.
--
All things QL - https://dilwyn.qlforum.co.uk/index.html
All things QL - https://dilwyn.qlforum.co.uk/index.html
-
- Super Gold Card
- Posts: 725
- Joined: Mon Nov 24, 2014 2:03 pm
Re: Doodle
Hi Dilwyn, Derek, Mark and All,
Thanks guys for your helpful comments tweaks and suggestions.
Therefore I have ammended the code and also optimised it still further, to reduce shuddering.
SGC needed Mode 8. No more checkered characters. Hit ranges are now progressive.
(ESC)ape or (N)ext screen keys added. Line 150 p=1 to 8 page sizes ; 250 Q is number of sprites.
The whole program is now faster and smoother. Tested ok on QPC2 & SGC under SMSQ/E.
Regards, Steve.
Thanks guys for your helpful comments tweaks and suggestions.
Therefore I have ammended the code and also optimised it still further, to reduce shuddering.
SGC needed Mode 8. No more checkered characters. Hit ranges are now progressive.
(ESC)ape or (N)ext screen keys added. Line 150 p=1 to 8 page sizes ; 250 Q is number of sprites.
The whole program is now faster and smoother. Tested ok on QPC2 & SGC under SMSQ/E.
Regards, Steve.
- Mark Swift
- ROM Dongle
- Posts: 33
- Joined: Fri Jul 18, 2014 9:13 am
- Location: Blackpool, Lancs, UK
- Contact:
Re: Doodle
Hi Steve,
Cool. BTW some compatibility mods below.
Then on line 140, its just a case of flipping between c=3 for newer QDOS variants or c=1 for older.
Mark
Cool. BTW some compatibility mods below.
Code: Select all
180 IF c>2 THEN OPEN#c,CON_255: END IF: MODE 8
690 IF c<>1 THEN CURSOR#c,oa,od,-10,0 : ELSE CURSOR oa,od,-10,0 : END IF
950 PAUSE 200:IF c>2 THEN CLOSE#c: END IF: GO TO 100
1000 IF KEYROW(1)=8 : IF c>2 THEN CLOSE#c: END IF: STOP
1010 IF KEYROW(7)=64: IF c>2 THEN CLOSE#c: END IF: GO TO 100
1030 PAUSE (5-(5*ct>24))
Mark
-
- Super Gold Card
- Posts: 725
- Joined: Mon Nov 24, 2014 2:03 pm
Re: Doodle
Hi Mark and All,
I will have a look at your last posting later today....
For SGC QDOS, I rewrote the sprites as simple circles, 'Blob' tested OK, (and on QPC2).
OK under QDOS,a compiled version fails (with high resolutions) when key (N) is pressed.
Regards, Steve.
I will have a look at your last posting later today....
For SGC QDOS, I rewrote the sprites as simple circles, 'Blob' tested OK, (and on QPC2).
OK under QDOS,a compiled version fails (with high resolutions) when key (N) is pressed.
Regards, Steve.
-
- Super Gold Card
- Posts: 725
- Joined: Mon Nov 24, 2014 2:03 pm
Re: Doodle
Hi Folks,
My SGC QL failed often whilst writing the final versions : Just a poor mains plug though !
All suggested tweaks are incorporated, into just 3 versions, which are now quirk free !
Brownien8_bas : Prints characters. Or, LET 180 read Vs=0 for blobs.
Brownien8q_bas : For QDOS, LET 180 be -1, 0 for SGC, or 1 for QPC2.
BrownienQ_task : For QDOS Turbo_SMS_code is needed. (All three use ESCape or (N)ext keys).
All fully tested under SGC QDOS & SMSQ/E, and QPC2, (including high resolutions).
Replaces all previous versions ! Regards, Steve.
My SGC QL failed often whilst writing the final versions : Just a poor mains plug though !
All suggested tweaks are incorporated, into just 3 versions, which are now quirk free !
Brownien8_bas : Prints characters. Or, LET 180 read Vs=0 for blobs.
Brownien8q_bas : For QDOS, LET 180 be -1, 0 for SGC, or 1 for QPC2.
BrownienQ_task : For QDOS Turbo_SMS_code is needed. (All three use ESCape or (N)ext keys).
All fully tested under SGC QDOS & SMSQ/E, and QPC2, (including high resolutions).
Replaces all previous versions ! Regards, Steve.
-
- Super Gold Card
- Posts: 725
- Joined: Mon Nov 24, 2014 2:03 pm
Re: Doodle
Hi again All,
The final version caters for monochrome screens. Let 450 be RND(1 to 7) for MODE 8 colour.
Let 260 be CSIZE 0,0 & 220 th=5 for longer animations.
Modify lines to read wd/2 or hg/2 (or whatever) to reduce screen sizes.
SCALE must be hg,0,0 under QDOS, (due to a system bug), ELSE where under SMSQ/E....
Enjoy experimenting ! Steve.
The final version caters for monochrome screens. Let 450 be RND(1 to 7) for MODE 8 colour.
Let 260 be CSIZE 0,0 & 220 th=5 for longer animations.
Modify lines to read wd/2 or hg/2 (or whatever) to reduce screen sizes.
SCALE must be hg,0,0 under QDOS, (due to a system bug), ELSE where under SMSQ/E....
Enjoy experimenting ! Steve.
Re: Doodle
Hi Seve
Dooddle On! Added a DEF PROC sprite to your doddle and a created a dooddles_fnt of Sprite Invaders
QBITS
Dooddle On! Added a DEF PROC sprite to your doddle and a created a dooddles_fnt of Sprite Invaders
QBITS
- Attachments
-
- Dooddles8q.zip
- (2.29 KiB) Downloaded 46 times