Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dynamic circle effect from Contra 3 / Probotector
#1
So, this perfect circle shield, pulsating (time code linked)
https://youtu.be/hGUw3C0XzWI?t=25

And this expanding perfect circle, flashing (time code linked)
https://youtu.be/hGUw3C0XzWI?t=887

I believe it's some kind of raster effect, but I wouldn't know where to start.  Unlike the frog bitmap with a pulsating effect, this circle seems perfect - would it really be a bitmap large enough to still look like a perfect circle even at full screen?  (You'd think it was drawn with some "circle" function  Smile  )
Reply
#2
For the first effect, the pulsating small shield, I would use a sprite with a perfect circle at fixed resolution and a single color, and then use a raster effect to change the palette value of that color.

The scaling circle to full screen is another issue, used also in Super Mario World as a transition after ending a level. I don't have a clue, it may be good idea to load it into an emulator with debugging support and inspect what's going on. I think that a "circle paint" routine in realtime would be too expensive for the SNES (but would be easily done in Tilengine on current hardware), and the use of a Mode-7 scaling background is not possible because the effect is overlaid on top of another layer(s).

Any other guess?
Reply
#3
decal splatting techniques would be the way to go for the first one, you draw a transparent(about 60-75%) circle sprite around your shielded object. To show hits on the shield, you could temporarily draw another sprite over the first, rotated to match the incoming projectile direction.
Reply
#4
(08-09-2018, 06:52 AM)greysonstorm Wrote: decal splatting techniques would be the way to go...

That's true for modern graphic engines and would be the way to go. But I think that Domarius is asking how the SNES could do that, and to some extent, how to replicate it with Tilengine. The SNES had very limited transparency support -and was the only 16-bit system that had some form of it-, and no sprite rotation at all. We have to consider the severe constraints of such hardware.
Reply
#5
I imagine you can draw a circle one line at a time by stopping and starting drawing at the right point for each line.  Perhaps the SNES had this level of control per line?

Ah yes I know the Super Mario World transition you're talking about - and they have a "keyhole" one as well for the secret levels.  The key hole silhouette could also be drawn by starting and stopping once per line - the shape has no "concave" areas... I think this isn't a coincidence...

Well anyway - I suppose I could use SDL to draw on top of the screen after Tilengine has drawn, to fake any effects like this!
Reply
#6
I don't think the SNES (or any other system of the era) had the ability to modify rendering parameters in the middle of a scanline. The time to traverse a single pixel is much shorter than the time to execute a single CPU instruction, and different TV standards use different timings, so the effect would be messed up in PAL/SECAM. So I think this is a dead end.
I guess the actual method is much simpler and uses the available tools: sprite overlapping and palette cycling with raster effect. If the circle shield is a 1-color sprite that shares palette with the main character, put the shield sprite behind the character sprite, and cycle that palette on each line, you have it.

As for the big scaling keyhole/circle transition, it should be interesting to load into an emulator and see what's happening. It acts as a vector layer, but I guess it's not the case, just what it looks like.
Reply
#7
(08-17-2018, 04:56 PM)megamarc Wrote: As for the big scaling keyhole/circle transition, it should be interesting to load into an emulator and see what's happening. It acts as a vector layer, but I guess it's not the case, just what it looks like.

Perhaps they use some background priority trickery. IE: Step 1: keyhole, and other backgrounds, are behind Mario. Step 2: Other backgrounds are set above Mario, with a Keyhole-shaped cutout. Is this possible on an SNES?

Also, I have noticed a few quirks:
1. The enemies disappear when it shrinks.
2. The item at the top of the screen is also sucked into the keyhole.
3. It is rendered above the menu.

EDIT: I just reached a keyhole. When I disable all layers, including sprites, there is a blue color, and then the keyhole is there.

[Image: 3NKXaPB.png]

When I disable transparency effects, the color in the background disappears, or BG#2 disappears if it is enabled. When I disable clipping windows, the hidden sprites reappear.

Also, I found an article on SNES transparency, and another on windows.
Reply
#8
Reply
#9
Reply
#10
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)