Scratchers

This was a fun project I decided to do as part of a Uken Hadoukathon (2 day hackathon at Uken Games). I mostly decided to take on this project to work with cool people at the company who I knew outside of work but never got to work with day to day. They are also the type of people willing to create these:

Anyways, I was also particularly interested in figuring out how to build the scratching effect required to have a scratch card. I came to find that it was pretty easy. Essentially you just import a texture and make it readable and writable and use it to fill the Sprite section of a Unity. You also import a scratch texture we used this one

and essentially apply the inverse of the alpha of this texture around every location the player clicks at. There are definitely better ways of doing this with a shader however it only took 2 hours to get this implementation up and working and I think it looks pretty good in action!

Thanks For Reading!