Doodle - the firefly

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

Doodle - the firefly

Post by stevepoole »

Hi,
Here is a covid doodle....
Steve.
fly_bas.zip
(540 Bytes) Downloaded 111 times


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

Re: Doodle - the firefly

Post by dilwyn »

Nice little program, Steve. Love the way it erases its own trails. Has potential to be a screen saver app for use with Cuedark, for example.

My only point of feedback is that in the interests of readability, the multi-line IF would have its END IF from line 290 on a separate line. I only spotted it because I indented the bits in the loop to look at how it worked. However, the program is so short, doesn't matter in the slightest!

Nice work - keep up the doodling!


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

Re: Doodle - the firefly

Post by stevepoole »

popit_bas.zip
(1.51 KiB) Downloaded 94 times
Hi Dilwyn and All,

I have modified the firefly routine to make a much more interesting screen-saver program called POPit_bas.

Just LRUN it and the firefly flits around the screen popping floating bubbles as it goes. (Tested OK on SGC_qdos, SGC_smsq and QPC2).
At the bottom left you see a timer countdown. At the end you get the percentage of time taken to popem all. The fly mail fail to get them all !

Variables you may wish to alter, memory permitting : S size of bubble : N number of bubbles : TOPP of countdown list (for memory size).
You may wish to modify the program so that the fly trail array T() is a rotating stack. That would save a lot of memory...

Best Wishes,
Steve.

-----------
popit_bas.zip
(1.51 KiB) Downloaded 94 times


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

Re: Doodle - the firefly

Post by stevepoole »

Hi everybody,

Just been doing some average statistics on forum listings :

For each zipped program offered, there are 454 views, 3 replies and 19 downloads.

In view of the fact that some people may view repeatedly, it is likely that only one out of 15 viewers download programs.

What programs do the 14 other viewers use on their QL systems ?

Or what type of programs would be welcome ?

Regards,
Steve.
___________________________________________________


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

Re: Doodle - the firefly

Post by Derek_Stewart »

Hi Steve,

The variable in Line 210: qx is used by Qliberator Keywaord QX to execute Qliberatred compiled executables.

I loaded popit_bas in to QD and rename all occurances of qx to qx1 and to programme works perfectly.

You just have be carefull with exiting variablesnames


Regards,

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

Re: Doodle - the firefly

Post by Derek_Stewart »

stevepoole wrote:Hi,
Here is a covid doodle....
Steve.

fly_bas.zip
H Steve,

Can you produce a version with no GOTOs in?


Regards,

Derek
User avatar
Chr$
QL Wafer Drive
Posts: 1313
Joined: Mon May 27, 2019 10:03 am
Location: Sachsen, Germany
Contact:

Re: Doodle - the firefly

Post by Chr$ »

stevepoole wrote:
In view of the fact that some people may view repeatedly, it is likely that only one out of 15 viewers download programs.

What programs do the 14 other viewers use on their QL systems ?

Or what type of programs would be welcome ?
I have a feeling that a lot of the views/download figures are probably skewered by bots crawling the pages and also downloading everything they find. For short _bas files you could also just display the whole thing to copy and paste within code brackets:

Code: Select all

Within one of these boxes


https://QXL.WIN
Collector of QL related computers, accessories and QL games/software.
Ask me about felt pads - I can cut them to size and they have proved excellent for mdv data recovery.
stevepoole
Super Gold Card
Posts: 715
Joined: Mon Nov 24, 2014 2:03 pm

Re: Doodle - the firefly

Post by stevepoole »

Hi Derek and All,

Here is the program modified as you requested.

I hope it now runs OK on all QL systems...

Best Wishes,

Steve.
popit2_bas.zip
(1.54 KiB) Downloaded 94 times


EmmBee
Trump Card
Posts: 240
Joined: Fri Jan 13, 2012 5:29 pm
Location: Kent

Re: Doodle - the firefly

Post by EmmBee »

stevepoole wrote:
What programs do the 14 other viewers use on their QL systems ?

Or what type of programs would be welcome ?

Regards,
Steve.
Hi all,

Over the past six months, I have been developing software that takes a loaded QL S*BASIC program and adds in code to allow the production of a tracking report. The output would be a file detailing on a procedure/function bases the parameters passed. In practice, this has turned out to be rather complicated. My code has grown to 50 kb.

Trying this out on Steve’s code, the outcome was a report of 60 kb. However, on a subsequent run, this finished almost immediately and produced the following report ..

Code: Select all

#   240 get_dots 
#   310   coords 1
#   310   dot -1, 38, 44, 36, 6, 1
#   610   dot , 38, 44, 36, ,  ENDDEF
#   240 get_dots 
#   310   coords 1
#   310   dot -1, 238, 109, 36, 6, 1
#   610   dot , 238, 109, 36, ,  ENDDEF
#   240 get_dots 
#   310   coords 1
#   310   dot -1, 291, 125, 36, 6, 1
#   610   dot , 291, 125, 36, ,  ENDDEF
#   250 move_fly 
#   650   nudge_dot 
#  1060     dot -1, 38, 44, 36, 6, 1
#   610     dot , 38, 44, 36, ,  ENDDEF
#  1070     dot -1, 48, 54, 36, 6, 1
#   610     dot , 48, 54, 36, ,  ENDDEF
#  1060     dot -1, 238, 109, 36, 6, 1
#   610     dot , 238, 109, 36, ,  ENDDEF
#  1070     dot -1, 238, 119, 36, 6, 1
#   610     dot , 238, 119, 36, ,  ENDDEF
#  1060     dot -1, 291, 125, 36, 6, 1
#   610     dot , 291, 125, 36, ,  ENDDEF
#  1070     dot -1, 291, 115, 36, 6, 1
#   610     dot , 291, 115, 36, ,  ENDDEF
# Error -4 at 830 value out of range
###############
I cannot find anywhere on the final line of “ Error -4 at 830 value out of range” would apply. It could well be there is nothing wrong with Steve’s program, although XREF does report five variables that give rise to problematic events.

It does look like I will have to review my code. I am in the final throws of tidying this up. This piece could be of use in checking one’s code or tracking down bugs.

EmmBee


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

Re: Doodle - the firefly

Post by stevepoole »

Hi EmmBee,

Having verified my code, I wonder what sort of 'range' your tracker is checking ?

My variable values are valid to keep the graphics on screen, as is the channel zero position to print to, on line 830 of popit2_bas...

I hope you find out exactly what is being reported, as your code project could be very useful indeed.

Keep up the good work !

Steve.


Post Reply