| |
Rudi Account closed
Registered: May 2010 Posts: 125 |
DYPP
Hi,
DYPP - Different Y Pixel Position.
I don't seem to find an explanation on this effect on C64 on codebase or anywhere. Maybe its in another thread here on csdb, then please provide an link.
I know the basics of sines, ive made sinescroll on PC, but its easier there since you can look up the framebuffer directly, via sine-tables and so on.
Im wondering how this effect is easily made on C64. I believe there are more than one way, but i guess one way is slower than the other; for example moving each column-bit (inside a char) in realtime. The other way I think is having the chars animated, similar to a twister. Though, im thinking each angle is used for lookup table. I just dont seem to get it right in my mind to start coding on this effect. I've seen several early cracktros and demos that does this very fast, but haven't had the time to reverse-engineer the binaries. If you have any tips and info i'd appreciate it, or even better; write an explanation for codebase.
Thanks |
|
... 43 posts hidden. Click here to view all posts.... |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
Mekanix does a true dypp when only 1 is shown, and fake char anim when 2 AFAIK. |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
If the multi-DYPP part in Crest Avantgarde uses VSP, it only does so for the scrolling (and/or the moving colour gradient).
As for the actual DYPP effect, i guess there's a lot of copying of pre-rendered animated characters going on.
Note how the sine period is rather short, so there aren't so many frames to cycle through until wrap.
Also note how parts of many different characters are identical, possibly reducing the amount of animation data so that everything just barely fits into 64 kilobytes. |
| |
Sam
Registered: Aug 2010 Posts: 21 |
Thanks, Krill! I can sleep at night again :-) I had a memory of the wave being bigger, but looking at the effect again I realise that it was a much tighter loop than I imagined. The biggest trick, to me, here is the clever font. I should have noticed the lack of special characters right away *shame*.
BTW, my dypp in "Typical" had no special chars because each character shape was a speedcoded lda ora sta and I was too lazy to do all the chars. IIRC there was still memory left though. |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
I wonder if the char-transpose approach (swap pixel rows and columns in an 8x8 pixel grid) discussed in https://csdb.dk/forums/?roomid=11&topicid=121737#139125 may in practice really be useful for things like DYPP. =) |
| |
HCL
Registered: Feb 2003 Posts: 728 |
Quote: Mekanix does a true dypp when only 1 is shown, and fake char anim when 2 AFAIK.
Nope. it's exactly the same DYPP code when i show 1 and 2 scrolls. When showing 1 DYPP there is a double y-sinus, but when showing 2 DYPPs there are single y-sinuses.. simply because i don't have time to calculate TWO double y-sinuses :(. despite calculating 39 chars instead of 40 :P |
| |
Sam
Registered: Aug 2010 Posts: 21 |
HCL, your routine is a big improvement from my trick then, I just precalculated the sinus wave + the char fits. Using regular DYCP + selected char animations, are you moving the chars up and down with just basic DYCP or is there more going on there? |
| |
HCL
Registered: Feb 2003 Posts: 728 |
Damn it, i just checked the code (TurboAssembler code from 2005). In single-mode i calculate 160 double-sin values (all 40 chars :P). Then i sort out the lowest one for each char (lda + 3 compares per char), and save as y-offset. Next i do a similar compare to sort out char-internal y-difference, where only [-, 0, +] are taken care of -> 27 different combinations where each one has its corresponding pre-calculated font (pre-calculated during fade-in of course). Then shuffle the data.
The double dypp skips alot of the above. Seems like it just picks a sinus value for the whole char, and then picks another sinus value (should be aprox the derivative..) and use for the tilting angle.. In the end it is the same copy-code and everything else work the same, but yeah it's a cheat! So.. Sorry Oswald, you were right.. You are always right :). |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
Nah no, I find myself often on the wrong :) But having coded in turbo asm is cool, I did that in early 2000's hehe :) |
| |
PAL
Registered: Mar 2009 Posts: 292 |
https://youtu.be/-9F5z8K0PXY?t=1874
NOW THIS IS A DYPP - by yours truly and pantaloon :-) |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Quoting PALhttps://youtu.be/-9F5z8K0PXY?t=1874
NOW THIS IS A DYPP - by yours truly and pantaloon :-) Nice, but the actual character definition is pretty 8x8-ish. =)
One could argue that it's not an instance of the DYPP effect class discussed here. |
Previous - 1 | 2 | 3 | 4 | 5 | 6 - Next |