First Spear Posted March 31, 2017 Share Posted March 31, 2017 (edited) Question for Those Smarter Than Me : How could a full-creek rain effect me done, graphically? I am thinking of diagonally-falling rain drops. With the tile and shape limits, I am not sure how it could be done at all. Purely an academic question, I have no practical need for it. Edited August 17, 2017 by First Spear 1 Quote Link to comment Share on other sites More sharing options...
catsfolly Posted March 31, 2017 Share Posted March 31, 2017 (edited) Question for Those Smarter Than Me : How could a full-creek rain effect me done, graphically? I am thinking of diagonally-falling rain drops. With the tile and shape liwmits, I am not sure how it could be done at all. Purely an academic question, I have no practical need for it. Whilst we wait for those smart people to show up, I'll try some diagonal rain brainstorming... 1. The most straightforward way to do rain would be to use the motion objects. Of course this means that you could only have 8 raindrops at a time. (Unless you multiplex the objects - that would cause them to flicker, which might be okay for raindrops. ) The big problem is that you usually need the motion objects for other things - like player characters and enemies and shots and explosions... 2. If you have blank background characters, you could assign them to a gram character, and draw new rain animation frames every interrupt to the gram character. If you have a genius graphics designer (or just work on it for a ridiculously long time), you could maybe design the animation so that the raindrops exiting the gram character at the end of the animation match up with raindrops entering the character at the start of the animation - that way the animation will "tile" over several backtab characters. You can set the motion object priority so these backtab drops appear on top of the motion objects. 3. If your background is full of custom characters, you can try adding an animation (like in step 2 above) to each gram card. Then the rain will be on top of the graphics (of course it will be the same color as whatever is in the gram card). Since you can only write about 20 gram cards per interrupt, this could only work for simple backgrounds. 4. If you loosen the connections between the Intellivision and your tv, you can sometimes get a "snow" effect. It's not rain, though... (nor is it diagonal)... That's all I can think of at the moment... COME ON SMART PEOPLE! Catsfolly Edited March 31, 2017 by catsfolly 1 Quote Link to comment Share on other sites More sharing options...
catsfolly Posted March 31, 2017 Share Posted March 31, 2017 Here are some simple experiments, so people have something to criticize: 1. A single dot animated (click to animate) : 2. 2 dots in a line (click to animate): 3. A separate dot moves at a different speed (click to animate): Here is the source code: r.bas Catsfolly 4 Quote Link to comment Share on other sites More sharing options...
mmarrero Posted March 31, 2017 Share Posted March 31, 2017 My attempt at rain looks more like 2 extra weeks of winter. I'm also redefining a single card, but using a giant bitmap instead of real animation. '--rain2 by Marco A. Marrero include "constants.bas" DIM rain,#i,j GOTO init '------ 'cls/w card, destroys #i,j DEF FN CLSC(colorcard) = #i=colorcard:GOSUB CLSC_ CLSC_: PROCEDURE FOR j=0 TO BACKGROUND_COLUMNS*BACKGROUND_ROWS -1 #BACKTAB(j)=#i NEXT j END '----- init: 'clsc(SPR00 + FG_BLUE) '--rain clsc(SPR00 + FG_WHITE) '--rain FOR j=0 to 3 '--I'm using GROM cards, I have to multiply by 8 to convert IntyBasic strings to card SPRITE j, 54+j*16 + VISIBLE + ZOOMX2, 40 + ZOOMY4, RainText(j)*8 + SPR_CYAN SPRITE j+4, 52+j*16 + VISIBLE + ZOOMX2, 42 + ZOOMY4, RainText(j)*8 + SPR_BLUE + BEHIND NEXT j mainloop: rain=(rain - 1) AND $7 DEFINE 0,1,VARPTR RainBitmap(rain) FOR j=0 to 6:WAIT:NEXT j GOTO mainloop 'RainText: DATA "Rain" RainText: DATA "Snow" RainBitmap: BITMAP " " '0 BITMAP " " '1 BITMAP " " '2 BITMAP " x " '3 BITMAP " x" '4 BITMAP " " '5 BITMAP " " '6 BITMAP " x " '7 BITMAP " x " '8 BITMAP " " '9 BITMAP " " 'A BITMAP " x " 'B BITMAP " x " 'C BITMAP " " 'D BITMAP " " 'E BITMAP " " 'F BITMAP " " '10 BITMAP " " '11 4 Quote Link to comment Share on other sites More sharing options...
Rev Posted March 31, 2017 Share Posted March 31, 2017 My attempt at rain looks more like 2 extra weeks of winter. rain2.gif I'm also redefining a single card, but using a giant bitmap instead of real animation. '--rain2 by Marco A. Marrero include "constants.bas" DIM rain,#i,j GOTO init '------ 'cls/w card, destroys #i,j DEF FN CLSC(colorcard) = #i=colorcard:GOSUB CLSC_ CLSC_: PROCEDURE FOR j=0 TO BACKGROUND_COLUMNS*BACKGROUND_ROWS -1 #BACKTAB(j)=#i NEXT j END '----- init: 'clsc(SPR00 + FG_BLUE) '--rain clsc(SPR00 + FG_WHITE) '--rain FOR j=0 to 3 '--I'm using GROM cards, I have to multiply by 8 to convert IntyBasic strings to card SPRITE j, 54+j*16 + VISIBLE + ZOOMX2, 40 + ZOOMY4, RainText(j)*8 + SPR_CYAN SPRITE j+4, 52+j*16 + VISIBLE + ZOOMX2, 42 + ZOOMY4, RainText(j)*8 + SPR_BLUE + BEHIND NEXT j mainloop: rain=(rain - 1) AND $7 DEFINE 0,1,VARPTR RainBitmap(rain) FOR j=0 to 6:WAIT:NEXT j GOTO mainloop 'RainText: DATA "Rain" RainText: DATA "Snow" RainBitmap: BITMAP " " '0 BITMAP " " '1 BITMAP " " '2 BITMAP " x " '3 BITMAP " x" '4 BITMAP " " '5 BITMAP " " '6 BITMAP " x " '7 BITMAP " x " '8 BITMAP " " '9 BITMAP " " 'A BITMAP " x " 'B BITMAP " x " 'C BITMAP " " 'D BITMAP " " 'E BITMAP " " 'F BITMAP " " '10 BITMAP " " '11 Snow? Now we're talkin! 2 Quote Link to comment Share on other sites More sharing options...
+nanochess Posted April 10, 2017 Share Posted April 10, 2017 Ok, I've heard the call of catsfolly I've decided to work in the basis of rain columns, the first try was too fast, it looked more like road lines, so after a little experimentation I've discovered it looks better if you can see the line "falling" The animation for rain lines is using GRAM redefinition, the lines could be made longer possibly looking better, currently the streak is 4 rows and repeated. There is a random number chance to draw a different column with the line in different position. I've made a tiny forest in the background using MOBs with palm trees and priority bit enabled, it doesn't look like palm trees, so it's a forest The lightning was a small last minute add-on. The GIF loses a lots of frames, it's better in emulator. (click to animate) rain.bas 7 Quote Link to comment Share on other sites More sharing options...
First Spear Posted April 10, 2017 Author Share Posted April 10, 2017 Of course, now I need to ask about the lightning effect. You're not really drawing anything, just making the screen flash with a MODE trick. Can you explain how that works? And thanks to you and Catsfolly and Mmarmero for the rain ideas! Ok, I've heard the call of catsfolly I've decided to work in the basis of rain columns, the first try was too fast, it looked more like road lines, so after a little experimentation I've discovered it looks better if you can see the line "falling" The animation for rain lines is using GRAM redefinition, the lines could be made longer possibly looking better, currently the streak is 4 rows and repeated. There is the chance to draw a different column with the line in different position. I've made a tiny forest in the background using MOBs with palm trees and priority bit enabled, it doesn't look like palm trees, so it's a forest The lightning was a small last minute add-on. The GIF loses a lots of frames, it's better in emulator. (click to animate) mvi_0010.gif 1 Quote Link to comment Share on other sites More sharing options...
+nanochess Posted April 10, 2017 Share Posted April 10, 2017 Of course, now I need to ask about the lightning effect. You're not really drawing anything, just making the screen flash with a MODE trick. Can you explain how that works? And thanks to you and Catsfolly and Mmarmero for the rain ideas! In Color Stack mode there is always a background color choosen from one of 4 values, but if you don't use the Advance bit then it's a single color. So switching the colors makes a great lightning effect. The cycling for lightning is 1-7-0-7 with each color changed every 2 frames. 4 Quote Link to comment Share on other sites More sharing options...
Kiwi Posted April 12, 2017 Share Posted April 12, 2017 This my attempt. I wanted to see how much a 16 height MOB at maximum size fills the screen. I'm multiplexing 2 sprites to fill the screen since the game reserved 1 sprite for the main char and 5 sprites for the various object like enemies. gifeo Here's the code how it works. if MagicID=4 AND MP>=magicdrain then MP=MP-magicdrain MagicX=20 MagicY=16 MagicX2=80 gosub DrawMP for x=0 to 200 sprite 1,$600+MagicX,$0380+MagicY,$1971 sprite 2,$600+MagicX2,$0380+MagicY,$1971 i=x%32 if i=0 then define 46,2,MagicStarRain0 if i=4 then define 46,2,MagicStarRain1 if i=8 then define 46,2,MagicStarRain2 if i=12 then define 46,2,MagicStarRain3 if i=16 then define 46,2,MagicStarRain4 if i=20 then define 46,2,MagicStarRain5 if i=24 then define 46,2,MagicStarRain6 if i=28 then define 46,2,MagicStarRain7 i=x%4 if i=0 then MagicX=10:MagicX2=90 if i=1 then MagicX=30:MagicX2=110 if i=2 then MagicX=50:MagicX2=130 if i=3 then MagicX=70:MagicX2=150 wait next x MagicX=0 MagicY=0 MagicX2=0 x=15:i=0:gosub MagicHitAt x=15:i=1:gosub MagicHitAt x=15:i=2:gosub MagicHitAt x=15:i=3:gosub MagicHitAt x=15:i=4:gosub MagicHitAt end if 3 Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted April 24, 2017 Share Posted April 24, 2017 Ok, I've heard the call of catsfolly I've decided to work in the basis of rain columns, the first try was too fast, it looked more like road lines, so after a little experimentation I've discovered it looks better if you can see the line "falling" The animation for rain lines is using GRAM redefinition, the lines could be made longer possibly looking better, currently the streak is 4 rows and repeated. There is a random number chance to draw a different column with the line in different position. I've made a tiny forest in the background using MOBs with palm trees and priority bit enabled, it doesn't look like palm trees, so it's a forest The lightning was a small last minute add-on. The GIF loses a lots of frames, it's better in emulator. (click to animate) mvi_0010.gif I get an assembler error: 0x50BA T2: ;[26] SPRITE c,$0708 + c * 20 + RANDOM(,$0288 + RANDOM(20) + 50,$2804+8*8 ; SRCFILE "rain.bas",26 ; macro must be non-empty, but a comment works fine. MVII #Q1,R0 asm/rain.asm:1701: ERROR - undefined symbol Q1 Quote Link to comment Share on other sites More sharing options...
catsfolly Posted April 24, 2017 Share Posted April 24, 2017 I get an assembler error: 0x50BA T2: ;[26] SPRITE c,$0708 + c * 20 + RANDOM(,$0288 + RANDOM(20) + 50,$2804+8*8 ; SRCFILE "rain.bas",26 ; macro must be non-empty, but a comment works fine. MVII #Q1,R0 asm/rain.asm:1701: ERROR - undefined symbol Q1 It compiles fine for me. Are you by any chance using a version of Intybasic older than version 1.2.3 (the first version to allow an expression for a mob index)? The "c" variable is the only variable I see in that line... Catsfolly 1 Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted April 24, 2017 Share Posted April 24, 2017 It compiles fine for me. Are you by any chance using a version of Intybasic older than version 1.2.3 (the first version to allow an expression for a mob index)? The "c" variable is the only variable I see in that line... Catsfolly I am using the version available when I last updates the SDK. I'll confirm which one when I get home, just in case. Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted April 24, 2017 Share Posted April 24, 2017 It compiles fine but I get "Warning: label 'START_DEMO' defined but never used" using v1.2.8 2 Quote Link to comment Share on other sites More sharing options...
catsfolly Posted April 24, 2017 Share Posted April 24, 2017 (edited) It compiles fine but I get "Warning: label 'START_DEMO' defined but never used" using v1.2.8 Yeah, recent versions of IntyBasic give a lot of warnings if a label is defined but not actually referenced in the code. It's a little annoying, but sometimes it helps to find a bug. Generally I just put "rem" in front of my unused labels to get rid of the warnings, and then "unrem" them if I actually need them... Catsfolly Edited April 24, 2017 by catsfolly Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.