Doodle

Anything QL Software or Programming Related.
stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Doodle

Post by stevepoole »

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.
Brownien5.zip
(1.6 KiB) Downloaded 41 times


stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Doodle

Post by stevepoole »

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.


User avatar
Mark Swift
ROM Dongle
Posts: 31
Joined: Fri Jul 18, 2014 9:13 am
Location: Blackpool, Lancs, UK
Contact:

Re: Doodle

Post by Mark Swift »

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

Brownien.gif

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


User avatar
dilwyn
Mr QL
Posts: 2761
Joined: Wed Dec 01, 2010 10:39 pm

Re: Doodle

Post by dilwyn »

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.


stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Doodle

Post by stevepoole »

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.
Brownien6.zip
(1.55 KiB) Downloaded 37 times


User avatar
Mark Swift
ROM Dongle
Posts: 31
Joined: Fri Jul 18, 2014 9:13 am
Location: Blackpool, Lancs, UK
Contact:

Re: Doodle

Post by Mark Swift »

Hi Steve,

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))
Then on line 140, its just a case of flipping between c=3 for newer QDOS variants or c=1 for older.

Mark


stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Doodle

Post by stevepoole »

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.
BrownienBlob.zip
(1.46 KiB) Downloaded 30 times
Brownien.zip
(5.19 KiB) Downloaded 38 times


stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Doodle

Post by stevepoole »

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.
Brownien8.zip
(1.68 KiB) Downloaded 31 times
Brownien8q.zip
(1.67 KiB) Downloaded 28 times
BrownienQ.zip
(5.71 KiB) Downloaded 30 times


stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Doodle

Post by stevepoole »

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.


qbits
Trump Card
Posts: 174
Joined: Sun Dec 11, 2016 3:32 pm

Re: Doodle

Post by qbits »

Hi Seve

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 27 times


Post Reply