Folly_Quincunx

Anything QL Software or Programming Related.
User avatar
NormanDunbar
Forum Moderator
Posts: 2274
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Folly_Quincunx

Post by NormanDunbar »

Thanks Steve.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
pjw
QL Wafer Drive
Posts: 1300
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Folly_Quincunx

Post by pjw »

stevepoole wrote:<>
Yes, you got the correct output from the html file. The basic program has paused animated graphics. I have not yet found out how to do this in JavaScript.
Yes, the javascript version only displayed a single frame. I thought perhaps it was so fast that it went through 10,000 iterations in the blink of an eye, but I guess thats not it. The SuperBASIC version worked fine, though. I thought you might like the following modification:

Code: Select all

160   WINDOW scr_xlim,scr_ylim,0,0: PAPER 0: s=256
(Obviously only works when you have scr_xlim/Scr_ylim, and only makes a difference on larger screens..)
There is nothing in my quarantine box, and no sign of the email yet either.
Some ISPs, like gmail, are pretty aggressive in filtering out spam and presumed threats. Cant easily get anything binary or code-looking through without heavy subterfuge.


Per
dont be happy. worry
- ?
stevepoole
Super Gold Card
Posts: 715
Joined: Mon Nov 24, 2014 2:03 pm

Re: Folly_Quincunx

Post by stevepoole »

Hi Per,

The JavaScript file does indeed only display the graphics after ALL the frames have been calculated.

I think this is because html draws onto a 2nd screen in memory, and only swaps to the display when all frames finished ?

There is no PAUSE function I can find in JavaScript docs I have at my disposal.

Alert() functions are OK, except where alert()_popups overlay graphics on small screens, but are only a quirky fudge !

So the 'Pause Problem' needs to be adressed, if all QL programs are to be transcoded for tablets and smartphones...

Any suggestions ?

Steve.


User avatar
pjw
QL Wafer Drive
Posts: 1300
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Folly_Quincunx

Post by pjw »

stevepoole wrote:Hi Per,<>
Any suggestions ?
Sorry, no. But these guys may be able to help..


Per
dont be happy. worry
- ?
stevepoole
Super Gold Card
Posts: 715
Joined: Mon Nov 24, 2014 2:03 pm

Re: Folly_Quincunx

Post by stevepoole »

Hi again Per,

Many thanks for the link to the JavaScript tutorial website.

I found the animation pause function, 'setInterval(frame)', and now Kal4.html works just like the S*Basic version.

So here is the PC, Tablet & smartphone QL_Kaleidoscope 'screen-saver', to send as an email attatchment to friends.

Just unzip it and click on the kal4.html file to run it.

Regards,
Steve.
kal4.zip
(1.98 KiB) Downloaded 89 times


User avatar
Cristian
Aurora
Posts: 965
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Re: Folly_Quincunx

Post by Cristian »

stevepoole wrote:So I dug out an old S*Basic Kaleidoscope program I wrote
Steve, your kaleidoscope is very nice. Fascinating and hypnotic. Runs fine with real QL (JM+Trumpcard).
Instead of
INK RND(7)
I tried
INK RND(7),RND(7)
Best multicolor results on CRT display. Sometimes you may get transparency effects :-)
Nice result also in MODE 4


Post Reply