Page 1 of 1

Who is up for a 1K BASIC challenge?

Posted: Sun Dec 24, 2017 5:45 pm
by Shaun_B
I thought it'd be fun to post your 1K listings here - I made my bouncy scrolly text work in 1K, as follows:

Code: Select all

    3 LET Y=Y+X
    4 IF NOT Y OR Y>PI+PI THEN LET X=-X
    5 PRINT AT Y,NOT PI;S$;A$( TO CODE "4");S$
    6 LET A$=A$(VAL "2" TO )+A$(SGN PI)
    7 GOTO PI
 9998 SAVE "1K"
 9999 GOTO SGN PI
A$ is used for the scrolly text string; to save byte, enter this in direct mode, like:

Code: Select all

 LET A$="MERRY CHRISTMAS TO ALL WWW.SINCLAIRZXWORLD.COM FREQUENTERS :-)   "
I have tested up to 67 characters and I'm sure more will be possible.

You will also need the S$ variable to clear the scrolly text above and below as it moves. Again, using direct mode, type:

Code: Select all

 LET S$="                                "
Finally, set and X and Y variables:

Code: Select all

 LET Y=SGN PI
 LET X=Y
When you're happy, type GOTO 9998 and we're all good.

Regards,

Shaun.

Re: Who is up for a 1K BASIC challenge?

Posted: Sun Dec 24, 2017 9:13 pm
by Shaun_B
I was thinking about having a snowfall-type effect, does anyone think this is possible on the unexpanded machine?

Thanks,

Shaun.

Re: Who is up for a 1K BASIC challenge?

Posted: Sun Dec 24, 2017 10:41 pm
by Shaun_B
Here's my starter for 10... supposedly a snow-fall type effect. Maybe not.
Edit: new revision here -
SNOW.P
(422 Bytes) Downloaded 158 times
Will anyone do better?

Regards,

Shaun.

Re: Who is up for a 1K BASIC challenge?

Posted: Fri Dec 29, 2017 8:24 pm
by dr beep
I will skip the BASIC since I can do much more in 1K in machinecode.
Even some kind of pixelwise snowingeffect in hires.
(See facebook my firework demo, the routine could be used for snoweffect too)

Re: Who is up for a 1K BASIC challenge?

Posted: Wed Jan 31, 2018 3:02 am
by vwbz80a
Shaun_B wrote:
Sun Dec 24, 2017 10:41 pm
Here's my starter for 10... supposedly a snow-fall type effect. Maybe not.
Edit: new revision here - SNOW.P
Will anyone do better?

Regards,

Shaun.
later than you think----- just now---- got it running in emu yea
:D :D :D :D

Re: Who is up for a 1K BASIC challenge?

Posted: Wed Jan 31, 2018 10:23 am
by PokeMon
Hmm why not let rain sausages ? :lol:

Re: Who is up for a 1K BASIC challenge?

Posted: Wed Jan 31, 2018 2:22 pm
by vwbz80a
PokeMon wrote:
Wed Jan 31, 2018 10:23 am
Hmm why not let rain sausages ? :lol:
:lol: