English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 13 September 2011, 01:21   #1
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 744
Question Chessboard speed calc?

I've been looking at chessboards lately. I get how they are done, quite a simple effect. However I'm wondering how you would you can calc the drawing so the zoom speed is constant?

The standard chessboard is drawn by increasing the pixel difference 1 dot at a time. I guess you wold still do that so you have a complete range but pick which line to use differently.

Basically I have and idea for a cooler chessboard but don't really want to give away too much of an idea as to what

Any help would be ace, cheers
h0ffman is online now  
Old 13 September 2011, 02:16   #2
Kalms
Registered User
 
Join Date: Nov 2006
Location: Stockholm, Sweden
Posts: 237
First, what you describe is a bit off. The chessboard that you'll get is... well, you get larger squares toward you, but the maths is a bit off. But for the sake of argument, let's say that you like the shape of your chessboard.

Now remove the mask bitplane. Now you'll just have a gang of horizontal stripes, where the upper stripes are thin and they get thicker the further down on screen you get.

So you want to be able to scroll those stripes, slowly. With your current approach, it will be tricky. You will need to approach the problem from another angle.


Currently you have a formula which you use to "paint" lines, that is, "the next N lines should be white, and then <computes> the next N+1 lines should be black, etc". This generator function has worked well for your purposes so far, but now you're stuck.

You need to turn things on its head. You want a transformation where you provide only a Y coordinate, and the result back is either "white" or "black". Can you describe mathematically how to go - directly - from Y coordinate to color? Not using any lookup table? If you can use floating point maths?

If you find it too hard to do for stripes of increasing sizes, can you perhaps do it for stripes of equal sizes first?

And can you somehow make the black+white stripes change size over time, just by changing a scale factor inside of that transformation?

Last edited by Kalms; 13 September 2011 at 02:44. Reason: same principle, but let's take it in a slightly different direction
Kalms is offline  
Old 13 September 2011, 19:35   #3
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 744
Hmmm, i'm a little lost by your post if I'm honest, sorry.

I think what I'll do is a basic chessboard first.... then move from there, seeing as I haven't already done so.
h0ffman is online now  
Old 13 September 2011, 21:46   #4
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 744
Right, well done the chess board... albeit a tad basic right now. All my own code too without reference
Attached Files
File Type: zip chess01.zip (1.3 KB, 231 views)
h0ffman is online now  
Old 14 September 2011, 08:31   #5
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Niiiiiice zoomer

StingRay's an expert on these zoomers I'd say, so he could give you some good tips, see here: http://www.pouet.net/prod.php?which=54138

done on a bootblock of course, just to underline that Stinger powah!
pmc 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
Final Calc wanted AlfaRomeo request.Apps 5 05 November 2016 22:45
2.3.3 vs 2.4.0 speed mingle support.WinUAE 22 03 May 2012 00:14
Need for speed! DDNI Retrogaming General Discussion 2 05 April 2008 23:31
Chessboard effect Six Coders. General 11 09 January 2007 15:45
OS 3.1/3.5/3.9 Speed fc.studio support.Apps 6 17 August 2005 13:10

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 06:28.

Top

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