HWA Sniper Scope example

5
Your rating: None Average: 5 (1 vote)
Difficulty Level: 
Advanced
Topic: 
Game Coding

This example shows how to use the HWA version of Multimedia Fusion 2 to create a decent sniper scope. It uses Looki's Hole and Lens shaders available here:

All of Looki's shaders:
http://clickteam.info/looki/Shaders/

The ones used should be from these two links below:
http://clickteam.info/looki/Shaders/ShaderPack2.zip
http://clickteam.info/looki/Shaders/Lens.zip

The example available here:
http://www.filefront.com/16544183/Sniper_scope_example.rar/

The concept is to have three layers working together. The lens layer that is a round active object textured darker around the edges with a white centre. The lens shader is applied to this to give a nice effect. In this exampel i think i over did it a little too much but this way you can see exactly what the shader does. Then a crosshair layer above this so that it is not affected by the shader. Then have an overlay that we apply the hole shader to and add a bit of simple code to have that hole appear at our mouse location.

This method avoids the old technique of having a huge black square the size of 4 frames with a hole drawn in the middle.