Doodle

Anything QL Software or Programming Related.
User avatar
dilwyn
Mr QL
Posts: 2761
Joined: Wed Dec 01, 2010 10:39 pm

Re: Doodle

Post by dilwyn »

I'm not sure if it's just because Brownien3_bas is faster or what, I now get all sorts of problems when it runs.

On QPC2, this is what happens at startup.

See picture, it instantly more or less fills the screen with yellow explosion circles and not a lot else happens. Not sure if this is because it's so fast that rapid multiple collisions are inevitable or of something else is going on. It's hard to tell from the speed of things, it looks like there are multiple 'explosions' to start with, then things start moving normally with whatever is left.
Brownien3 collisions
Brownien3 collisions
Subjectively, seems to be a lot more flicker in Brownien3_bas when things are moving around. Probably down to the differences in speed between my PC and yours?

On Q68: Oh dear, slower than ever now. Unusable. Can't immediately see anything obvious causing this.

I'm going to tinker with the code over the coming days to see if I can see what's happening, e.g. in case I have an extension installed with the same name as a variable you use or some such something causing problems.


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

Re: Doodle

Post by stevepoole »

Hi Dilwyn,
Looks like I sent the wrong version 3.... after testing on SGC and QDOS, whilst tweaking to adapt to both them and QPC2.

Version4 is rewritten and should run much faster still, but be more stable on all three systems now.

I will have to slug it somehow, as with just a few sprites speed is blistering on QPC2! (And yes many collisions occur at first).

When Turbo'ed, speed on SGC is improved too, that is if you limit the Q variable to say 8 sprites.

Please fell free to tweak as you wish... I hope to achieve a final version soon, with all variables LOCALised for other systems.

Regards, Steve.
Brownien4.zip
(928 Bytes) Downloaded 50 times


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

Re: Doodle

Post by dilwyn »

Thanks Steve. That works a lot better. Can't believe the speed running on QPC2. I'm not sure if it's me, does it actually slow down and flicker more as the number of objects on-screen decreases? I'll need to spend more time trying it out tomorrow.


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

Re: Doodle

Post by stevepoole »

Dilwyn,
The more sprites there are initialised, the slower the program effectively runs.
But with say, Q=170 sprites, as less sprites remain after collisions, then an illusion of empty sluggishness appears...

Do slug the program on QPC using line 705 pause 5, but not on SGC... as it will become too slow.
ADD to the drawem procedure : LOCAL loop,n,x,y,z,af,df,k and the version should run ok on other systems ?

Regards, Steve.


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

Re: Doodle

Post by dilwyn »

stevepoole wrote: Wed Oct 18, 2023 10:00 pm Dilwyn,
But with say, Q=170 sprites, as less sprites remain after collisions, then an illusion of empty sluggishness appears...
<snip>
Regards, Steve.
I agree. At first, it looks like it's slowing down as fewer objects remain, but as you say it's then an illusion of empty sluggishness.

Am tinkering a little by adding comments to the code as I get a better understanding of how it works. Then I'll see what I can do for it on Q68.


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

Re: Doodle

Post by stevepoole »

Hi Dilwyn and all Folks,

Version 4 now uses locals, has been tweaked to vary sprite trajectories, and is fully commented with remarks (and seems stable).

Tested intensively on QPC2, and SGC under QDOS and SMSQ/E. With LOCALs, it ought to run on most systems ? (OK compiled with TURBO).

Probably the final version, unless rewritten with major changes, as another program altogether....

Please let me know of any difficulties on other systems, as I try to cater for them, if possible.

Regards, Steve.
Brownien4.zip
(1.5 KiB) Downloaded 47 times


Derek_Stewart
Font of All Knowledge
Posts: 3975
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Doodle

Post by Derek_Stewart »

Hi Steve,

Lookds a nice programme, the old thing I would liked is the programme opens its own channels. Would this be a problem?
Last edited by Derek_Stewart on Thu Mar 07, 2024 12:01 am, edited 1 time in total.


Regards,

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

Re: Doodle

Post by stevepoole »

Hi Derek,
The program defaults to channel 1, (or perhaps to 0 for KEYROW or PAUSEs ?). SuperBasic handles these, as does TURBO.

If necessary, I could declare a CONsole device channel, and add hashes# to all relevant keywords. No problem.

But under QDOS, CURSOR must be channel one, offset from Main screen at 0,0, so I will investigate to see if I can set a channel number?

That is necessary for backwards system compatibility, a requirement for multi-system use !

When I get the results, or if anyone can answer beforehand, I will report back.

Regards, Steve.


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

Re: Doodle

Post by dilwyn »

stevepoole wrote: Thu Oct 19, 2023 8:07 pm Hi Derek,
The program defaults to channel 1, (or perhaps to 0 for KEYROW or PAUSEs ?). SuperBasic handles these, as does TURBO.

If necessary, I could declare a CONsole device channel, and add hashes# to all relevant keywords. No problem.

But under QDOS, CURSOR must be channel one, offset from Main screen at 0,0, so I will investigate to see if I can set a channel number?

That is necessary for backwards system compatibility, a requirement for multi-system use !

When I get the results, or if anyone can answer beforehand, I will report back.

Regards, Steve.
CURSOR with 5 parameters only works on Minerva and SBASIC if I remember correctly - Simon Goodwin's bugs lists does discuss the issue and how to work around it, though it does require a fudge whereby you swap default channel IDs or something like that. Not looked to check, I think QDOS before launch was meant to have an USE command to set default window channel number, though it got dropped. I think Simon implemented something similar.

In addition to Derek's request, I'd like it to work on high resolution screens, necessitating adding something like

wide% = 512 : high% = 256
v$ = VER$
IF v$ = 'HBA' THEN wide% = SCR_XLIM : high% = SCR_YLIM
SCALE high%-1,0,0

If you need to work out the number of horizontal points to detect the number of graphics co-ordinates to work out where the right of the screen is likely to be, use something like:

vertical_scale = high%
hor_scale = wide%/(1.35*high%/vscl)

that would cope with cases where the vertical scale is not equivalent to the number of pixels.

Nice work on this Steve, getting better with each version.


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

Re: Doodle

Post by stevepoole »

Hi Derek & Dilwyn,

The next version, modified with a CONsole (#3) works fine under SMSQ/E, but fails under QDOS as CURSOR#n won't work (even n=1)...

So I am somewhat loathe to issue it. Is it really useful to declare CONsole channels ? And what channel number should be chosen ?

Not being familiar with other screen sizes than 512x256, I will look into Dilwyn's suggestions tomorrow afternoon. Interesting...

I note that I issued the last version using the same number...4 as the previous one. (A mix up caused by tweaking using several computers).
I hope you overwrote the older version 4.... Sorry about that... I will be more careful in future.

Regards Steve.


Post Reply