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: 410
Joined: Wed Apr 22, 2009 10:22 am

A simple scrolly bouncy demo

Post by Shaun_B » Wed Dec 20, 2017 10:31 pm

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 26 times
ZXMAS_v1.1.P
(1.91 KiB) Downloaded 27 times
ZXMAS.P
A bouncy scrolly thingy
(1.54 KiB) Downloaded 38 times
Last edited by Shaun_B on Thu Dec 21, 2017 8:21 pm, edited 2 times in total.

User avatar
Paul
Posts: 947
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: A simple scrolly bouncy demo

Post by Paul » Thu Dec 21, 2017 7:00 am

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: 410
Joined: Wed Apr 22, 2009 10:22 am

Re: A simple scrolly bouncy demo

Post by Shaun_B » Thu Dec 21, 2017 10:23 am

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: 410
Joined: Wed Apr 22, 2009 10:22 am

Re: A simple scrolly bouncy demo

Post by Shaun_B » Thu Dec 21, 2017 11:02 am

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 532 times
Regards,

Shaun.

Becky
Posts: 18
Joined: Tue Aug 25, 2015 9:41 pm

Re: A simple scrolly bouncy demo

Post by Becky » Thu Dec 21, 2017 4:07 pm

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

Becky.
2x ZX81/ 2xZ88 / Spectrum+ / Spectrum +2 (Grey) / Spectrum +3

sirmorris
Posts: 2813
Joined: Thu May 08, 2008 5:45 pm

Re: A simple scrolly bouncy demo

Post by sirmorris » 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.

Shaun_B
Posts: 410
Joined: Wed Apr 22, 2009 10:22 am

Re: A simple scrolly bouncy demo

Post by Shaun_B » Thu Dec 21, 2017 5:23 pm

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