Author |
Message |
z5_
Member |
This topic is meant for general discussion about effects. In particular, general ideas on how to tackle a certain effect.
I'm going to start with the following question. An effect that i always liked is picture fading in from black. Can somebody give me some general ideas on how to code this effect. I thought about it but with my little experience, i can't really see a way to do it.
|
noname
Member |
mini-tutorial on fading:
- start modifying only one color. use the background color. write the modified color directly to the copperlist. use labels in the copperlist to do so. make sure you can write a color-value from a register (let's say d0) to the copperlist so that it is working and stays on screen.
- make a fade from black to white on the background. wait for the vbl after each step.
- write a subroutine that takes a source color and a destination color and that returns an in-between color that is one step closer to the destination (e.g. in: d0-$000000, d1-$0000ffff out: d0-$00000101). work on each color-channel seperately. make the subroutine work in both directions so that d1 does not have to be greater than d0.
- replace the fade from black to white with a fade from any col to any col.
- then code a function that writes an array of 256 colors to a copperlist. this is tricky to do but absolutely doable. make sure to read the aga guide when doing this.
- when this is done you will probably want to think about how to do faster fades as the above could take up to 255 vertical blancs to finish.
|
skan
Member |
@noname
Thanx, this could really help me since I wanted to do some x-fading for a slideshow and didn't know where to start from at all! :)
|
z5_
Member |
How about a mini-tutorial on coding a scroll text? :) (@noname: thanks for the great explanation on fading!).
And one question in general for the experienced coders: how do you learn new effects? Is it experimentation, pure genius or talking to each other and exchanging ideas? And how long does it took to achieve an accepatable level?
|
noname
Member |
the easiest way to scroll is to scroll vertically by modifying the bitplane pointers.
as a rule of thumb i would say that learning to code asm takes about 2 years. results are visible earlier and you can have fun all the way long but it takes some time until you get some kind of bigger picture.
to learn new effects i would propose to copy existing ones first. try to really figure out how "they have done it". then reimplement the effect for yourself. optimize it until you are really satisfied. this can take quite some time but it is a good exercise and a good way of thinking. it also led to the typical "i can do that" thoughts of coders seeing some new effects on the big-screen.
you need to have this background knowledge before you can explore new things. bear in mind that the amiga has been explored for quite some time so you might concentrate on rewriting your favourite effects and combine them in a new and interesting way. this will lead to your first demo which is probably going to look quite horrible but that is ok. your second production will look much better and you will know what you are doing until then.
it would be great if you guys hold your interest and come up with some kind of mega-demo in the long run. and i'd be happy to help with the infrastructure.
|
Cyf
Member |
for example, last DaJormas oldskool demo "Major release", with old effect, and source code included "for the purpose of education" : cool :)
the easiest way to scroll is to scroll vertically by modifying the bitplane pointers.
err...for a vertical scrolltext (but blitter can be used)
blitter for horizontal scrollText.
principle:
a simple shift to the left with a blitter copy of the screen
|...............A| : |12345678A| ->scroll |2345678AB|
(....)or(12345678)=visible part of the screen
A = where is put new char
progressive copy (2345678A) to (12345678)
steps for horizontal scrolltext :
- test scroll counter (scrollspeed) : number of time to scroll before new char
- if counter>0 then scroll else newchar
- newchar: get new char from a text pointer
- increase text pointer and reset scrollcounter
- put new char at the end of the screen
- scroll
|
z5_
Member |
Well, i thought about starting a demo with people on the forum here. Starting with one effect, with fully commented source. Then, an experienced coder can develop a second effect, again fully commented and explained. Then another person can add another effect.... slowly developing into a project, and teaching people with the basics. Each step in the process would be downloadable.
For example:
- step 1: startup-code
- step 2: someone adding a starfield (sprites exercise)
- step 3: someone adding a routine to show a picture (building from the source in step 2) (bitplane exercise)
- step 4: someone adding a routine to show a letter on screen (blitter+font) (building from the source in step 3)
...
But for that, i need help from experienced coders. Somehow, i think that this would be not that much work (setting up a starfield is probably coded in minutes by an experienced user...) and a great way to help speed up that hard part of getting to grips with the different aspects of amiga coding
|
noname
Member |
think about the target hardware then as well. you might not want to require graphics cards and ppc or 060 for a typical amiga demo. but maybe you want to use aga. so maybe you are thinking about a demo targeted at the golden "a1230/50 with 8mb" audience of the late nineties.
|
Cyf
Member |
i'm just oldskool, no AGA :p
I never done something with aga...so please share : for example, a cool aga effect : transitional fading between 2 pictures, or a real Aga plasma !
and a good startup code, the same for everybody
|
noname
Member |
i'm going to share my aga-compatible startup code soonish. i already found it and tested it in winuae.
can't provide you with an aga plasma of mine. but i have some cool coding disks called "ex 2" that i could put up somewhere. they had some plasma iirc.
the aga-fade that you propose is very easy (if you mean a crossfade like in "big time sensuality/axis"). it is just 2 pictures in 16 cols each and some carefully adjusted palettes. a good graphician, high resolution + dithering and a slightly monotoneus palette might help to achive a good looking result.
|
z5_
Member |
@noname:
Well, the target would not be to make a demo and compete in a demo-competition, but to start small and add effects as we go, one by one, with a lot of source code documentation. One person could do a fade effect on a picture, another person could then add some other effect...
And indeed, the 68030 or even a plain vanilla A1200 with a bit of fast ram could do as hardware requirements. The demo would not grow into something ground-breaking. Just some basic effects to get new users going.
But maybe coders aren't too happy to share source code with others?
If anyone thinks this could work or would be interested in such a thing, or if anyone want to help out, post it in these forums.
|
Cyf
Member |
still lot of effects left !
ex.:
- copper effects : wave, mirror, "rotate" with modulo, rotozoom, "mapping" cube-sphere..., wipe effect : unroll pic, elastic (FLD - Flexible Line Distance), plasma... (see "Yvonne demo"/Alpha Flight for modulo copper effects)
- blitter : 3D (arrggl : first DrawLine blitter routine), all possibilities of blitter (fill, ellipse...), stencil, shadebobs
- Dots effects : Tunnel, flag, sphere... please Algos!
- zoom (text,bitmap...)
- text effects : Sinus Scroll text DYCP/DYXCP/DYPP (Different Y and X Character Positions, Different Y Positionned Pixelsrows)..., RollerScroll text, twistscroller, circle scroller
(I'm searching for "real" name of existing effects)
|
dalton
Member |
But maybe coders aren't too happy to share source code with others?
not because they're afraid of ripping...but because they don't want others to see how much they're cheating =)
|
z5_
Member |
What are the effects that every newbie can/should try out. I mean, i have visions in my head of things i would like to code, but somehow i think it wouldn't be wise to try them without any coder experience :)
What effects did you start with? Should i first try to make a small oldskool intro (copper, scroll, sprites,...)? Currently i'm doing some pciture wipes to get some feeling for the assembly languaga and the blitter.
|
Cyf
Member |
start with all copper effects using Modulos, colors (see above).
-> take a look at the Yvonne demo by Alpha Flight to see a lot of copper effects at same time on the screen !
after that, simple blitter effects like scrolltext, wipe, bobs
mixe copper and blitter for a Roller Scrolltext (around a tube)
enhance scrolltext with simple sinus DYXP or "one pixel" sinus
and add some sprites static or not
try others copper effets (rotozoom, twistscroller...)
and continue with more difficult effects like 3D (err..yes I think is more difficult but depend of your knowledges... before you should try to create a DrawLine routine with blitter), zoom bitmap (copper+blitter)... , dots effects, and specific Aga Chunky/Chunky to Planar effects
|
noname
Member |
after getting everything (startup, copperlists, music, c2p) _really_ working, i first concentrated on doing the fire effect in chunky-mode.
|
z5_
Member |
one last question:
does one have to be equipped with a mega-brain to be a good coder? (and yes this is a serious question).
The talk inhere sometimes make me dizzy... rotozoon, twistscroller, bobs, sinusscroller,... phew... i wouldn't know where to start...
|
Cyf
Member |
some pics of effects from ada^^ :
sinus scroller = (in all cracktros!)
twistscroller: Hardwire Silents / Xpose silents
circle scroller
where to start ? 1. copper effects for example. modifying modulos,colors, move rasters simple or sinus. see demo like Coppershock of Amonia or kefrens megademo 8
|
Overflow
Member |
My guess is that its like everything else in life. If you have no expirience at it, everything looks like its magic.
Probarly the expirienced coder has probarly spent countless hours banging his head against the wall when he/she started coding.
As with my real life job, i remember when i started studying it, I couldnt belive I would ever manage to do it...after a couple of years doing it every day, it becomes second nature...
Im sure coding is the same way....
|
z5_
Member |
The effect that i always wanted to code: a vertical scroller. Just a black background, white font and scrolling from bottom to top, like you see in the endcredits of a movie...aaahhh... If i ever manage to do that and let it scroll in a smooth way, i will rest in peace... (like the endscroller in Rain/TBL)
@Overflow:
Are you still learning to code? (you're rather silent in the code forum here... :))
|
Cyf
Member |
vertical scroller...2 ways : copper or blitter
personaly, I coded my vertical scrollers with Blitter, with the same method of horizontal scrolltext. I reserve one line more at the end of the screen buffer, hidden, where I put next text line, and copy screen+1 line to screen.
but perhaps is not the better way, especially if the screen is Hires with lot of planes !
I done another vscroll using screen*2 and prewrited text in second half of screen, and vertical scroll using hardware scrolling with bplpointer change.
But, If someone could post the Best vertical scroller routine on Amiga, cool !
|
z5_
Member |
A general question: if i want to do a scrolltext with a picture in the background, should i use dual playfields (seems the easiest way?). Ofcourse the color of the picture is then limited to 16 colors. Is that the way that it is done in for example Da Jormas Major Release (the funky scroller in front of the ape picture for example)?
|
dalton
Member |
dual playfield sucks imho =) the monkeyscroller in major release is transparent, which means that it's drawn in a separate bitplane, and then then the palette is set up with bright and dark shades of the same colours.
|
Cyf
Member |
yep. in Major Release, the scrolltext is only 1 bitpane depth. this plane is the last. if you use a 32 colors pic, and put scroll in plane 6, you can use the EHB mode for automatic bright and dark shades of the 32 colors!
dualplayfield is for other effect (in games like shadow of the beast for example...) or if it's a 8 colors (16 in aga) font without transparency effect :
for example a simple cracktro by Horizon with a 8 colors logo and 8 colors font, the scrolltext pass through the logo by changing priority of playfield, the scroll is behind the logo at middle of the screen.
you can see a flash remake here , but the "pass through" effect is missing (I think because with winuae, this effect doesnt appear)
|