Legacy GM FNAF Style Fake 3D View Tutorial. Shader (20 lines of code)

MilesThatch

Member
GM Version: Game Maker Studio
Target Platform: GLSL ES Shader supported Panforms
Download: Project File
Links: Youtube Tutorial
Summary:
Basic shader that displaces the pixels depending on how far they are from the center. Giving the illusion of 3D camera movement like you see in first few Five Nights At Fredy's Games. Classical point and click games like Scratches: Directors Cut used an actual 3D sphere textured with panoramas in an HDRI format. In our case we are simulating a 3D Cylinder since we don't need to move the camera up and down.

Tutorial:
 
Last edited:

chance

predictably random
Forum Staff
Moderator
This is a fun effect. I've seen a few games use it, to varying degrees.

Your tutorial is good too. The shader code itself is well commented and explained. So the project file you provided would be enough to explain this on its own. But the video you created makes it even more clear. And it also explains some of the basic aspects of shaders in general. Nice job on this.
 

MilesThatch

Member
Jumping on that FNAF hype train. Love that game. Figured something this simple might shed the world of shaders in an easier light.
 

Niels

Member
I can only get this shader to work if i draw it in the GUI end-draw event (like the tutorial)... anyone can explain why it doesn't work in normal end-draw?

I would like to have the UI elements not effected by the shader:)
 

TheSnidr

Heavy metal viking dentist
GMC Elder
Very cool! I remember I attempted something like this many years ago, using real-time primitives and stuff. It was a nightmare before shaders were around xD
 
Q

Quailfail

Guest
Thank you for the wonderful tutorial. I've never touched Shaders before so this was very cool to try out.
 

Rukola

Member
Thanks, Rukola. I have 3 different soundclouds actually, one for Soundtrack Composing, one of experimental hip hop stuff and one for edm music. I've actually just officially published my first album. Itunes, google music and everything, heh:
That's awesome man! I sadly didn't buy anything but the preview of After 5 and Messenger sound pretty cool ;)

If you ever want someone to test your game, I'd gladly take a look.
 

MilesThatch

Member
Your download link's broken.
Yes, thanks for the notice. this is temporary.
Part of being an indie dev, working on a project out of my own pocket, is being broke. Had to allocate what little income I have to paying off some bills and hosting service was unfortunately low on my priority list. In fact all my websites are down at the moment because of it. It should be back up tomorrow - thursday at around 5:00am Canada Time.

On another note, if you want to help on the ol' donations front. I have two music albums you can buy to help me out with paying my bills:

https://www.cdbaby.com/cd/milesthatch
https://www.cdbaby.com/cd/piermayhem
 
Yes, thanks for the notice. this is temporary.
Part of being an indie dev, working on a project out of my own pocket, is being broke. Had to allocate what little income I have to paying off some bills and hosting service was unfortunately low on my priority list.
Is there a reason to not use Dropbox for free? If so I'd like to know, because I do.
 

MilesThatch

Member
Is there a reason to not use Dropbox for free? If so I'd like to know, because I do.
Since I still need hosting in order to have my websites up, that's what I use to host the files as well. Not only can I host these files, I get unlimited storage too.
 
Last edited:
Top