Game Maker Tutorial – Flipping Sprites IMPROVED

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

In this video I show you an improved way of flipping sprites within Game Maker. 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.

original sprite video –

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!

Follow me on Google+ to keep updated with all of my tutorials

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


Posted

in

by

Tags:

Comments

46 responses to “Game Maker Tutorial – Flipping Sprites IMPROVED”

  1. BT -7274 Avatar

    how do i make my enemy flip to follow the player. like if the player is on the left side of the enemy, the enemy will look left and if the player is on the right side, the enemy will look right?

  2. Mnooper Avatar

    i followed the steps on a player object but now it falls partway through the floor, and jumping up hitting a floor, i go through partway. (I am making a zombie platformer) overall the collisions are bugged out, and act like the object is smaller than the sprite.
    did this happen to anyone else or know how to fix it?

  3. DaDaLP s Avatar

    how do i make in the step event that it rotates when my mouse is in the other half of the screen

  4. A.J Briggs Avatar

    it doesn't work, and now my left wont work and i checked it.

  5. SamJam Avatar

    it says i need the god dam pro edition to use at position 1

  6. FoxAdventures Avatar

    The "center" button seems to be gone in the new version of Game Maker. Can anyone tell me the code to center the sprite?

  7. ChristovixWrites Avatar

    I have a question related to the video. (hah.)
    I put this code to use, however, it only flips the assigned sprite. For my player object, i just have the standard Idle sprite as the assigned sprite. But in GML I've made the sprite change based on whether I'm jumping, moving, or lifting an object.
    The idle sprite changes when i change direction, using this code. However the other animations do not flip. How would I go about doing that?

  8. MrTNT6000 Avatar

    how do you make debris fly away from an explosion

  9. some one NAME VALENCIA Avatar

    climbing animation how do I do that, MAKE VIDEO ABOUT CLIMBING ANIMATION OF A LADDER PLEASE!!!!

  10. m1ksu Avatar

    intro is so cringy

  11. RTP Avatar

    Awesome tutorial! very easy and fast. thank you 😀

  12. squibbly Avatar

    i keep getting this error message and have no clue what is wrong because the code is exactly the same as the other direction but a different key ############################################################################################
    FATAL ERROR in
    action number 3
    of Step Event0
    for object testbluesq1run:

    Push :: Execution Error – Variable Get 100000.vk_d(100002, -2147483648)
    at gml_Object_testbluesq1run_StepNormalEvent_3 (line 1) – if(keyboard_check_pressed(vk_d)) facing = 1;
    ############################################################################################

  13. Liam Fosdike Avatar

    thanks this helped

  14. Cyborg X Avatar

    Anyone else get this issue where it spawns the player not at the correct spawn point?

  15. that one guy Avatar

    You are a very good teacher

  16. R33D PLAYS Avatar

    so i followed this tutorial, and made a script,
    if room_exists(room2) image_xscale = (-1)
    if room_exists(room1) image_xscale = (1)
    but it warps my sprites size, whats up with that?

  17. Lord Baron Sir Hayden Avatar

    is there a way that i can have the enemy sprite flip? Example: If my enemy is walking to the left. the enemy hits the wall. the sprite should turn around and flip to face the right.

  18. Jake Linville Avatar

    Hello! Im an amateur programer, and I decided to start gml four days ago (It was very simple as my main language is python and the syntax is very similar). However, I am having trouble getting the animation for the fliped sprite to work. only the original with cycle through. If anyone could provide some insight to my dilemma, it would be much appreciated. 

    Here is my current code:

    //setting movement

    if(keyboard_check(ord("D")))
    {
        image_xscale = 1
        image_speed = 0.25
        move = 1
        obj_h_player.x += move
    }

    if(keyboard_check(ord("A")))
    {
        image_xscale = -1
        image_speed = 0.25
        move = -1
        obj_h_player.x += move
    }
    else
    {
        image_index = 0
        image_speed = 0
        move = 0
    }

  19. Andy Rodriguez Avatar

    he really is a genius

  20. Ghostguin FGC Avatar

    Question, I'm making a fighting game. How do I set it to make sure that the way my character is facing is opposite to the opponent. Say My opponent is facing left (towards me), I jump over, once I hit the ground the opponent switches to looking towards the right and my character looks towards the left. With that being said how would I switch the combos(motions) altogether. On the left motion for a special is S, SD, D, H. When I'm on the right should be S, SA, A, H. I feel a "if" statement should be somewhere in my code..

  21. Bo Harris Avatar

    whats wrong it doesn't seem to work i keep getting an error
    draw_sprite_ext(sprite_index,image_index,x,y,facing,1,0,c,white,1);

    it keeps saying my alpha is wrong

  22. Cue Da Ninja Avatar

    Cool…what about collisions with other objects?  

  23. Markess A. Wilder Avatar

    Ok using this method how do I go from my idle animation (when not Moving) to my left/right movement for my animation?

  24. Markess A. Wilder Avatar

    Yep! You're a genius… Do you have one basic tut for moving and jumping with and animated player?  Actually I have all the animations for walk, jump, fall, and duck I just need to know how to implement them.

    Thank you this was a big help.

  25. wheatherd Avatar

    The problem I'm having is my character isn't symmetrical… so I have to make two separate sprites for each turn. That, and I have no idea how to get the leftjump and rightjump going well.

  26. cavedog962 Avatar

    Awesome tutorial! I'd love to see a tutorial about drop-down menus in the future. 

  27. KurtBliss3 Avatar

    Using your own draw event with the facing variable is useful to prevent your character stuck in walls whens changing directions too and also really useful for TDS games just use that facing variable for the image_angle. For those interested here's all the default image values, draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha);

  28. Nick Avatar

    Can you make a tutorial only for draw_sprite_ext() and how to use it?

  29. steven jurriaans Avatar

    your videos are the best man. I am improving so much and making heaps of progress thanks to you!

  30. TWHD. Avatar

    Great! thanks for the help 🙂 Achievment Get: +1 Subscriber    😀

  31. J_laubster Avatar

    Hey RealTutsGML you should make a video or series on how to program a game for android devices.

  32. paulisawesome10 Avatar

    I like how you explain the code and I understand it unlike other channels. You helped me with the basics of programming and now I feel I can create anything. Keep up the good work

  33. Omar .M abdelzaher Avatar

    please please please please a full gml course please
    or tell us from where did you learn it please please please please please
    PLEASE

  34. lazicful Avatar

    Do an inventory system with one item per slot?

  35. Billy Avatar

    Do advanced menu's and ini files

  36. MCBlueCheese Avatar

    Could you make tutorials on the game engines of construct classic or game develop
    Compilgames.net

  37. James Korvenius Avatar

    good to use for enemys, other than that…ehhh^^

  38. Blueman3612 Avatar

    Do a sound tutorial please!

  39. Tangy Pickle Avatar

    Most channels skip all this stuff and jump straight to harder stuff with this shoved in. Iv been using game maker since christmas and have been doing this since I started, but I love that you're showing these basic things on there own and explaining it properly in stead of expecting us to know it all 😀
    keep it up bro, it's a nice reassurance!!

  40. Brandan Hackenbacker Avatar

    How did you learn so much about GML?

    And books or anything you would recommend 

  41. PixelRobin Avatar

    Nice! These are the kinds of tutorials I like to see 😉

  42. Jonah Kirk Avatar

    Can you please do a tutorial on how to make an object invisible behind translucent objects, such as in Super Mario World (SNES) in the boo's house with the bubbles.
    Of course this is only if it is possible. 
    Also, the Atari gradient stuff, and colors that seem to be behind the sprites, such as in that kool-aid game. 

  43. Tropicalfishboy Avatar

    Wow this is awesome! Been needing something like this for a while now, Thanks!

  44. Blizzard Muffin Avatar

    What language does Game Maker use?

  45. Zekronz Avatar

    I still love watching these videos even if i already know all this 😀

Leave a Reply

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