Happy New Year!

A place to discuss general QL issues.
User avatar
Cristian
Super Gold Card
Posts: 667
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Happy New Year!

Postby Cristian » Tue Dec 31, 2019 2:38 pm

Code: Select all

100 REMark  ------------------
110 REMark |  HAPPY NEW YEAR  |
120 REMark |  by  CRX (2019)  |
130 REMark  ------------------
140 :
150 MODE 8: WINDOW 512,256,0,0: PAPER#0,0: CLS#0: PAPER 0: CLS
160 REPeat fire
170    LET X=0: Y=0: incr=RND(-2 TO 2)
180    SCALE 256,-RND(90 TO 288),0
190    INK 1,0,1
200    FOR n=1 TO RND(10 TO 25)
210        LET oX=X: oY=Y
220        X=X+incr: Y=Y+RND(5 TO 80)/n
230        LINE oX,oY TO X,Y
240    END FOR n
250    CSIZE#0, 3,1: INK#0, RND(2 TO 7)
260    AT#0, 0,8: PRINT#0,"HAPPY 2020!!": CSIZE#0, 0,0
270    BEEP 6700,3,99,RND(44 TO 99),1,1
280    boom 255
290    boom 0
300 END REPeat fire
310 :
320   DEFine PROCedure boom (col)
330      FOR ray=1 TO RND(50 TO 130)
340          INK RND(col)
350          LINE X,Y TO RND(X-77 TO X+77),RND(Y-66 TO Y+66)
360      END FOR ray
370   END DEFine boom


Derek_Stewart
QL Wafer Drive
Posts: 1599
Joined: Mon Dec 20, 2010 11:40 am
Location: Runcorn, Cheshire, UK

Re: Happy New Year!

Postby Derek_Stewart » Tue Dec 31, 2019 3:29 pm

Excellent,

I copied this into SMSQmulator and it ran great...


Regards,

Derek
User avatar
Peter
Aurora
Posts: 954
Joined: Sat Jan 22, 2011 8:47 am

Re: Happy New Year!

Postby Peter » Tue Dec 31, 2019 4:21 pm

Same on Q68 ;) Happy new year!


User avatar
NormanDunbar
Aurora
Posts: 831
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Happy New Year!

Postby NormanDunbar » Tue Dec 31, 2019 4:27 pm

Happy 2020 everyone.

Cheers,
Norm.


Why do they put lightning conductors on churches?
If at first you don't succeed, don't take up skydiving!
If you think your job is pointless, remember, there's someone in Germany who fits indicators to BMWs.
User avatar
tofro
QL Wafer Drive
Posts: 1781
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Happy New Year!

Postby tofro » Tue Dec 31, 2019 4:40 pm

Happy new decade to everyone!

Tobias

PS: On QPC2, your program is more a machine gun than fireworks, but still much more eco-friendly than the real thing ;)


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Derek_Stewart
QL Wafer Drive
Posts: 1599
Joined: Mon Dec 20, 2010 11:40 am
Location: Runcorn, Cheshire, UK

Re: Happy New Year!

Postby Derek_Stewart » Tue Dec 31, 2019 4:44 pm

Hi,

Just been trying the programme on all my QL computer systems...

It does seem work best on the Q68...


Regards,

Derek
User avatar
pjw
Super Gold Card
Posts: 577
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Happy New Year!

Postby pjw » Tue Dec 31, 2019 5:18 pm

Youve done it again! :)
I took the liberty to "fix up" your program a little (sorry), to cater to larger screens and faster computers.
This one should be EXed on some SMSQ/E platform:

Code: Select all

10 REMark  ------------------
11 REMark |  HAPPY NEW YEAR  |
12 REMark |  by  CRX (2019)  |
13 REMark |       V QPC      |
14 REMark  ------------------
15 :
16 ch = FOPEN('con')
17 xs% = SCR_XLIM(#ch): ys% = SCR_YLIM(#ch)
18 cx% = (xs% - 240) / 2: cy% = ys% - 40
19 tm% = 10: REMark Set timeout
20 MODE 8: CSIZE#ch; 3,1
21 WINDOW#ch; xs%, ys%, 0,0: PAPER#ch; 0: CLS#ch
22 REPeat fire
23    LET X=0: Y=0: incr=RND(-2 TO 2)
24    SCALE#ch; 256,-RND(90 TO 288),0
25    INK#ch; 1,0,1
26    FOR n=1 TO RND(10 TO 25)
27        LET oX=X: oY=Y
28        X=X+incr: Y=Y+RND(5 TO 80)/n
29        LINE#ch; oX,oY TO X,Y
30    END FOR n
31    INK#ch, RND(2 TO 7)
32    CURSOR#ch; cx%, cy%
33    PRINT#ch,"HAPPY 2020!!"
34    BEEP 6700,3,99,RND(44 TO 99),1,1
35    boom 255
36    boom 0
37    IF CODE(INKEY$(#ch; tm%)) = 27: EXIT fire
38 END REPeat fire
39 :
40   DEFine PROCedure boom (col)
41      FOR ray=1 TO RND(50 TO 130)
42          INK#ch; RND(col)
43          LINE#ch; X,Y TO RND(X-77 TO X+77),RND(Y-66 TO Y+66)
44      END FOR ray
45   END DEFine boom


Per
Be wary of large West-Coast corporations bearing gifts!
- Ancient Trojan proverb
User avatar
SinclairSociety
Over Heated PSU
Posts: 133
Joined: Fri Feb 22, 2019 6:17 pm

Re: Happy New Year!

Postby SinclairSociety » Tue Dec 31, 2019 6:35 pm

Happy 2020 to you all.

I hope to be knee deep in QL goodness in 2020!

TJ


Sinclair Computers are AWESOME!!
User avatar
vanpeebles
Commissario Pebbli
Posts: 2235
Joined: Sat Nov 20, 2010 7:13 pm
Location: North East UK

Re: Happy New Year!

Postby vanpeebles » Tue Dec 31, 2019 9:00 pm

Happy New Year everyone! :)


User avatar
vanpeebles
Commissario Pebbli
Posts: 2235
Joined: Sat Nov 20, 2010 7:13 pm
Location: North East UK

Re: Happy New Year!

Postby vanpeebles » Wed Jan 01, 2020 12:13 am

QL 2020!



Who is online

Users browsing this forum: No registered users and 8 guests