English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 20 December 2006, 22:17   #1
Six
Registered User
 
Join Date: Dec 2006
Location: KY, USA
Posts: 10
Send a message via ICQ to Six Send a message via Yahoo to Six
Chessboard effect

Can anyone explain how to to do the scrolling chessboard effect, where it appears to continuously scroll towards the viewer?

I figured it was as simple as making a two-color image with the appropriately sized stripes (larger at the bottom than the top) and then moving my copper data, inverting the two colors for each "row" of the chessboard.


However, when I try this, there is a lot of empty space on either side where my bitmap is not displayed, and the effect looks really weak. Thus I'm thinking there must be more to it to make it appear all the way across the screen.

Any suggestions? (Thinking I'm probably missing something simple like changing my bitmap display regs in those lines for overscan...)
Six is offline  
Old 21 December 2006, 01:18   #2
Ray Norrish
Registered User
 
Ray Norrish's Avatar
 
Join Date: May 2005
Location: Cheshire, UK
Age: 56
Posts: 322
Hi,

In it's simplest form, you want a single plane bitmap like this:



You could then either:
Repeat $180 and $182 in the copper for the height of the bitmap,
Then use a simple "filler" to populate the colour values to acheive
movement or slightly faster:
If you know how many different coloured rows you will have in use,
you could pre-create these and move the vertical pointer accordingly.

Rereads your post:
(oh yea, and overscan it of course)
Ray Norrish is offline  
Old 21 December 2006, 02:40   #3
mr_a500
Amiga-based Cyborg
 
mr_a500's Avatar
 
Join Date: Dec 2004
Location: Canada
Posts: 808
Quote:
You could then either:
Repeat $180 and $182 in the copper for the height of the bitmap,
If you repeat $180 and $182, you could run out of cash pretty quickly. (Who would have thought copper instructions could be so expensive?)

Are you trying to do an effect like Mad Elks' Technological Death? I always loved that "walking cube" on the chessboard background.
mr_a500 is offline  
Old 21 December 2006, 08:00   #4
AGN
Registered User
 
Join Date: Aug 2004
Location: Poland
Posts: 142
http://www.flashtro.com/page.php?al=alias3464

In this example we have precalculated lines instead of bitmap.
For every line there is copper::move $00e0/2 which chooses line according to sine table.

For flat chessboard You also need BPLCON1 for every line.
Of course all fill data should be in wide enough table to cover every position of lower line.
Upper lines may be shorter in memory.

Is it fast? Efficient? I don't know :)
AGN is offline  
Old 21 December 2006, 19:48   #5
rsn8887
Registered User
 
rsn8887's Avatar
 
Join Date: Oct 2006
Location: USA
Posts: 1,065
reminds me of cosmic causeways (trailblazer 2) on c64. How did the guy do that stuff on c64 so smoothly?
rsn8887 is offline  
Old 26 December 2006, 03:37   #6
Six
Registered User
 
Join Date: Dec 2006
Location: KY, USA
Posts: 10
Send a message via ICQ to Six Send a message via Yahoo to Six
Quote:
Originally Posted by AGN
THAT is nice. Maybe even easier for me to envision how to pull off than the flat chessboard.

Quote:
Originally Posted by AGN
In this example we have precalculated lines instead of bitmap.
For every line there is copper::move $00e0/2 which chooses line according to sine table.
Very similar in technique to the way I'd try to pull that effect off on the 64, interestingly enough.

Quote:
Originally Posted by AGN
For flat chessboard You also need BPLCON1 for every line.
Could you elaborate on that? Would I be tweaking BPLCON1 to repeat rows from the bitmap?

Quote:
Originally Posted by AGN
Of course all fill data should be in wide enough table to cover every position of lower line.
Upper lines may be shorter in memory.
Because they repeat on a single displayed row, or because I can tweak one of the display regs to "stretch" them?

Thank you all for your advice!

It's a lot of fun trying to adapt what I've done on the 64 all these years to another platform, but without the kind advice of other guys in the scene, it's a real uphill battle
Six is offline  
Old 26 December 2006, 03:38   #7
Six
Registered User
 
Join Date: Dec 2006
Location: KY, USA
Posts: 10
Send a message via ICQ to Six Send a message via Yahoo to Six
Quote:
Originally Posted by rsn8887
reminds me of cosmic causeways (trailblazer 2) on c64. How did the guy do that stuff on c64 so smoothly?
By not actually drawing each line, usually. You can creatively tweak the display regs to repeat lines, and of course a lot of stuff is done in "character sets" so that anything you plot can be repeated as many times as you like onscreen.
Six is offline  
Old 26 December 2006, 19:51   #8
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,652
Just take a bitmap like the one Ray suggested and make it 352 pixels wide or more, adjust the copper DIWSTART etc registers for overscan. Then, if there is a maximum of 20 squares visible all the way to the horizon, you make a copperlist with 20x

dc.w $80ff,$fffe
dc.w $0180,$fff
dc.w $0182,$000

The vertical positions of the waits are calculated by a vector routine, if you want it correct. In fact, only one division (or MULS+SWAP, or precalced...) is necessary per point.

If the chess board crosses the NTSC line, insert a dc.w $ffdf,$fffe. In this example you would best do that with an extra 3-command entry like above, so that you won't have to insert anything. Just check when you're crossing line $100 in the copper poke loop - set current entry to $ffdf,fffe+same colors as previous entry and put the correct vertical stop+colors in the next entry.

This is the most correct and cycle-conscious method.
Photon is offline  
Old 29 December 2006, 18:01   #9
AGN
Registered User
 
Join Date: Aug 2004
Location: Poland
Posts: 142
http://www.pouet.net/prod.php?which=9096
AGN is offline  
Old 30 December 2006, 05:04   #10
Frog
Junior Member
 
Frog's Avatar
 
Join Date: Aug 2001
Location: France
Posts: 1,385
ahh... i love chessmate too. I think i try to learn asm to code a chessmate !
Then add a little scroller, a picture, a starfield and a music but i never go further.


There's a nice chessmate : Freddy is Back / PARADOX http://www.pouet.net/prod.php?which=11125

i also remember a great screen on ATARI ST code by Ziggy Stardust (AFAIR). You have to wait some time for precalculation and then he add some vertical waves on the chessmate ! Really cool.

and a PC 256b original chessmate with sourcecode: http://www.pouet.net/prod.php?which=17194
Frog is offline  
Old 31 December 2006, 21:49   #11
Six
Registered User
 
Join Date: Dec 2006
Location: KY, USA
Posts: 10
Send a message via ICQ to Six Send a message via Yahoo to Six
Thanks everyone for all the helpful advice. I'm tweaking the effect to get it just so now, hopefully will have some small intro to show off soon. I think I'm also going to "fade" the colors of the chess squares towards grey as they go back into the horizon.
Six is offline  
Old 09 January 2007, 15:45   #12
AGN
Registered User
 
Join Date: Aug 2004
Location: Poland
Posts: 142
another one:
http://www.pouet.net/prod.php?which=14657
http://www-user.tu-chemnitz.de/~sgl/...es/thetop3.zip
AGN 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
twister effect Coagulus Coders. General 91 14 March 2017 20:45
Chessboard speed calc? h0ffman Coders. General 4 14 September 2011 08:31
Overlay effect MrX_Cuci request.UAE Wishlist 15 30 June 2010 17:35
Another scanlines effect Leandro Jardim request.UAE Wishlist 6 27 June 2010 19:37
Cracktro effect absence Coders. General 13 02 April 2009 16:41

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 18:12.

Top

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