Game Maker Juicy Effects – Smooth Camera Movement – Part One

[ad_1]
Brand new 2017 Game Maker Studio: 2 Course available right now

Game Maker Tutorial
Game Maker Effects

In this video we learn how to add cool smooth camera movement within our game. If you have any questions then be sure to leave a comment or contact me on twitter; realtutsgml. If you learned something then be sure to leave a like, comment, and favorite.

Have you ever wanted to create games? Have you ever gotten fed up with it being to difficult? Well now is the time to thank me and possibly subscribe because you have just found the channel for you! Game Maker Tutorials, Java Game Programming, Unity3D Tutorials, Batch, C++ and much much more! This is the channel for you, the one stop shop for an exploration of your hidden talent as a game developer. Unleash your potential and go wild with imagination when you finally figure out how to make any game you want!

Visit CodingMadeSimple for more exclusive tutorials and get the help you need to succeed as your very own indie game developer!

Follow me on twitter for exclusive content and interaction with me!

Game Maker Studio: Programming
Game Maker Studio: Tutorial
Java Programming
Game Programming
Game Tutorial
Programming Tutorial


Posted

in

by

Tags:

Comments

31 responses to “Game Maker Juicy Effects – Smooth Camera Movement – Part One”

  1. Mason Thompsen Avatar

    You should continue this series.

  2. ShivGames Avatar

    How do I translate this to java, he said look at this video in the java tutorial, but I figure it out!

  3. Luke Fernandez Avatar

    What is the width and height of the room? anyone??

  4. Amidaes Bowinder Avatar

    Thank you soo much for this, I've been looking for where this vid was for a while. I'm currently working in java and couldn't figure out how to make a smooth transition. but this just simplifies everything i was trying a lot. 😀

  5. Ѧ Avatar

    Thanks a lot this code was great and everything's working as expected. But you should really plan your code before making a tut video, had to retype it a few times because you kept changing it during the video.

  6. Andrew Jack Avatar

    Anyone got it to work on GM 2?

  7. Fx oXX Avatar

    your code causes my sprites to look blurry 🙁

  8. team toilet Avatar

    how do you make the player stay in the middle of the fucking screen you can't even see what's in front of you with this shit load of fuck

  9. hamza62240 Avatar

    view_xview[0] += ((x-(view_wview[0]/2)) – view_xview[0]) * 0.1;
    view_xview[0] = clamp(view_xview[0],0,room_width);

    Stick this into either your player object or a script. For the lazy, but I also made it so it stops at the edges of the room.

  10. Bonus Bros Avatar

    IF! you get any shake problems, its due to having the image angle in negative

  11. The Starstrewn Avatar

    How can you say the view does not go outside of the room? Because I don't want to make giant walls in every level^^

  12. Stephen Moynahan Avatar

    So it has 19,433 views….. and 63,530 likes? Youtube, you done fucked up

  13. spectrum Avatar

    this is useful and all, but without a prior tutorial on this kind of a platformer (using the inbuilt functions and shit) i'm finding it hard to implement

  14. Josip Makjanić Avatar

    I put this in my script section:

    view_xview[0] += ((x-(view_wview[0]/2)) – view_xview[0]) * 0.5;

    Named the script camera_movement and then put this in player's step event:

    camera_movement();

    Didn't work.

  15. Nicholas Maddalena Avatar

    This is exceptional. Thank you so much for the tutorial!

  16. Joshua Avatar

    Have you got a tutorial that explains how to achieve smooth camera panning when switching between a view that follows the player and a view that follows the mouse cursor on a button press? Have heaps of trouble trying to get it to work.

  17. Sam Arnold Avatar

    I have the code and it works fine but on exit now I get the error " "" is not a valid integer value" if I remove the code it is fine.

  18. The Vault Assets Avatar

    For anyone who wants a similar effect using the Drag and Drop system:
    1. Create a player object (I call mine obj_guy) 
    2. Create a camera object
    3. Put these blocks in the Step Event of the camera object in this order:
              -if variable self.x does not equal obj_guy.x
              -move towards point  |x = obj_guy.x| |y = obj_guy.y| with a speed of distance_to_object(obj_guy)*.1
              -if variable self.y does not equal obj_guy.y
              -move towards point  |x = obj_guy.x| |y = obj_guy.y| with a speed of distance_to_object(obj_guy)*.1

    The .1 value is the value that manipulates how quickly the view follows the player.

  19. Nommiin Avatar

    view_xview = lerp(view_xview,<player object>.x-(view_wview/2),0.1)
    view_yview = lerp(view_yview,<player object>.y-(view_hview/2),0.1)

    view_xview = clamp(view_xview,0,room_width-view_wview)
    view_yview = clamp(view_yview,0,room_height-view_hview)

    I guess that's a bit simpler.

  20. Megalink Avatar

    Thanks for making this!

  21. U_S Avatar

    nvm i named the script wrong

  22. U_S Avatar

    when i did camera_movement();
    it said : unknown function or script

  23. KittyOnTheMoon Avatar

    Thx man i needed this :3

  24. Nubs926 Avatar

    This is great, but my UI elements (cursor, icons around the border) now float around with the camera. Is there any way to nullify this?

  25. GAMER LINK Avatar

    WHATS A CODE??? MOving a block

  26. Harry Burkitt Avatar

    For Anyone Who Has The Problem Where Their Camera Wont Follow The Player Vertically, Copy This Code Into Your Camera Script:

    view_yview[0] += ((y – (view_hview/2)) – view_yview[0]) * 0.06;

    If This Works,  Please Like This Comment.

  27. Tox Avatar

    Could somebody help me out with adding VERTICAL camera lerping?  This works perfectly for horizontal lerp, but if I jump, the camera is not smooth anymore. 

  28. Lightning Splash Avatar

    Oh my god thank you! I've always wanted this type of camera movement.

Leave a Reply

Your email address will not be published. Required fields are marked *