![]() |
![]() |
#1 |
Registered User
Join Date: Jan 2023
Location: Toronto
Posts: 438
|
Coders, how was [this] done in [this] game?
Playing so many Amiga games these days I often have technical questions about them and thought maybe this could be a good thread for me or any others that have questions about how certain things were done in certain games. I'll start with these 3:
Elfmania - how are they able to do line scrolling on the floors when it's not in dual playfield mode? [ Show youtube player ] If that was always possible why wasn't it used more? Maybe the first level of T-Racer is also done that way. [ Show youtube player ] Apocalypse - at 8:02 in this video [ Show youtube player ] how were they able to get so many colors on screen if it was in 7+8 color dual playfield mode? Or maybe it wasn't. In the Youtube comments the developer says "I think for that game we managed to exploit a Denise-chip hack where an extra parallax layer was achieved by redefining sprites in the split-second that the raster scan goes from the right of the screen to the left. It was actually a small set of sprites that were continually redefined ahead of the raster scan to create the illusion of a parallax layer." Someone comments on that "so the skyline layer were achieved with sprites.. I always though it were using another bitplane.." and he responds "Yes, I think so. It's hard to remember now if it was that game or another. There was a maximum number of bitplanes and it was possible to squeeze one more out of the system with a sprite hack. I feel pretty sure I used it on Apocalypse, but it was a million years ago." Can someone explain that Denise hack he's mentioning? Cool Spot - the backgrounds in Cool Spot have always mystified me, I think it's in dual playfield mode but then why are the backgrounds in only one color like at 48:34 here [ Show youtube player ] with the shelves just done by the copper? Or do they somehow have the dual playfield using 3 bitplanes in the foreground and just one bitplane in the background for more speed? Is that possible and would it be faster? Also how in the same video above at 16:16 do they make the boat appear to go up and down in the background? Thanks for any explanations. Last edited by lionagony; 08 May 2024 at 19:49. |
![]() |
![]() |
#2 |
Registered User
Join Date: May 2023
Location: Norwich
Posts: 527
|
I think Apocalypse is just a case of using repeating sprites to create the background layer rather than Dual Playfield.
For Cool Spot, no you can't choose the distribution of playfield layers on the Amiga. The backgrounds do just look like a single bitplanes with some copper colours though. My guess is that layer is just being scrolled manually with the blitter. The boat going up and down is just scrolling that layer, you just have to keep track of the fact you want it to move independently as well as relative to the player so you're moving things the correct amount depending on on-screen action. |
![]() |
![]() |
#3 |
2 contact me: email only!
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,188
|
Apocalypse is not using dual playfield at all.
It's basically a 4 bitplane game for the main area, and a 5th bitplane for the single colour parallax mountains in the far background and the single colour black shrubs at the very bottom of the screen. The game duplicates the first 16 colour palette entries (0-15) into the second set of palette entries (16-31, which are also shared with the sprites) and then it changes colour 15 and 31 all down the screen to create the mountain behind or the shrubs in front of the main area. Sprites are only used for the status icons and number of rescued hostages etc. I didn't see any complicated multiplexing of sprites, except for the very top row of numbers at the top of the screen (it uses sprite 0, then 1, then 0 again) in my brief look. Last edited by Codetapper; 09 May 2024 at 07:22. |
![]() |
![]() |
#4 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,452
|
to figure it out, run it with WinUAE, then shift+F12, then "e"
check value of BPLCON0. 4200: 4 planes 5200: 5 planes 6600: dual playfield |
![]() |
![]() |
#5 | |
2 contact me: email only!
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,188
|
Quote:
Elfmania is 32 colours and I assume it just copies the relevant strips a line at a time from a larger image to simulate the moving floor effect. It can't just shear the strips sideways because the player characters would also end up moving, unless you also drew the characters a step at a time. In other words, not likely! |
|
![]() |
![]() |
#6 |
2 contact me: email only!
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,188
|
Cool Spot is simply 4 bitplane 16 colour mode, and it draws the parallax background into the screen. The parallax is always just a single colour (with some palette tricks to make it look more) but the game sucks imho. It only updates the screen every 3 frames, so we're talking about 16-17fps. Because of this, the scrolling is really jerky and isn't impressive at all.
|
![]() |
![]() |
#7 |
Registered User
Join Date: Apr 2018
Location: UK
Posts: 495
|
The only one I find hard to figure out is Elfmania, I've always been fascinated by all the tricks going on in that.
|
![]() |
![]() |
#8 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,756
|
Just had a quick look. Generally, the thing that makes it look like "triple playfield" is the reuse of sprites.
Perspective floor is made by scrolling each pixel line individually at different speeds. The pier stumps in front are sprites just like the main characters (Elfmania). Background or foreground sprite layers can be built by spamming SPRxDAT, or repeating patterns in more colors by spamming SPRxPOS. Multiple sprite layers can scroll at different speeds as long as they don't overlap vertically (black stuff in Apocalypse at top and bottom). |
![]() |
![]() |
#9 |
Registered User
Join Date: Jan 2023
Location: Toronto
Posts: 438
|
Thanks guys for all the great info. This got me reading these links in the Hardware Reference Manual and had a couple more questions. Here http://amigadev.elowar.com/read/ADCD.../node0078.html it says that there are up to 7 colors in each playfield. Previously I've heard many times that it can be 8 colors in one playfield and 7 colors plus transparency in the other. So is the correct way to think of it that if you're in dual playfield mode (and want graphics from both playfields to be seen) that you can have max 7 colors + transparency in the foreground and then max 7 colors + transparency in the background if you want the copper to shine through but 8 colors max in the background if you don't want the copper to shine through?
Also this page http://amigadev.elowar.com/read/ADCD.../node0079.html makes it seem like you can split the dual playfield bitplanes in other number combinations other than 3 + 3. It gives examples of 1 + 1, 2 + 1, 2 + 2 and 3 + 2. I know you can split the bitplanes and scroll some of them with the blitter but if you want to use hardware scrolling could you really do a 2 + 2 for example where the foreground is 3 colors and the background is 3 colors and they both hardware scroll? How much faster would a 3 + 2 split be than a 3 + 3 split for example? Last question what about where Codetapper says "Apocalypse is basically a 4 bitplane game for the main area, and a 5th bitplane for the single colour parallax mountains in the far background and the single colour black shrubs at the very bottom of the screen. The game duplicates the first 16 colour palette entries (0-15) into the second set of palette entries (16-31, which are also shared with the sprites) and then it changes colour 15 and 31 all down the screen to create the mountain behind or the shrubs in front of the main area." Would this be possible using 6 bitplanes? Like could you have a 5 bitplane game with the palettes duplicated and then 1 extra bitplane for 1 color parallax? This way you wouldn't be using more than the 32 color registers and you could have a 32 color game like Superfrog with a parallax layer in single playfield. Is there a reason why this wouldn't be possible or would it be possible and just slow? Thanks again for any explanations. |
![]() |
![]() |
#10 |
2 contact me: email only!
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,188
|
Yes you could go with 6 bitplanes if you really wanted, but there's drawbacks with everything.
6 bitplanes (halfbrite mode) doesn't exist on some early Amiga 1000s. 6 bitplanes takes more DMA time, so the game might end up running slower. Some repeated sprite tricks wouldn't work because you can't update the sprites fast enough. You can draw into the 6th bitplane fine but you can't fine-scroll it. You can only set the fine-scroll value for all odd, and all even planes. So you would basically have to update that 6th bitplane everytime you wanted the screen to scroll. The only other trick you could try is to use a repeated background pattern that has all 16 pixel indent combinations in it and you'd have to choose the right offset to make it look like it was scrolling by one pixel each time. (Consider a repeating pattern of say 17 pixels wide, each time you offset by 2 bytes (16 pixels) it would look like you had fine scrolled it by 1 pixel). However you'd get a very boring background, not some nice tall mountain range. |
![]() |
![]() |
#11 |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,035
|
I'm assuming just by guessing that the game switches bitplane priority and the bottom parallax layer and the upper one are the same, and when the upper layer is no longer visible, priority is switched so that background layer is now a foreground layer.
|
![]() |
![]() |
#12 | |
Registered User
Join Date: Jan 2023
Location: Toronto
Posts: 438
|
Quote:
|
|
![]() |
![]() |
#13 | ||
Registered User
Join Date: May 2023
Location: Norwich
Posts: 527
|
Quote:
Quote:
|
||
![]() |
![]() |
#14 | |
2 contact me: email only!
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,188
|
Quote:
Because the shrub pixel graphics are set, colours 16-31 take effect and draw those set pixels as black. Anything not set will still display the graphics behind it. And because the game is setting all sprite colours to black at the same time, no sprites can be drawn at the very bottom of the screen which is why the weapon counter sprites are further up the screen. |
|
![]() |
![]() |
#15 |
Registered User
Join Date: Jan 2023
Location: Toronto
Posts: 438
|
I have a question about Marvin's Marvellous Adventure. I was reading a making of and they said it used 256 colors. If that's the case does anyone know how the 3 levels of overlapping parallax was done at for example 32:21 here
[ Show youtube player ] It can't be in dual playfield mode if it's using 256 colors. The trees and the orange checkered towers do repeat so it's probably sprites. The trees are more than 3 colours so they must be attached sprites so then is it just 2 attached 16 color 64 pixel wide sprites for the first tree and then it's multiplexed across the screen? For the tower and the clouds maybe those are 3 color and multiplexed? Would love to hear any insight, thanks.
|
![]() |
![]() |
#16 |
Registered User
Join Date: Jan 2023
Location: Toronto
Posts: 438
|
Was playing XR-35 last night and it's a really slick looking game for 1988. I just wondered if anyone knows how it was set up. Was it one of if not the first dual playfield Amiga games? If so it seems to have more than 8 colors in the foreground and for bobs. Here's the longplay
[ Show youtube player ] In the comments for another video
[ Show youtube player ] the original developer says the following: "was written in pure assembly language and hijacked the OS, 50hz refresh so no judder, unlike many others at that time. It was based as a clone and required some high speed DMA triggers to get that many colours on screen which could only be done in machine code. Otherwise would have to use double buffering and drop to 25hz."
Anyone know what he was referring to to get more colors on screen? Another Youtube commenter had the theory that "I think this is one of the first examples of dual playfield game around, first playfield is the back parallax, second one is split in three separated palettes, with the central one changing for every enemy wave, and finally the player ship is a 16 color sprite" Could this be right that it was split into three palettes to get more colors, could this be the long sought after way to get more than 8 colors in a layer in a dual playfield game? Surely the coder didn't discover a trick in 1988 that was never used again? |
![]() |
![]() |
#17 |
Registered User
Join Date: May 2018
Location: Ireland
Posts: 725
|
Yes, looks like dual playfield and for some of the levels its using the copper to change the foreground playfield colours, its actually split in 3, top part/background, centre part for enemy ships and bottom part/background
The technique is quite limited though, you'll notice that none of the enemy ships cross the boundry of the bottom part/background. |
![]() |
![]() |
#18 | |
Registered User
Join Date: Jan 2023
Location: Toronto
Posts: 438
|
Quote:
That really is ingenious though, with the right planning some good games could be made with this compromise. Do you know if the size of the splits of the screen have any restrictions? For example could you have the top and bottom parallax parts small and then a big center where it could be playable and colorful? |
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
any coders near the wirral? | ItsTheSmell | Coders. General | 4 | 28 July 2022 11:02 |
coders wanted for shenandoah | starlord | project.Amiga Game Factory | 608 | 28 August 2015 11:32 |
Calling all C coders, help me finish an Amiga game! | NovaCoder | Coders. General | 6 | 02 April 2010 23:07 |
Calling all amiga coders/gfxrs/etc... [crazy :P] Amiga Game Project! | Amiga1992 | Amiga scene | 81 | 29 June 2004 04:10 |
|
|