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: 44
Posts: 260
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: 46
Posts: 7,309
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: 3,888
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: 663
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: 36
Posts: 3,370
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 online now  
Old 05 August 2019, 17:00   #6
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,422
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: 239
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: 1,451
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: 32
If foreground tiles overlap player sprite copy real sprite to some scratch sprite buffer and NAND over the foreground tile masks.
aros-sg is online now  
Old 07 August 2019, 15:33   #10
Shatterhand
Warhasneverbeensomuchfun

Shatterhand's Avatar
 
Join Date: Jun 2001
Location: Rio de Janeiro / Brazil
Age: 36
Posts: 3,370
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 online now  
 


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:52.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.07163 seconds with 15 queries