Circular Transparency

SGDK only sub forum

Moderator: Stef

Post Reply
cloudstrifer
Very interested
Posts: 118
Joined: Mon Feb 19, 2018 7:31 pm

Circular Transparency

Post by cloudstrifer » Tue Feb 05, 2019 7:59 pm

Hi!
I want to create a circular transparency, like Goofy Troop.

My idea is not bad, but it not will work for two players.

https://www.youtube.com/watch?v=oJ_lcxGRb0I

I use a full black background and this tileset to simulate light.
light.png
light.png (16.47 KiB) Viewed 9451 times
Somebody can help me, to make a 2 player solution?

Thank you!

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Circular Transparency

Post by Sik » Tue Feb 05, 2019 9:26 pm

I don't think I've seen anybody pull it off on Mega Drive, so that should tell you something already (on SNES it's easier as you can exploit its window feature for that purpose).

Only obvious suggestion that comes to my mind is to redraw the tilemap (literally move the holes themselves in it, rather than moving the tilemap). How much accuracy you want here is up to you (if you can do with it not being pixel perfect you can probably find ways to speed it up by cheating on what tiles you draw in it).
Sik is pronounced as "seek", not as "sick".

cloudstrifer
Very interested
Posts: 118
Joined: Mon Feb 19, 2018 7:31 pm

Re: Circular Transparency

Post by cloudstrifer » Wed Feb 06, 2019 2:08 am

Yes, I made it, and to be a little smooth i used 8 images moving circle 1 pixel to right.
But the big problem will be the second player, I will try it latter.

https://www.youtube.com/watch?v=sVottsqwtyc

Image


Thank you!

Miquel
Very interested
Posts: 514
Joined: Sat Jul 30, 2016 12:33 am

Re: Circular Transparency

Post by Miquel » Wed Feb 06, 2019 4:16 pm

What Sik is telling you is:
For 1 player: Just create the opaque plus transparent circle on plane A once, then just move plane accordingly with player movement for every frame.
For 2 players: you need to recreate the plane creating two holes FOR EACH FRAME.

Now, my saying, if you go for this technique use tile masking for collisions with both holes. You need to label every tile and consider every possible collision and its result.
Also consider other solutions: using different palettes, light-dark + sprite hiding. Or using the “1 player” solution changing focus between both players on each next frame. Just a bit of mental experimentation will tell you what you want.
HELP. Spanish TVs are brain washing people to be hostile to me.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: Circular Transparency

Post by Chilly Willy » Wed Feb 06, 2019 4:36 pm

Or using the “1 player” solution changing focus between both players on each next frame.
This might look even better - it should be darker and a little flickery, as if lit by a flickering torch. He might try this for one player (just turn off the display ever other frame) and see how it looks. If it looks good for 1P, it should be the way to go for 2P.

cloudstrifer
Very interested
Posts: 118
Joined: Mon Feb 19, 2018 7:31 pm

Re: Circular Transparency

Post by cloudstrifer » Wed Feb 06, 2019 9:48 pm

Nice, good ideas.

Thank you!

cloudstrifer
Very interested
Posts: 118
Joined: Mon Feb 19, 2018 7:31 pm

Re: Circular Transparency

Post by cloudstrifer » Mon Mar 29, 2021 4:21 pm

Not solved yet.
Somebody have more ideas?

Thank you!

Post Reply