28 December 2018, 11:55 | #1 |
Pixel Vixen
Join Date: Feb 2018
Location: Mie, Japan
Posts: 219
|
AGA Sprite + Dual Playfield Limits
Hi all,
I hope you're all well And season's greetings to all! Just a question, in the Blitz Manual, it is stated that anyone expecting 8 64 pixel wide sprites with 256 colours is going to find themselves out of luck with AGA. Which I can well believe. But out of interest, can a stock A1200 handle two 4bpp dual playfields, plus 2 64px wide sprites in 16colours (so two attached sprites) with a good speed? Say 25fps? There would be minimal blitting to the background bitmaps outside of this? Also can the two sprites have different palette offsets, so sprite 1+2 (making the entire 16col 64px wide sprite) takes its 16 colours from palette reg 32 onward, and sprite 3+4 from 48 onwards? Just curious! Thanks! |
28 December 2018, 23:54 | #2 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
I haven't tried it on a stock A1200, but I actually don't think that would be too much of a problem speed-wise. It certainly runs very smoothly on an A1200/030. Sprites are more or less free when it comes to display speed - the DMA slots are too long when you use 8 bitplanes so sprite channel 7 is disabled, but they don't significantly slow down the display.
The demo I published for the Blitz tutorials in Amiga Future used a 4+4 bitplane display plus two 64-pixel-wide sprites and ran fine on an A1200/030. It used one 15-colour and one 3-colour sprite, but it could easily be adjusted to use two 15-colour sprites. Here's a short video of it in action: [ Show youtube player ] Any jittering is probably down to the YouTube encoding rather than dropping frames, but you get the idea. Unfortunately, as far as I am aware, it's not possible to use different colours for each sprite in that way. Joined sprites (and odd-numbered sprites) all take their palette from the same 16-colour bank. You can use a different bank for the even-numbered, non-joined sprites, but these will of course only be 3-colour. |
29 December 2018, 04:35 | #3 |
Warhasneverbeensomuchfun
Join Date: Jun 2001
Location: Rio de Janeiro / Brazil
Age: 41
Posts: 3,450
|
I dont have an AGA machine, so I never properly played with one.
So that I can understand it... With AGA you could have like a 64 colors bitmap (6 bitplanes) while also having eight 16-color sprites that could be up to 64 pixels wide ? (all of them sharing the same palette) Is my assumption correct? |
29 December 2018, 09:51 | #4 |
Registered User
Join Date: Sep 2004
Location: Poland
Posts: 1,301
|
AFAIK AGA can handle 64px sprites in 16 colors even with independent palete (no need to sharing). But i'm not programmer, just read this somewhere.
|
29 December 2018, 12:58 | #5 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
No, on AGA the sprites are still only 2 bitplanes deep. To get 16 colours, you need to join two sprites to get 4 bitplanes, just like on OCS/ECS. You can get 4 16-colour sprites in theory, but in reality you'll likely need the DMA slots for other things. The AGA advantages for sprites are:
- they can be 64 pixels wide instead of 16 without joining sprites as you need to on OCS/ECS - you can reassign the 16-colour bank(s) used for the palette, instead of having the pens fixed as with OCS/ECS, meaning that you can use different colours to those in your 64-colour playfields, and different colours for every 3-colour sprite - the sprites can use subpixel positioning on low resolution screens |
29 December 2018, 12:58 | #6 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
64px with 2 separate and independent palettes for odd and even sprites (0/2/4/6 and 1/3/5/7) but only in 4 colors mode.
If you join sprites (0/1,2/3,4/5,6/7) for 16 colors (so 4x64px sprites) you can use a single shared palette. Summing up: 24 different colors possible in 4 colors sprite mode (due to transparency), 15 otherwise. You can theoretically mix sprites modes (with partial cover-up) and gain some otherwise transparent colors. |
29 December 2018, 14:11 | #7 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
|
Just to add a point here: if you want a scrolling screen plus 64 pixel wide sprites on AGA you basically can only do that full screen by either not taking advantage of the higher bitplane fetch modes or shifting the display to the right by 64 pixels. This much of a shift is usually not acceptable so you only end up with the first option.
Which would essentially mean that for a 4+4 dual playfield display you'd have no better performance than running a game in 16 colour hires on OCS. Or in short, you'd have a very hard time getting it to perform. This is why the manual says you can't mix it. Do note that 256 colours + 64 pixel sprites + no scrolling can be done just fine, though. |
30 December 2018, 09:38 | #8 |
Registered User
Join Date: Dec 2014
Location: germany
Posts: 439
|
I'm no expert on the mysteries of AGA screen timings, but couldn't you use one of the 32 bit fetch modes (FMODE=1 or 2) and need only 32 pixels shift? This would give you a 256 pix wide screen, if symmetry is required, quite acceptable for many applications. As sprite fetch mode is independent from bpl fetch, 64 pix wide sprites are still possible. Bandwidth should be equal to OCS 4 bpl lowres.
|
30 December 2018, 14:21 | #9 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
|
True, you can use 32 pixel fetch for a 32 pixel shift instead and couple this with 64 pixel sprites (this is how mcgeezer's Rygar port works). There is a performance penalty vs 64 pixel fetch however and you're still shifting right by a pretty big amount.
|
30 December 2018, 16:01 | #10 |
Registered User
Join Date: Dec 2016
Location: Warsaw area
Posts: 152
|
@Marle
Pls take a look at my attempts to do a 2d platformer engine. Here: [ Show youtube player ] I have scrolled dual playfield parallax + 32pix wide 16 col sprites (all in AGA) The screen width is 288 IIRC. Im not sure it answers your questions (probably not) but I can share some code if that helps you. It needed a lot of experimenting with seting up the display parameters correctly. Last edited by carrion; 30 December 2018 at 23:15. |
30 December 2018, 19:22 | #11 |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,213
|
That looks amazing! You did that in blitz?
|
30 December 2018, 23:13 | #12 |
Registered User
Join Date: Dec 2016
Location: Warsaw area
Posts: 152
|
Yes
|
10 January 2019, 21:34 | #13 |
Pixel Vixen
Join Date: Feb 2018
Location: Mie, Japan
Posts: 219
|
Thank you to everyone that has responded sorry I haven't replied to you all yet, it's been a very busy start to the new year as my horrible cold came back with a vengeance straight into the new year and I have been travelling all week up and down the country with work too so I've not had much time to digest all this.
But I will reply properly but it sounds very promising. @carrion if you'd like to share some code I'd be very interested. I have an idea for a simple game demo I'd like to try, as I am hoping to draw a nice sprite this weekend with some nice animation and I want to try it out on some code. I'll reply to you all as soon as I can find a few minutes to sit down and digest this all properly. Many thanks! |
11 January 2019, 19:08 | #14 | |
Zone Friend
Join Date: Mar 2004
Location: Middle Earth
Age: 40
Posts: 2,127
|
Quote:
Is this blitz basic 2.1 or Amiblitz? What Amiga is this running on Amiga 1200 standard or does it require a fast cpu and extra ram? How many colours are you using? 2 * playfields at 16 colours? are the sprite colours 32 -> 48?? Thanks. |
|
12 January 2019, 14:14 | #15 |
Registered User
Join Date: Dec 2016
Location: Warsaw area
Posts: 152
|
@redblade
thanks pal It's BB2.1 it is intended to run on unexpanded A1200. If it comes to colors you guessed right. 2*16 colors dualplayfield + 16 colors for sprites. Also there's a copper colors effect done with Rainbow command just to check if some DMA cycles are left to use it. The work on this engine is currently stoped. I think I have to do something easier in first place. This engine and game I had in mind is above me at this moment in time. But I don't give up and will finally get back to finish it. Pls also check my other production. A damascene demo done entirely in BB2.1 [ Show youtube player ] |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
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 |
|
|