English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   Coders. Asm / Hardware (http://eab.abime.net/forumdisplay.php?f=112)
-   -   Amiga sprites behind background? (http://eab.abime.net/showthread.php?t=98333)

oRBIT 04 August 2019 19:10

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?

Galahad/FLT 04 August 2019 19:32

Quote:

Originally Posted by oRBIT (Post 1336383)
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

idrougge 04 August 2019 21:50

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.

Coagulus 04 August 2019 22:51

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.

Shatterhand 05 August 2019 01:16

Quote:

Originally Posted by idrougge (Post 1336408)
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 :)

mcgeezer 05 August 2019 17:00

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.

buzzybee 06 August 2019 21:16

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 here ...

phx 07 August 2019 11:00

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.

aros-sg 07 August 2019 11:53

If foreground tiles overlap player sprite copy real sprite to some scratch sprite buffer and NAND over the foreground tile masks.

Shatterhand 07 August 2019 15:33

Quote:

Originally Posted by phx (Post 1336864)
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.


All times are GMT +2. The time now is 00:57.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.

Page generated in 0.05935 seconds with 11 queries