A simple scrolly bouncy demo

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Post Reply
Shaun_B
Posts: 474
Joined: Wed Apr 22, 2009 10:22 am

A simple scrolly bouncy demo

Post by Shaun_B »

Here's a little BASIC demo that I wrote while messing about.

[EDIT] Version 1.1 is a bit better again I think.
[EDIT] Version 1.1a is further improved ;-)

Happy zXmas!

Thanks,

Shaun.
Attachments
ZXMAS_v1.1a.P
(1.96 KiB) Downloaded 251 times
ZXMAS_v1.1.P
(1.91 KiB) Downloaded 254 times
ZXMAS.P
A bouncy scrolly thingy
(1.54 KiB) Downloaded 266 times
Last edited by Shaun_B on Thu Dec 21, 2017 8:21 pm, edited 2 times in total.
User avatar
Paul
Posts: 1511
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: A simple scrolly bouncy demo

Post by Paul »

Thanks for the demo.
It works great in ZedEx on my android phone.
In theory, there is no difference between theory and practice. But, in practice, there is.
Shaun_B
Posts: 474
Joined: Wed Apr 22, 2009 10:22 am

Re: A simple scrolly bouncy demo

Post by Shaun_B »

Thanks Paul.

I'm going to see if I can make a reasonable snowfall-type effect with BASIC, but perhaps it is not possible.

Regards,

Shaun.
Shaun_B
Posts: 474
Joined: Wed Apr 22, 2009 10:22 am

Re: A simple scrolly bouncy demo

Post by Shaun_B »

I've made a slight improvement to the listing; in line 6, the cursor is re-positioned to the start of the line so that when line 3 fires (to clear the scrolly), it's already in the correct place. I think this makes for a slightly better frame rate as well. See below:
zx81-listing.png
zx81-listing.png (2.11 KiB) Viewed 4412 times
Regards,

Shaun.
Becky
Posts: 21
Joined: Tue Aug 25, 2015 9:41 pm

Re: A simple scrolly bouncy demo

Post by Becky »

That's really impressive. I would have thought it would be slower than that.

Becky.
2x ZX81 / 2xZ88 / Spectrum 48K / Spectrum+ / Spectrum +2 (Grey) / Spectrum +3
Harlequin Rev G
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: A simple scrolly bouncy demo

Post by sirmorris »

I'm pleased that someone's giving the old BASIC ROM some lovin'! Keep it up Shaun :D

Is there some benefit to PRINTing AT 0+Y rather than just Y? There is a number parse and addition there that you don't have to do or so it seems to me.
Shaun_B
Posts: 474
Joined: Wed Apr 22, 2009 10:22 am

Re: A simple scrolly bouncy demo

Post by Shaun_B »

sirmorris wrote: Thu Dec 21, 2017 4:37 pm I'm pleased that someone's giving the old BASIC ROM some lovin'! Keep it up Shaun :D

Is there some benefit to PRINTing AT 0+Y rather than just Y? There is a number parse and addition there that you don't have to do or so it seems to me.
No, you're right, dumb mistake! It may be removed to save probably some processor t-states.

Regards,

Shaun
Post Reply