English Amiga Board Amiga Lore


Go Back   English Amiga Board > Coders > Coders. Language

 
 
Thread Tools
Old 20 December 2013, 23:35   #1
Coagulus
Gets there in the end...

Coagulus's Avatar
 
Join Date: Sep 2005
Location: Wales
Posts: 606
Displayscroll

I'm trying to get my logo in JetHunt to weave like it does on the PC version. The Blit command after separating the logo into lines works but it's a little slow. I did try the scroll command but couldn't get it to do it right.

However there is DisplayScroll which is supposed to use the copper. This would be great if I could understand the manual entry.

Does anyone know how to use this command in Blitz?

Coagulus
Coagulus is offline  
AdSense AdSense  
Old 30 November 2014, 04:49   #2
Cylon
Registered User

 
Join Date: Oct 2014
Location: Europe
Posts: 447
BlitzBasic 2 DisplayScroll Example

Try this, doesn't work with more bplanes, as far as i know; but, what do i know

obsolete.
Attached Thumbnails
Click image for larger version

Name:	bb2displayscroll_emu.png
Views:	263
Size:	22.0 KB
ID:	42354  
Attached Files
File Type: lha bb2dispscroll.lha (18.4 KB, 94 views)

Last edited by Cylon; 01 May 2016 at 20:46.
Cylon is offline  
Old 01 December 2014, 00:42   #3
leathered
Registered User

leathered's Avatar
 
Join Date: Oct 2011
Location: UK
Age: 40
Posts: 304
Just fantastic mate! Rob and I had a quick bash at this last winter, figured out some basics with a rough example and AFAIK Rob got it working really sweet for his title screen. We never did get around to putting an example here though, and I'm sure your example will help in the future. If I'm not wrong this effect should be one of the means of getting that copper floor working in racing games and the scaling floor in one on one beat em ups.
leathered is offline  
Old 06 March 2015, 00:38   #4
Coagulus
Gets there in the end...

Coagulus's Avatar
 
Join Date: Sep 2005
Location: Wales
Posts: 606
Awesome, (I thought I'd replied ages ago!) I've used some of the code from Leathered and my own efforts to knock up an AGA "outrun" attached with source.

I wonder if there's a way of using displayscroll on just one playfield (of a dual playfield) though... otherwise everything on top has to be a hardware sprite...
Attached Files
File Type: zip inrun.zip (27.0 KB, 84 views)

Last edited by Coagulus; 06 March 2015 at 00:43.
Coagulus is offline  
Old 21 February 2016, 04:22   #5
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 2,975
Quote:
Originally Posted by Coagulus View Post
I wonder if there's a way of using displayscroll on just one playfield (of a dual playfield) though... otherwise everything on top has to be a hardware sprite...
As usual, Blitz's documentation is to no help. According to an old Usenet post, DisplayScroll uses two arrays because one works with the odd bitplanes and one with the even ones. That should help your dual playfield endeavours, and might also explain why Cylon can't get it to work with more than one bitplane.

BTW: This thread should be moved to Blitz area…

Last edited by idrougge; 21 February 2016 at 04:46.
idrougge is offline  
Old 21 February 2016, 08:08   #6
Retro1234
5150

Retro1234's Avatar
 
Join Date: Jun 2006
Location: Sycophantazia
Posts: 3,697
I think I want to throw the manual out the window

Last edited by Retro1234; 21 February 2016 at 10:17. Reason: j
Retro1234 is offline  
Old 30 April 2016, 01:00   #7
Cylon
Registered User

 
Join Date: Oct 2014
Location: Europe
Posts: 447
Displayscroll AGA multiple bplanes

Finally got the time to nail the b*tch down.

I always knew there was a strange offset between the odd and the even planes, but never took the time to investigate further.
Well, until now.

I narrowed it down to <1> subpixel (hires pixel in lowres) i believe. The rest is up to the real coders.

First i tried to use the offset parameter in displayscroll cmd, this doesn't seem to work.
Then i constantly tried to get closer to the offset by using a very small step per line tracing downwards without the wobbling, of course.
Finally got the number 13 (well: 12.x to 13.x) as the offset for this very 8 colour bitmap. This offset can be placed anywhere, depending on the effects you want to create. Best is at (0) position in the even-array.

I hope this is usefull. Src below.
Remember: Cylon did it.
Code:
;display scroll adapted by cylon

DEFTYPE.w
BitMap1,320,256,3

LoadBitMap1,"face8.iff",1  ;3planes 8 cols

VWait50
BLITZ

BitMapOutput1    ;print onto bmap

Locate 2,28:Print "THIS IS AGA DISPLAYSCROLL"
Locate 2,30:Print "<<<<< Move Mouse >>>>>"
Use BitMap1

;For a=7To1 Step -1
;  b=1-b
;  Circlef160,128,10*a,10*a,b
;Next

InitCopList1,44,256,$10003,8,8,-$10

CreateDisplay1

DisplayBitMap1,1

DisplayPalette1,1

For y=0 To7                           ;debug colour boxes

  Boxf 0,y*16,7,y*16+15,y

  Locate2,y*2+0.5:Colour1:Print y

Next y

Dim xpo.q(256),xpe.q(256)

a=0
VWait150
Mouse On

tpi.q=2*Pi  ;precalc

xpe(0)=-13  ;offset for even planes start at ypos=0
;not quite accurate! sub-pixel fetch or what the hell....

While Joyb(0)=0

 For a=1 To 253
   d.q+Pi/18:If d>tpi Then d=0.0

   c.q=Sin(d)+(MouseX-160)/160

   xpo(a)=c

   xpe(a)=c  ;same as odd, but with offset

 Next
 VWait

 DisplayScroll1,&xpo(0),&xpe(0);,-13 offset does not work here?

 VWait
Wend

VWait25
QAMIGA
End

NoCli:CloseEd
You can create strange effects if you arrange your colour registers wisely. Like a counter-wobbling of odd/even bplanes.
Or, avoid all even planes in a pictures back but use only those even planes to scroll or wobble on top.
Attached Thumbnails
Click image for larger version

Name:	DispScr_screensht.jpg
Views:	96
Size:	159.5 KB
ID:	48313   Click image for larger version

Name:	bb2dispscr_new0.JPG
Views:	96
Size:	126.9 KB
ID:	48314   Click image for larger version

Name:	bb2dispscr_new1.JPG
Views:	87
Size:	155.0 KB
ID:	48315  
Attached Files
File Type: lha BB2_dispScroll.lha (21.2 KB, 43 views)

Last edited by Cylon; 30 April 2016 at 01:07.
Cylon is offline  
AdSense AdSense  
 


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

Forum Jump


All times are GMT +2. The time now is 22:51.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.19983 seconds with 14 queries