English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 29 September 2008, 03:41   #1
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,187
Post Interesting HAM appearance effect needed

Can anyone come up with (or seen in a demo!) an interesting way to make a HAM screen appear on the Amiga? By HAM I am referring to the old OCS style, 6 bitplane, 16 base colours. Not AGA HAM-8.

Fading the screen in cannot be done (that I know of) because it will only fade up the base colours and all the colour adjustment pixels end up looking bizarre. Applying an animation pattern won't work for the same reason.

About the only thing I can think of is having the screen start as 2 pixels high in the middle of the screen, next frame increasing to 4 pixels high (while scrolling up a pixel), then 6 etc - like the Ocean logo effect at the start of Pang.

Any brilliant ideas anyone?
Codetapper is offline  
Old 29 September 2008, 15:09   #2
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
If you got a meg of ram and a few seconds of runtime to spare then you can always precalculate the faded image frames.

If it must be done with minimal memory usage and in realtime then I can't think of much else than playing with the display window or bitplane pointers. One neat effect is to set bitplane pointers and horizontal scroll value for each scanline to produce an "unfolding paper scroll" effect so to speak. You can see what I mean in the first seconds of the RAG long play of [ Show youtube player ].
Leffmann is offline  
Old 29 September 2008, 21:43   #3
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,187
Yeah that's a neat effect, I might go with that!
Codetapper is offline  
Old 29 September 2008, 23:54   #4
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,700
Yes, a line by line effect of some kind, or you can use the blitter to make vertical blinds, or you can user a heavy-cpu routine to manually calculate faded-in pixels from start color to the desired final destination color, as calculated from the original ham data. (No way you can do a whole pic ofc, but you could probably make a 16 pixel high fade-in area gradually moving down the screen a scanline or two per frame.)
Photon is offline  
Old 30 September 2008, 01:00   #5
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 14,482
Quote:
Originally Posted by CodeTapper
Fading the screen in cannot be done (that I know of) because it will only fade up the base colours and all the colour adjustment pixels end up looking bizarre.
Yes??

There is a HAM animation of a ray traced scene in Anarchy's Inspiration is none demo and in the scroller the coder apologises for being too lazy to include a HAM fade. From this txt I just assumed they were these fades were common place?

Last edited by alexh; 30 September 2008 at 01:22.
alexh is online now  
Old 30 September 2008, 08:59   #6
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Of course it can be done - just not in real time in a single frame with any arbitrary HAM image, because it requires too much editing of the image data.
Leffmann is offline  
Old 30 September 2008, 09:46   #7
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,035
@Codetapper:

You can do everything which keeps the horizontal lines intact. For example you can do a similar effact as you described: you can start in the middle of the screen and grow the picture in a sine curve so that it looks like it would be turning. You could even turn it around a few times like a post card with the back side showing a different picture.

Or you could start at the top of the screen and let the picture scroll down. Or let it bounce like a rubber ball a few times.

Or you could start from the bottom and let single lines scroll up, the first line slowly, the second line a little bit faster and so on, so that all lines arrive at their destination at the same time. Again, this effect can bounce a few times.

You could also start with a black screen and pop in single lines in a random order.

There are so many possibilities which can easily be done with copper lists. Only the horizontal pixel lines have to stay intact. In vertical direction you can do whatever you want.
thomas is offline  
Old 30 September 2008, 12:47   #8
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,187
Agree with everything you've said Thomas, I just want a nice and simple effect that isn't going to take too long to code, and I don't want to process the image. I have it loaded, I just want it to appear nicely!

I'm not 100% sure but I think as long as you draw each line from left to right, you can probably make it appear in blocks, as each successive pixel to the right is based on the one on the left. If you kept the first 16 pixels, then cleared the rest of the line with 0's (thus keeping colour 0 which is a fixed colour) you can probably create some other reasonable effects aswell, perhaps a diagonal sweep from top left to bottom right in HAM by copying pixels.

Now which effect would be nicest and easiest to code...
Codetapper is offline  
Old 14 October 2008, 23:40   #9
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,700
Quote:
Originally Posted by alexh View Post
Yes??

There is a HAM animation of a ray traced scene in Anarchy's Inspiration is none demo and in the scroller the coder apologises for being too lazy to include a HAM fade. From this txt I just assumed they were these fades were common place?
Sounds like a coder getting a possible idea from too much caffeine and not testing his theory. Ofc, doing the impossible was/is a driving force behind many great coders and succeeding will put said coder on the apex. I cannot see it for an arbitrary picture, maybe I'll have a look when I have too much time. Not a possibility, and not a priority (for me).
Photon is offline  
Old 05 November 2008, 09:52   #10
Asman
68k
 
Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 829
Hi Codetapper,

There is another idea. Just make one black huuge sprite to cover ham picture, you know that trick. Then you can do want you want, just set off sprite pixels.

Regards
Asman is offline  
Old 06 November 2008, 20:57   #11
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,187
Asman: I am assuming you are talking about repeating the same sprite all over the entire image? Are there any demos where this has been done?

I have so far just replicated the rolling down (and back up) effect as in the Starbyte intro. It creates a copperlist that just alters the modulos and it seems to work OK.
Codetapper is offline  
Old 07 November 2008, 09:13   #12
Asman
68k
 
Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 829
Quote:
Originally Posted by Codetapper View Post
I am assuming you are talking about repeating the same sprite all over the entire image?
Yeah.

Quote:
Originally Posted by Codetapper View Post
Are there any demos where this has been done?
Hm... I don't know, maybe.

Regards
Asman is offline  
Old 09 November 2008, 23:27   #13
BuZz
Registered User
 
Join Date: May 2002
Location: Oxford / UK
Age: 48
Posts: 583
Send a message via ICQ to BuZz
And how do you cover the entire screen in sprites on ocs/ecs then?
BuZz is offline  
Old 10 November 2008, 01:28   #14
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,187
You draw sprite 0 at x position 0, sprite 1 at position 16, then sprite 0 again at position 32, sprite 1 at position 48 etc until the end of the line. And repeat all the way down the screen. A bit of a killer for DMA I would have thought but games like Risky Woods and Leander use this trick for their background parallax. And obviously the pattern will repeat every 32 pixels if you're using just 2 sprites.
Codetapper is offline  
Old 10 November 2008, 01:38   #15
BuZz
Registered User
 
Join Date: May 2002
Location: Oxford / UK
Age: 48
Posts: 583
Send a message via ICQ to BuZz
oh. I thought you can only display 16 pixels per sprite per line ?

Guess my memory is bad ;-)

Last edited by BuZz; 10 November 2008 at 03:21.
BuZz is offline  
Old 10 November 2008, 08:50   #16
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
@ Codetapper - My memory was working the same as BuZz - I didn't think it was possible to reuse sprites horizontally. The HRM states:

Quote:
The only restrictions on the reuse of sprites during a single display field is that the bottom line of one usage of a sprite must be separated from the top line of the next usage by at least one horizontal scan line.
I took this to mean you can't reuse sprites like this:

spr0 spr1 spr0 spr1

but you can like this:

spr0

spr1

spr0

spr1

Or have I missed the point of what you were describing?
pmc is offline  
Old 10 November 2008, 08:55   #17
BuZz
Registered User
 
Join Date: May 2002
Location: Oxford / UK
Age: 48
Posts: 583
Send a message via ICQ to BuZz
having said that, you can put a sprite on screen and modify the X position on every rasterline with the copper for example. So the RKM is perhaps being a little strict on that. Well, I'm sure that is how I did starfields anyway!
BuZz is offline  
Old 10 November 2008, 10:42   #18
Asman
68k
 
Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 829
Hi BuZz,

I will check my sources ( at weekend maybe earlier ), maybe there is something about that.

Regards
Asman is offline  
Old 10 November 2008, 10:52   #19
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,575
Check for example Battle Squadron's copperlist. Score information is made 100% from sprites.

Basically it works if you have enough DMA time to update sprxdata,sprxdatb and sprxpos with copper.
Toni Wilen is offline  
Old 11 November 2008, 10:41   #20
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,700
Yeah, 2x8 sprite words per scanline is only if you use the sprite engine. Which is what HRM was referring to.

Also used for parallax in some games, I think.
Photon is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed with HAM mode and Photon Paint trydowave support.Apps 10 12 March 2013 20:49
Quartex intro - Interesting effect Hewitson Nostalgia & memories 6 23 May 2010 03:42
Brief Amiga appearance in .net magazine antonvaltaz Amiga scene 0 10 November 2009 12:55
Help with the appearance in WB3.1/Scalos SamSharp project.ClassicWB 4 10 August 2009 19:14
WB Utils - change window appearance? Crs request.Apps 30 15 January 2005 13:26

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:02.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.11655 seconds with 13 queries