30 April 2012, 07:16 | #1 |
Posts: n/a
|
Sine scroller - dycp
Howdy guys,
I used to dabble a little in 68000 assembly (on ocs ) back in early 90's when I was heavily into the scene... So I want to get back into coding and who knows, churn out a demo or two! Lol I have a list of routines that I want to code up but i'm already stuck. So my first dumb question is can can somebody explain to me how a dycp works? Not a dypp, I know with a dypp you break the scrollbuffer into 1 or 2 pixels.. But what is the technique for a whole char (say 1 word in width) 'sineing' across the screen. How does it differ? An example of this effect would be the VF Rog cracktro. Thanks in advance! |
30 April 2012, 10:11 | #2 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
If you can already code a standard sine scroller you can easily code a DYCP scroller too. Instead of blitting the char as 1 or 2 pixel wide stripes you just blit the whole char at once using the y-position from your sine table (or any other precalculated table with y positions).
Last edited by StingRay; 30 April 2012 at 10:15. Reason: Thought about wrong VF intro |
30 April 2012, 12:21 | #3 |
Registered User
Join Date: May 2004
Location: Somewhere secret
Age: 50
Posts: 366
|
Exactly as Sting said... make your Y-sine list, mul everything in it by <scrollplanewidth>, and blit them as entire chars (either shifting them or using h/w scrolling in conjunction, depends on what the rest of your demo is doing).
Also there is no reason to blit the chars twice (once to your 'flat' scrollbuff, again to screen), just store a pointer to the fontchar to blit instead... |
01 May 2012, 02:39 | #4 |
Posts: n/a
|
Ok that makes sense. I was thinking along those lines but my first few attempts were unsuccessful, and so thought it was something more elaborate. I must be overlooking something... Anyway, when I get a chance between work and cleaning dirty nappies I will give it another crack. But I can't promise I won't have any more silly questions! lol Thanks for the prompt response guys.
|
02 May 2012, 10:02 | #5 |
Registered User
Join Date: Dec 2007
Location: Dark Kingdom
Posts: 213
|
what do "dycp" and "dypp" mean?
|
02 May 2012, 10:06 | #6 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
DYCP: D.ifferent Y. C.har P.osition
DYPP: D.ifferent Y. P.ixel P.osition |
02 May 2012, 10:08 | #7 |
Registered User
Join Date: Dec 2007
Location: Dark Kingdom
Posts: 213
|
StingRay: thanks!
|
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 |
Help with a sine effect | bobster | Coders. Tutorials | 16 | 17 October 2012 12:11 |
Flickering sine scroller | pmc | Coders. Tutorials | 4 | 24 June 2009 09:19 |
Help with sine regression | Ed Cruse | Coders. General | 14 | 30 June 2008 01:15 |
|
|