Some of you have a snow-effect routine for VIC-20 similar to this video (starting from minute 0:38)? It can be in BASIC or machine language. I tried to do it in BASIC but the final effect doesn't satisfy me.
Thanks in advance and good weekend everyone!
I need a snowfall effect
Moderator: Moderators
-
- Vic 20 Hobbyist
- Posts: 128
- Joined: Sun Dec 26, 2010 1:51 pm
Re: I need a snowfall effect
this is basically just a scrolling effect. In ML it would look like.
then before each run through the loop you add a snow flake to the top row on a random column, decrement a counter, and when that counter is depleted, increase the number of snowflakes added each iteration.
The snow gathering is actually done before the loop. Run a small loop looking at the second to bottom row checking for a snowflake, then change the graphics below to a line. It seems like after that the program is cheating a little. After a certain amount of time it looks to me that the gathering of snow looks like it doesn't care about if a snowflake hits it, it just slowly randomly thickens the line. The hilly edges of the screen look to me like sprites as you can't get that curve with PETSCII alone. Of course the C= logo and the snow gathering on that are sprites as well.
Code: Select all
screen_width = 22
.loop
ldx #21
lda screen+(screen_width*20),x
sta screen+(screen_width*21),x
lda screen+(screen_width*19),x
sta screen+(screen_width*20),x
....
lda screen+(screen_width),x
sta screen+(screen_width*1),x
dex
bpl .loop
The snow gathering is actually done before the loop. Run a small loop looking at the second to bottom row checking for a snowflake, then change the graphics below to a line. It seems like after that the program is cheating a little. After a certain amount of time it looks to me that the gathering of snow looks like it doesn't care about if a snowflake hits it, it just slowly randomly thickens the line. The hilly edges of the screen look to me like sprites as you can't get that curve with PETSCII alone. Of course the C= logo and the snow gathering on that are sprites as well.
- saver71
- Vic 20 Hobbyist
- Posts: 105
- Joined: Tue Mar 17, 2009 12:16 pm
- Location: Sassari, Italy
- Occupation: Networker
Re: I need a snowfall effect
Thank you. However, I finally decided to do the program without a snowfall effect. You can download it here. It will however be useful for future programs. Thanks again, and happy Sunday. 
