English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 04 August 2019, 19:10   #1
oRBIT
Zone Friend
 
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 339
Amiga sprites behind background?

I suck at sprites, sadly. I wished I've worked more with them back in the days.. Anyway, got one question for all skilled people here.. Is it possible to have Amiga-sprites appear "behind" the background/bitplanes?
Consoles (NES comes to mind but probably others too) have bits to set for single sprites to have them appear behind the background but I don't think I've seen this for the Amiga... Or?
oRBIT is offline  
Old 04 August 2019, 19:32   #2
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,994
Quote:
Originally Posted by oRBIT View Post
I suck at sprites, sadly. I wished I've worked more with them back in the days.. Anyway, got one question for all skilled people here.. Is it possible to have Amiga-sprites appear "behind" the background/bitplanes?
Consoles (NES comes to mind but probably others too) have bits to set for single sprites to have them appear behind the background but I don't think I've seen this for the Amiga... Or?
Yes, you can change hardware sprite priority in BPLCON2

http://amigadev.elowar.com/read/ADCD.../node0159.html
Galahad/FLT is offline  
Old 04 August 2019, 21:50   #3
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,334
The reason you haven't seen it on the Amiga is that hardware sprites are less often used for "sprites" – instead, they are used for overlays or as parallax backgrounds.
idrougge is offline  
Old 04 August 2019, 22:51   #4
Coagulus
Gets there in the end...
 
Coagulus's Avatar
 
Join Date: Sep 2005
Location: Wales
Posts: 863
For JetHunt, the main Sprite, bomb, explosion and lasers all go in between the front and back playfields. :-)

The sprite priority is switched to right into the foreground when displaying the "paused" sprite.
Coagulus is offline  
Old 05 August 2019, 01:16   #5
Shatterhand
Warhasneverbeensomuchfun
 
Shatterhand's Avatar
 
Join Date: Jun 2001
Location: Rio de Janeiro / Brazil
Age: 41
Posts: 3,450
Quote:
Originally Posted by idrougge View Post
The reason you haven't seen it on the Amiga is that hardware sprites are less often used for "sprites" – instead, they are used for overlays or as parallax backgrounds.
Actually I feel a lot of properly programmed games use sprites for the main character and reuses them for overlays. And smartly coded ones also reuses them for extra layers of parallax as you said.

But I really feel they are used very often to draw the main character. It's a nice way to get more colors for the main hero when you are using Dual Playfield
Shatterhand is offline  
Old 05 August 2019, 17:00   #6
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
In Rygar I use the hardware sprites quite extensively as enemies with the hardware sprite appearing in front of the bitplanes.

However I quickly came up against a problem in that the sprites often glide above the play area into the upper and lower panels so instead of clipping them I used a non-transparent Black in the panel areas and switched the sprite priorities at the start of the main game area.
mcgeezer is offline  
Old 06 August 2019, 21:16   #7
buzzybee
Registered User
 
Join Date: Oct 2015
Location: Landsberg / Germany
Posts: 526
In RESHOOT R I use sprites just like Shatterhand proposed, for displaying the main ship, bullets, parallax background and score.

Using the Amigas copper it´s possible to switch bits in BPLCON2 at almost any given x- and y-position on the screen. Therefore one sprite can be on top of a playfield in the, say, the middle of the screen. And can be behind a playfield at farther to the right - a technique used for the score display at the very right top and bottom corner of the screen.

The fifth level of RESHOOT R switches priorities quite a bit – have a look [ Show youtube player ] ...
buzzybee is offline  
Old 07 August 2019, 11:00   #8
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
Using sprites for the main character has never been an option to me in the past, because their display priority is limited to foreground or background. Theoretically you can also place them between two independant playfields, but I always wanted my OCS games with 32 colors. When using background- and foreground-tiles it becomes impossible to render a sprite between those tiles.

I'm using sprites a lot for displaying scores and parallax layers, though.
phx is offline  
Old 07 August 2019, 11:53   #9
aros-sg
Registered User
 
Join Date: Nov 2015
Location: Italy
Posts: 191
If foreground tiles overlap player sprite copy real sprite to some scratch sprite buffer and NAND over the foreground tile masks.
aros-sg is offline  
Old 07 August 2019, 15:33   #10
Shatterhand
Warhasneverbeensomuchfun
 
Shatterhand's Avatar
 
Join Date: Jun 2001
Location: Rio de Janeiro / Brazil
Age: 41
Posts: 3,450
Quote:
Originally Posted by phx View Post
Using sprites for the main character has never been an option to me in the past, because their display priority is limited to foreground or background. Theoretically you can also place them between two independant playfields, but I always wanted my OCS games with 32 colors. When using background- and foreground-tiles it becomes impossible to render a sprite between those tiles.

I'm using sprites a lot for displaying scores and parallax layers, though.
For platform games at least, usually the games that most impressed people had Dual Playfield + Sprite for main character and HUD overlay (score, lives, etc). Lionheart, Mr. Nutz, Turrican 3, both Chuck Rock games,

I've seen some games using both the Back and Front playfield to draw enemies, so you could either use the back palette or the front palette for them (I think the Chuck Rock games do that, not 100% sure though).

Or, yes, you do the 32 colors thing and forget about dual-field parallax (Ruff 'n' Tumble, Superfrog).

Turrican 2 would switch between modes, though I think in "single" playfield mode the bitmap was always at 16 colors anyway. It's really funny to see the last boss on that game when the tiles on the background "switches" its colors in real time while the game switches from single playfield to dual playield to allow the big boss to appear as a single bitmap on the background. That was some really smart coding there.
Shatterhand is offline  
Old 13 November 2023, 18:59   #11
oRBIT
Zone Friend
 
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 339
I've been experimenting a bit with BPLCON2 (a few years later), BPLCON2 obviously affects the entire scanline.. Assuming I have a few sprites on the exact same scanline, but only a few should be in the background, this won't work?
oRBIT is offline  
Old 13 November 2023, 20:47   #12
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 185
is possible.
1. spritepriority in groups of two 0,1 2,3 4,5 6,7 (sprite 0,1 in front (higher priority), sprite 6,7 behind)
2. single- or dual-playfield?
2a) single-playfield 1-6 bitplanes use only bits PF2P2-0
2b) dual-playfield 2*(1-3 bitplanes) use PF2P2-0 and PF1P2-0
3. dual-playfield: playfield 1 - bitplanes 1,3,5 and playfield 2 - bitplanes 2,4,6
4. P2PRI if set - set playfield 2 higher priority over playfield 1
5.
PF2(1)P2-0=0 (000) p-s-s-s-s ; p-playfield, s-sprite
PF2(1)P2-0=1 (001) s-p-s-s-s
PF2(1)P2-0=2 (010) s-s-p-s-s
PF2(1)P2-0=3 (011) s-s-s-p-s
PF2(1)P2-0=4 (100) s-s-s-s-p
Rock'n Roll 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
Amiga 500 - black background in Workbench moochamerth support.Hardware 7 17 February 2018 19:36
How did Amiga sprites work? Foebane Retrogaming General Discussion 13 29 May 2017 16:41
Amiga Sprites Ripper?? DerekAutista123 support.Apps 3 19 March 2016 00:14
Amiga OS 3.9: Transparent background of Icons font? Kenan support.Other 2 29 June 2013 10:35
Amiga Game Sprites? Dreedo request.Other 2 30 November 2011 19:47

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 13:05.

Top

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