The Daily Click ::. Forums ::. Klik Coding Help ::. Help with map
 

Post Reply  Post Oekaki 
 

Posted By Message

LordHannu

Crazy?

Registered
  22/04/2007
Points
  7910

VIP MemberStarTeddy BearRibbonGame of the Week Winner2021 Halloween Competition Winner2022 Hi-Score Mash-up Competition (Bronze)2023 Halloween Competition (Bronze)2023 Halloween Competition Entrant
12th October, 2016 at 12/10/2016 23:23:32 -

I got a map where the player moves arond on but i do not want the hole map to be shown only inside a sphare.
this is what i got now.
Image
this is what i am aiming for.
Image

anyone know how todo this?

 
n/a

Fifth

Quadruped

Registered
  07/05/2003
Points
  5818

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
12th October, 2016 at 12/10/2016 23:54:22 -

The easiest way that I can think of is to put your map on a separate layer. We'll call this the map:

Image

And on your gameplay layer, you make a black circle the size and shape of your map, and set it to always be on the front.

Something like this:

Image

Then on your map layer, you cover everything EXCEPT that same little circle with black. Choose your favorite means to do this.

Image

And finally set your map layer to the "add" blend mode (you'll need to enable Direct3D runtime for this to work, I think), and you should get something like this:

Image


Another way would be to make a simple shader that displays only that circle. It would be a more elegant solution, but then you'd have to write a shader. But you'd be able to apply that to either your map or the layer the map's on.

 
Go Moon!

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
13th October, 2016 at 13/10/2016 20:09:40 -

That's a pretty cool solution Fifth. Going to have to use that sometime.

 
n/a

J.C



Registered
  22/03/2013 05:18:14
Points
  118
13th October, 2016 at 13/10/2016 20:23:37 -


Originally Posted by LordHannu

Image
this is what i am aiming for.
Image



Just wanted to say, neat graphics LordHannu! Very retro style.

Edited by J.C

 
n/a

LordHannu

Crazy?

Registered
  22/04/2007
Points
  7910

VIP MemberStarTeddy BearRibbonGame of the Week Winner2021 Halloween Competition Winner2022 Hi-Score Mash-up Competition (Bronze)2023 Halloween Competition (Bronze)2023 Halloween Competition Entrant
18th October, 2016 at 18/10/2016 22:27:52 -

Thanks Fifth! works flawless,
Glad you think so J.C

 
n/a
   

Post Reply



 



Advertisement

Worth A Click