The Daily Click ::. Forums ::. Klik Coding Help ::. Sniper Game?
 

Post Reply  Post Oekaki 
 

Posted By Message

G. Hull



Registered
  07/01/2009
Points
  125

Wii Owner
12th May, 2010 at 17:37:49 -

Hey all.
Another question for you guys.
I've got a game I'm making (what a shocker) and I need some help with it.
I want to make a Sniper game where you are shooting--dare I say, people--and you must kill a certain amount to win the mission. I want to create sort of a "Scope" for the sniper, so it blacks out everything that the circle isn't overlapping. I don't, however, want to make the scope a Transparent circle with a black border twice the size of the whole frame always at the position of the mouse, as that idea would be completely laggy the game and would be a scene to fix up right. I was thinking it might require use of the active overlay or just the overlay object created by Andos, but I'm not sure.

Thanks a lot!

 
n/a

aphant



Registered
  18/05/2008
Points
  1242
12th May, 2010 at 19:35:16 -

What you could do is have a transparent circle cut into a black square. Then, have a small object filled with black that is stretched from each of the edges of the window to the side of that scope-square.

 

G. Hull



Registered
  07/01/2009
Points
  125

Wii Owner
13th May, 2010 at 00:12:36 -

Sorry, but I'm not following =\

 
n/a

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
13th May, 2010 at 10:07:06 -

A good idea would be to make every object invisible unless overlapping the scope, set background to black offcourse, but aswell the scope should have another black outline circle that is a bit thicker that only acts to hide objects that are overlaping visible so they dont appear whole until they are in the scope actual circle.

Offcourse this should mean that u cannot make too big objects anywhere... Oh and u can use the lens object for the scope that would be cool

Edited by Don Luciano

 
Code me a sausage!

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
13th May, 2010 at 10:38:39 -

If you use the HWA version of MMF then you won't experience slow down when you use a huge black active object.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
15th May, 2010 at 15:11:04 -

You can indeed do this with the Overlay object too.
I think what you need to do is put the overlay object onto a layer on top of everything and then every MMF loop fill the overlay with black and draw a transparent circle where the cursor is

I have no idea whether this would be quicker than just making a large active object like the others have suggested.

 
n/a

Mr_Tom



Registered
  01/12/2007
Points
  389
22nd May, 2010 at 11:49:34 -

in HWA you can use the Looki's lens shader and hole shader to make an awesome sniper scope of the nature you desire.
Does involve a large black active though but it doesnt move and its only as large as the screen is and that wont slow anything down. The X and Y coefficients are just set to (Xmouse*1.0)/Frame Width*1.0) and same for Y axis.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click