16 April 2010, 09:08 | #1 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Corkscrew scroller
Watcha boys.
I had that coding itch again over the last couple of days so I decided to have a proper go at making a corkscrew scroller. I thought about how it could be done for an hour or so, then I made a font for it (yawn! I *hate* making and converting fonts! ) and then I did the fun part and wrote the code and, as always, it's the fun part that's over with the quickest! I'm sure I'll put this effect into a more substantial intro / demo at some point but for now I hope you like it and that the code is useful to you - enjoy. EDIT: Source removed - modified and bug fixed version in a later post... Last edited by pmc; 19 April 2010 at 19:25. |
16 April 2010, 09:53 | #2 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Nice one
I guess you've been watching Photon's Corkscrew intro First time I saw it I couldn't understand how he could make a sinus scroller in 5 bitplanes run in full frame rate. It took me a while before I figured out how it was done. Pretty clever! |
16 April 2010, 10:32 | #3 | |||
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Quote:
Quote:
Quote:
I asked Photon about how he did it months back but he didn't tell me. His sinused corkscrew scroller is definitely the nicest one I've ever seen - really beautiful. |
|||
16 April 2010, 12:35 | #4 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
The colored wave is a wide, fixed background drawn in the 3 odd bitplanes and he just scrolls it across the screen by changing the bitplane pointers and fine scroll value, and the front and back of the letters making up the actual sinus scroller use the first 2 even bitplanes placed so they perfectly fit over the colored wave.
|
16 April 2010, 13:00 | #5 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Ah, OK - nice - thanks Leffman!
Obviously there's no straight lines there so the colouring on the letters can't be done the standard way (as per my scroller...) with the copper. I take it that the colours on the letters are also part of the background scrolled sinus wave and they either show through as "front" or "back" of the letters due to the combination of bitplane colours with the planes the "fronts" and "backs" of the letters are written into. That's really cool and, as you say, very clever. Props to Photon. I'd seen an earlier routine done by Altair (http://bitworld.bitfellas.org/demo.php?id=3126) that's nice but it's just a sinused corkscrew scroll minus the colourisation. Obviously they hadn't figured out that extra little bit of Photon magic that makes his version so much prettier. |
16 April 2010, 19:16 | #6 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,753
|
Yeah, that's the first one (I think?? I never saw it.) I was inspired by Slayer's, which added 3 bitplanes of shading, as Leffmann mentions. And also by his other cracktro scrollers. So I wanted to make him scratch HIS head. Planned placement of the color shades on the cylinder allowed putting a bar 'between' the front and back-facing text.
But apart from that, there's the time for wrapping a (25x15 I think) font, same as in the 'VHS swapping' advertisement in the demo, on a higher cylinder (I think Slayer's was 14-15px high and mine was 19) which requires another trick, to run at full framerate. Note also that spaces between characters are often skipped in 1px sine scrollers to save blits. So 2px space between characters saves 12.5% blit time(!) No, don't ask me exactly how it was done, I don't remember IIRC I sliced up the font and used deltavalues for the wave in some way. It's about time for a V2 of this effect I think Hmm... Slayer's one (and his super-slimy 'infinity loop scroller') cracktros don't seem to be on bitworld and pouet? Shame!! This must be remedied, I'll see if can find the disks... I remember they had Ron Klaren music and one spread 'Human Skeleton 1.0' for a 3D package. |
16 April 2010, 21:18 | #7 |
Junior Member
Join Date: Aug 2001
Location: France
Posts: 1,385
|
There's a nice cracktro with Ron Klaren music (Battle Squadron) on Bitworld with a nice scroller : Crash Land Cracktro and a variant Human Design Cracktro also with Battle Squadron music.
To finish a similar SineCrew Scroller Asm One and always a Ron Klaren music @PMC : Too bad you've not provide an Amiga Executable of your SineCrew Intro. |
16 April 2010, 21:35 | #8 | ||
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Quote:
That'd be quality. Quote:
PS. Forgot to say Frog - my routine isn't a sinus one - it's just a normal scroller that has the corkscrew effect on it... Last edited by pmc; 20 April 2010 at 19:25. Reason: clarity |
||
16 April 2010, 22:23 | #9 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,753
|
Ah, there they are, both of them. Just a sloppy search. I saw that there were stubs created, one called Kork Screw, and just assumed too much. Good
So the Slayer one is 14px high... phew, my statement wasn't a lie then pmc: you must also bend with modulo in the copper!! Much nicer Earlier I made this scroller for Rioter to use. (We were in BRAINS together and then he went to Powerlords and I went to Phenomena.) Note that I only take credit for the scroller (and maybe a little for the music...hehehe...) Actually Sinescrew is a very good term for the effect, much better than Corkscrewsinusscroller, hehe. Corkscrew is un-sined and sinescrew is with sine, with or without a bar in the middle it's the same effects. Even if I had to use a trick to go up in size it's still blitted sine-slices. And the bar is just a palette/cylinder arrangement. OK, /rant. It's just that I try to find good names for fx for the bitworld database, it's a bit of a hobby... |
16 April 2010, 22:48 | #10 |
Phone Homer
Join Date: Jun 2006
Location: 5150
Posts: 5,875
|
Checked it out pretty cool - whats next?
Time to get Retro again |
17 April 2010, 01:44 | #11 | ||
Junior Member
Join Date: Aug 2001
Location: France
Posts: 1,385
|
Quote:
So thanks for the executable Quote:
|
||
17 April 2010, 11:56 | #12 | |||
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Quote:
Quote:
Quote:
If I get an idea, I try to code it but I don't really plan it out too much. If you want more of my stuff that you might not have seen then you can find a few routines at: http://retro.untergrund.net/prods.html All Retro, all the time. |
|||
19 April 2010, 19:35 | #13 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Watcha chaps.
This is the fixed version of my corkscrew code: Fixed left hand side of screen downward copy bug. Fixed a bug that caused random shite to appear on the screen at certain increased screen widths. Added some more equates usage to make the code more readable. Widened diwstrt/diwstop/ddfstrt/ddfstop to make the scroller go across more of the screen. Stole () Photon's bplcon1 hardware scroll reg settings from his Powerlords corkscrew scroller cos they add a much prettier horizontal bend to the scroller than the ones I was originally using in mine. Source and .exe attached. Last edited by pmc; 03 June 2010 at 09:01. |
20 April 2010, 21:36 | #14 |
Junior Member
Join Date: Aug 2001
Location: France
Posts: 1,385
|
Excellent work.
Just one thing, the scroller could be better in overscan |
20 April 2010, 21:48 | #15 |
Zone Friend
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 424
|
Nice scroller! Reminds me of the first Amiga corkscrew done by Northstar.(http://bitworld.bitfellas.org/demo.php?id=1815)
Seems that the Altair scroller is a modified Northstar scroller. Last edited by NOB; 20 April 2010 at 21:57. |
20 April 2010, 22:23 | #16 | ||
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Quote:
The right side of the scroller goes across the border. I wonder, is there a way to stretch the left side of the scroller across the left screen border too...? I already stretched the visible screen data out to 352 pixels - anyone know the maximum? Quote:
I hadn't seen that Northstar demo before - the scroller in that is *really* beautiful. |
||
20 April 2010, 23:10 | #17 | |
Junior Member
Join Date: Aug 2001
Location: France
Posts: 1,385
|
Quote:
Personnaly this kind of scroll remind me some ATARI scrolltext like in the good old Cuddly Demo : http://www.stupiditiz.com/blabla/the...1989-atari-st/ Text in french but there's some YouTube Video, watch the 3rd one ! |
|
20 April 2010, 23:13 | #18 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
I must apologise for not understanding enough French to read your post Frog but the demo you posted the link to looked superb - the scroller in that one was cool!
|
21 April 2010, 21:20 | #19 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,753
|
Yeah, Crab's scroller is an early one and a looker. It wasn't a very uncommon effect early on, I have a vague memory of seeing it in an early cracktro by a famous group whose name escapes me. Whether it was before NS MD 2 I don't know. Maybe it was done by bending whole characters around a tube instead of char slices, not sure.
pmc, horizontal bending is with the scroll register, vertical bending with modulo. Why vertical bending? Well, if you were to write text on say a toilet paper roll and look at it, the parts of the chars that are near top and bottom of the roll will look more 'squeezed together'. For simplicity, let's say the off-screen height of the scrollbuffer is 181 pixels. When you bend it virtually, line 0 in the buffer should be facing straight up and 180th line straight down. Go from 0 to 180 degrees and calculate x and y in a circle with a diameter d that is equal to the height of the tube you want. Make an 'array' that has d values, and initialize it to all zeroes. For each y you calculate, compare it to what's in the xth array value and replace it if it's larger. When you're done you will have an array with a correct 'bulge'. To get the addresses of each line, start at the top address of the buffer and increment the pointer with the difference in bulge between two consecutive bulgevalues, times the bitplane width in bytes. You can use the addresses to set bitplane pointers, but subtracting the address from the previous address, and subtracting the bitplane width in bytes, you get the modulo values for a smaller copper. Overscan: I did test it a while ago and I think you can go $18-$e0 ("$e2"). I guess the simplest way to test is to "drag the anchors" in WB Overscan Prefs in WinUAE and invoke WinUAE's monitor and have a look at the registers or coppers. |
21 April 2010, 21:42 | #20 |
Registered User
Join Date: Jun 2008
Location: somewhere else
Posts: 545
|
I don't know why you keep calling that "corkscrew" scrollers, back then those were called tube scrollers and here are the original ones i think: http://pouet.net/prod.php?which=14564
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sine scroller | pmc | Coders. Tutorials | 95 | 02 July 2017 16:40 |
Sine scroller - dycp | blazeb | Coders. Asm / Hardware | 6 | 02 May 2012 10:08 |
2d side scroller/ platformer. | Conundrum | Looking for a game name ? | 3 | 27 December 2011 17:33 |
A space 2d multidirectional scroller | dabbler | Looking for a game name ? | 11 | 21 April 2010 06:48 |
Flickering sine scroller | pmc | Coders. Tutorials | 4 | 24 June 2009 09:19 |
|
|