Jump to content
IGNORED

help with using missle for rain effect


grafixbmp

Recommended Posts

I am wanting to use one of the missle for a rain effect on the game screen where a random function will display the missle in diffrent locations on the screen as the screen is being drawn. For a good portion of the screen, I want to place the missle at 'n' location horizontaly on the screen and possibly do 3 multiples, then do this same location for about 4 to 6 scan lines and then randomly change the horizontal location and do the same untill the screen is finished being drawn. Then for the next frame, have the locations be diffrent untill the scene changes then the program will check if this effect is still needed for the next scene. This is using an asymetrical playing field btw and each scan line uses new playfield data too. I also was thinking about while the missle is being displayed for 4 to 6 scanlines, have it tilt gradualy in a particular direction (ya know like rain drops) This may be easier to do with both missle but I wanted to use the other one for more important things. I just wanted to come up with a good random equation to make it look reasonably good for each frame.

Link to comment
Share on other sites

You can do a search for a pseudo-random number generator here in the programming forums, or search for LFSR. And you can "tilt" the rain drops by hitting HMOVE on every line with a small value in HMM0 or HMM1, whichever you are using.

 

Completely repositioning the missiles every 4-6 scanlines is probably too much for what you want, though, it takes essentially an entire scanline, doing nothing else, to reposition an object...

 

Hmmm. Why don't you post your kernel code? Maybe something tricksy can be fit in. ;)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...