1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

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

Discussion in 'Tutorials' started by MilesThatch, Jul 27, 2016.

  1. MilesThatch

    MilesThatch Member

    Joined:
    Jul 12, 2016
    Posts:
    423
    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: Jul 27, 2016
  2. chance

    chance predictably random Forum Staff Moderator

    Joined:
    Apr 22, 2016
    Posts:
    799
    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.
     
    Rukola and MilesThatch like this.
  3. MilesThatch

    MilesThatch Member

    Joined:
    Jul 12, 2016
    Posts:
    423
    Jumping on that FNAF hype train. Love that game. Figured something this simple might shed the world of shaders in an easier light.
     
  4. Niels

    Niels Member

    Joined:
    Jun 22, 2016
    Posts:
    828
    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:)
     
    Quailfail likes this.
  5. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    473
    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
     
    Rukola and MilesThatch like this.
  6. Rukola

    Rukola Member

    Joined:
    Jun 20, 2016
    Posts:
    72
    Sweet soundcloud too.
     
    MilesThatch likes this.
  7. Quailfail

    Quailfail Guest

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

    MilesThatch Member

    Joined:
    Jul 12, 2016
    Posts:
    423
    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:
     
  9. Rukola

    Rukola Member

    Joined:
    Jun 20, 2016
    Posts:
    72
    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.
     
  10. MilesThatch

    MilesThatch Member

    Joined:
    Jul 12, 2016
    Posts:
    423
    Thanks, heh. I'll keep it in mind.
     
  11. 2d_warrior

    2d_warrior Member

    Joined:
    Jul 14, 2016
    Posts:
    201
    Your download link's broken.
     
  12. MilesThatch

    MilesThatch Member

    Joined:
    Jul 12, 2016
    Posts:
    423
    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
     
  13. 2d_warrior

    2d_warrior Member

    Joined:
    Jul 14, 2016
    Posts:
    201
    Is there a reason to not use Dropbox for free? If so I'd like to know, because I do.
     
  14. MilesThatch

    MilesThatch Member

    Joined:
    Jul 12, 2016
    Posts:
    423
    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: Jul 9, 2018

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice