English Amiga Board Home Mobile Skin      


Go Back   English Amiga Board > Coders > Coders. General

Reply
 
LinkBack 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 Send a message via Skype™ 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   Reply With Quote
AdSense AdSense  
Advertisement:
Old 21 December 2006, 01:18   #2
Registered User
 
Ray Norrish's Avatar
 
Join Date: May 2005
Location: Cheshire, UK
Age: 45
Posts: 300
Send a message via ICQ to Ray Norrish
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)
__________________
Robotron remake - completed
I, Robot remake - WIP
Amiga demos in DHTML
Ray Norrish is offline   Reply With Quote
Old 21 December 2006, 02:40   #3
Amiga-based Cyborg
 
mr_a500's Avatar
 
Join Date: Dec 2004
Location: Canada
Posts: 766
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   Reply With Quote
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   Reply With Quote
Old 21 December 2006, 19:48   #5
Registered User
 
rsn8887's Avatar
 
Join Date: Oct 2006
Location: Germantown, Maryland / USA, born in Hannover / Germany
Posts: 587
reminds me of cosmic causeways (trailblazer 2) on c64. How did the guy do that stuff on c64 so smoothly?
rsn8887 is offline   Reply With Quote
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 Send a message via Skype™ 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   Reply With Quote
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 Send a message via Skype™ 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   Reply With Quote
Old 26 December 2006, 19:51   #8
Oldskool Demo Coder
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Hult / Sweden
Age: 41
Posts: 3,680
Send a message via MSN to Photon
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.
__________________
Henrik. Programs Amiga demos, iPhone apps, websites, etc.
A1000/512k - A500 2.0/040@28/4M/.5M slowmem/8M/SCSI/CF - A600 portable II 3.1/ACA630/WiFi/CF - 'A1700' 3.1/68060@80/64M/IDE-Fix Express/CF - etc."The difference between PC and Amiga is that 10yo PCs are worth $0. 20yo Amigas are worth a lot, and Amigas that are only 15yo cost a fortune!"
If you like Portal 2, try my >> single player and cooperation maps <<
Photon is offline   Reply With Quote
AdSense AdSense  
Advertisement:
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   Reply With Quote
Old 30 December 2006, 05:04   #10
Junior Member
 
Frog's Avatar
 
Join Date: Aug 2001
Location: France
Posts: 1,145
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   Reply With Quote
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 Send a message via Skype™ 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   Reply With Quote
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   Reply With Quote
Reply


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

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The most satisfying gun effect in an Amiga game. Peanutuk Nostalgia & memories 30 17 February 2005 09:30
2 Body Blows questions: Body Blows: mirror effect, BBG: misplaced row. lilalurl support.Games 0 29 June 2004 14:01
Love the new log-out effect Jim project.EAB 6 04 June 2004 05:20
Selection-screen Global Effect Tim Janssen support.Games 15 18 October 2002 08:33


All times are GMT +2. The time now is 10:18.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO ©2011, Crawlability, Inc.
Page generated in 0.23414 seconds with 9 queries