![]() |
![]() |
#1 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,329
|
![]()
Recently, I was inspired by several thread to check out the game Mega Typhoon, which used a neat way to improve blitter throughput: namely, use Dual Playfield mode and only blit to one playfield and only show background on the other playfield.
I got to thinking about this and realized the Dual Playfield mode can also be used to blit 'bobs' much faster by never clearing any data and not using cookie-cut mode. The result of my tinkering is a small program which does just that and shows a whole bunch of bobs moving about. This method can be used for games as well, so I thought I would share it. The program and full source code can be found on my website: http://www.powerprograms.nl/amiga/dpl-fastbobs.html I hope it can prove useful ![]() Here it is in action: [ Show youtube player ] |
![]() |
![]() |
#2 |
Registered User
Join Date: May 2017
Location: AmigaLand
Posts: 415
|
Thanks for the tuto. But, what is a cookie cut ?
|
![]() |
![]() |
#3 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,847
|
|
![]() |
![]() |
#4 |
Registered User
Join Date: Dec 2016
Location: Finland
Posts: 164
|
A nice idea, but even if the background is independent with dualplayfield, you still usually have several objects in the second planebuffer that might overlap each other. Doing a straight A->D copy with a bit oversized area to clean off garbage from previous frame will also wipe out part of other objects that are close. A cookie-cut operation is needed the preserve other objects that are close, as it wipes out graphics only from the mask area that precisely matches the object.
One can use your technique, if objects can't come too close to each other, or some other special cases, like one large object and rest is sprites etc. |
![]() |
![]() |
#5 | |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,329
|
Quote:
But, you can have overlapping bobs. What the example program does is blit all the non-overlapping bobs first and then add the cookie-cut bobs on top. This works and allows for overlapping bobs. To use this you do need to know ahead of time what is going to overlap and deal with it, or adjust the program so it detects overlap and deals with it for you. Nonetheless, I feel it can be a useful technique. One use would be 'boss fights' in games, but also games where enemy movement or positions are structured (such as waves in shoot-em-ups, or patrolling enemies in platformers) should be able to use this technique. Probably not for all bobs, but likely for a sizable percentage of them anyway. |
|
![]() |
![]() |
#6 |
Wolf-bear thing
Join Date: Jan 2014
Location: Finland
Age: 40
Posts: 56
![]() |
I also used a second playfield for the moving objects (apart from the player sprite) in Solomon's Key 2. Of course, dual playfield mode limits color usage but that was not an issue in this case.
|
![]() |
![]() |
#7 | |
Registered User
Join Date: May 2017
Location: AmigaLand
Posts: 415
|
Quote:
|
|
![]() |
![]() |
#8 | |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 251
|
Quote:
If the first copy blit has a double height and is y-centered, the y-amplitude of the scroller is not too big, you don't have to clear the empty picture before. |
|
![]() |
![]() |
#9 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,448
|
Apologies - I know this is neither a Blitz Basic forum nor thread but there was a particular thing I wanted to check.
So, Blitz seems to always assume this channel configuration (from the manual) A = Pointer to shape's cookie cut B = Pointer to shape data C = Pointer to destination D = Pointer to destination And it has various options which are constant int values, being CookieMode = $FCA, a standard Blit with mask EraseMode = $BOA, erases a section of a Bitmap corresponding to a mask InvMode = $B5A, inverts a section of a Bitmap corresponding to a mask SolidMode = $BFA, overwrites a section of a Bitmap corresponding to a mask Which can be fed into the BlitMode command (I assume this sets BLTCON0), but as you can see there's no mode for blitting without a mask. What would the correct constant be for blitting without a mask? For some reason I've got $DC0 written down in my notes but I have no idea if that's correct or how I came to that conclusion. |
![]() |
![]() |
#10 |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,837
|
$9F0 is blit without mask
|
![]() |
![]() |
#11 | |
Zone Friend
Join Date: Jan 2005
Location: italy
Age: 46
Posts: 244
|
Quote:
![]() http://eab.abime.net/showthread.php?t=81686 |
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dual Playfield Palette Assignments | LuMan | Coders. Blitz Basic | 1 | 24 February 2016 15:35 |
Help with Dual Playfield | Shatterhand | Coders. Blitz Basic | 15 | 14 December 2015 13:05 |
flimbo's quest dual playfield? | Raislin77it | Coders. General | 14 | 01 August 2015 16:53 |
Dual playfield colors and AGA | losso | Coders. Asm / Hardware | 1 | 03 December 2013 02:48 |
Dual Playfield | BippyM | project.Maptapper | 6 | 03 July 2013 00:43 |
|
|