View Single Post
Old 22 October 2021, 15:03   #47
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by a/b View Post
Didn't think of that immediatelly, it's a really neat idea and quite logical. I was sure though it's some kind of incremental approach.
Now, I've been thinking a bit more about what I guessed earlier. Wouldn't that be even faster? If you are guaranteed a slope of 45 degress or less, then each column can only move 1 row up or down between consecutive frames. Meaning you can process the whole 16-pixel column in 1 or 2 blits, or... (!!) the entire screen in 2 blits if you use a dynamic mask as C (have two single row screen wide mask for each sine table entry, one for +1 and another for -1).
Well, this can work for some specific effect, but as Dan said for *very* limited sine speeds

Quote:
Originally Posted by DanScott View Post
Also if you are going to actually "scroll" the image right to left (rather than just sine a static image) then this also will increase max y deltas... and of course complicate how you actuall do the scroll (and bring in new data at the correct place on the right)
Of course this method works and is born for scrolling images, I have a version somewhere that does it even using a playfield made entirely of sprites
I went a bit crazy to calculate the positions so that the curve could be displayed without having more than 8 present on the screen on the same line but that covered all the x.
ross is offline  
 
Page generated in 0.04452 seconds with 11 queries