Death pit + save spot - [Game Maker Studio 2 | Basics]

Поділитися
Вставка
  • Опубліковано 16 вер 2024
  • This basic video tutorial shows you how to setup an instant death pit/area and a save spot the easy way in GameMaker Studio.
    The concept is actually quite easy. You simply need 2 objects. One for the death pit which is a simple rectangle that checks for a collision with you player. The other one a save spot that is being placed on strategic places as a teleport destination. Upon collision of the player with the death pit the player is being teleport to the nearest instance of the save spot. Thats it.
    There are of course more difficult and elaborate ways to do that with for example an array structure where you save you last positions and get teleported back to one of those.
    ▶ Gamemaker Studio: www.yoyogames....
    ▶ Trial limitations: help.yoyogames...
    🎮 My free game Clunky souls:
    1up-indie2.itc...
    💓 My assets:
    Get some assets at itch.io 1up-indie2.itc...
    📜 Udemy: www.udemy.com/...
    👑 Support me and get fresh game art and game maker projects every month:
    / 1upindie
    Follow me on:
    📸 Instangram: / 1upindie
    🐦 Twitter: / 1upindie
    💬 Discord: / discord
    📜 Udemy: incoming

КОМЕНТАРІ • 40

  • @CarlosMagno-hp2bo
    @CarlosMagno-hp2bo Рік тому +2

    Best Game Maker Studio tutorial channel
    that I have ever seen. Thank you very much for sharing, on your channel I found everything I needed to be able to implement and try it in my future games. Now I can fulfill my dream of becoming an indie developer. Thank you very much indeed

    • @1upIndie
      @1upIndie  Рік тому

      That is a humbling statement, so thank you for your trust! Please consider making games a side hobby/hustle. Being an indie developer is a very risky endeavor with unknown outcomes. The failure rate is very high in this field, but if you want to push through anyways, good riddance and success on your journey.

  • @SpaceFrogs_US
    @SpaceFrogs_US 7 місяців тому +1

    Yo I've been searching for a save system for game Jam that is due in 2 days. All of them have been super complicated and not worth my time. But this one, you have made this super simple for me.

    • @1upIndie
      @1upIndie  7 місяців тому

      Glad that is of value to you. Good luck on the Game Jam!

  • @misterr3083
    @misterr3083 4 роки тому +2

    Very excited to hear your Udemy course is ready!!! Congratulations.

  • @MCilja
    @MCilja 2 роки тому +1

    best tutorial !! and so fast i love it haha thanxx man

  • @laszloeszik5033
    @laszloeszik5033 4 роки тому +1

    Cool stuff, I like your videos! Though as haarpmon mentioned, there's the problem with the nearest savepoint. I did something similar, except:
    - I put the player x,y coordinates in a variable at every step, but only when it is grounded (and only on non destroyable objects like falling floors, yes I run into that problem :D), and move those coordinates back a bit on x axis depending on image_xscale, and a bit up in y.
    - when the character dies, it creates a spawn point at the mentioned coordinates, and creates the player object at those coordinates (or moves the player object there if it is not destroyed)
    this way, whenever the player falls or jumps to death, it's back on the last safe point
    I still had to include an object which I scale at whatever size I need, and it stops updating the coordinates if the player is inside that object. So death in that object means the safe point is outside, where the player entered in it. Also, a little bit of not getting any inputs, so the player not fall again when put back to last safe point can help... don't remember what exactly I did with it, I just remember it worked nicely when I tested. :)

    • @1upIndie
      @1upIndie  4 роки тому +1

      Ah so you did something flexible like save those coordinates in an array? Like saving/resetting those at an interval constanly and the resetting it. Neat way, the nearest is to be honest not bullet proof but an "okay" quick and dirty apporach.

    • @laszloeszik5033
      @laszloeszik5033 4 роки тому +1

      No need for array, as the last safe point is always one x,y coordinate, and it's dynamic (refreshed in player's step event), "moves" around as the player does. I absolutely understand this kinda approach, it is still very good, but you know how it is: if you need something more foolproof, then you just have to type in those extra lines. :D And this system took me a couple of days to come up with, write and test as I am not a programmer.

  • @arifiansyahindra
    @arifiansyahindra 3 роки тому +1

    thanks for the video man, you help me so much

  • @haarpmon
    @haarpmon 4 роки тому +3

    The problem is if you die and are closest to a checkpoint you haven't reached yet you will be teleported to that checkpoint as you can see in 4:35. You probably need to add a way to activate a checkpoint first.

    • @1upIndie
      @1upIndie  4 роки тому +4

      Sure you can customize that to your liking, so that they have an "active" state or you save the id of the activated save spot in the player and then teleport to that one. Or when you really want to punish the player you do those save spots very sparingly.

    • @painfactory548
      @painfactory548 Рік тому

      @@1upIndie hello, i have the same Problem and i dont know how to activate a checkpoint, maybe becouse i dont know a lot of commands.

    • @1upIndie
      @1upIndie  Рік тому +2

      @@painfactory548 Well, if you want to have activation then proximity, then you can give all savesports a variable, dunno call it "active", set it on start as false and once you clip into one reset all savepoints active variable to false and set the one that you collided/clipped in as true. So when you fall into the lava or whatever harzard you have to check with a "with" statement if this one is "active == true", if yes, teleport there. Hope that helps.
      If not, try my discord "help" section, there you may find some friendly helping hands.

  • @Kevinkoo1213
    @Kevinkoo1213 7 місяців тому +1

    thats good, but how do i make save spots only work if the player has already reached them?

    • @1upIndie
      @1upIndie  7 місяців тому

      You could do the same system as here but have an "instance_activate" script running so that you enable these spots on the run and deactivate them all once at start.

  • @kanolem
    @kanolem Рік тому +1

    Is it possible to add some death transition when the player touched the area?

    • @1upIndie
      @1upIndie  Рік тому +1

      Sure, you can add anthing you like in there. This video is just a basic way how to do it, so how you advance this is totally up to your inspiration.

  • @spudvi7520
    @spudvi7520 11 місяців тому +1

    when my player touches the death pit it just gets stuck and cant move im not sure what the reason for this is

    • @1upIndie
      @1upIndie  11 місяців тому

      Not sure how I can help you out here. I guess the "teleport to" x,y values are not correct.

  • @taimjnaidi8156
    @taimjnaidi8156 5 місяців тому +2

    It worked the first time but it suddenly stopped and didnt work even after I make it again

    • @1upIndie
      @1upIndie  5 місяців тому

      Hm, no idea how I can help you out to be honest... If you got issues with GameMaker or code try out help sections in my or the offical GameMaker discord channel. Cheers

    • @taimjnaidi8156
      @taimjnaidi8156 5 місяців тому

      @1upIndie dw I remade my game then it worked it must be a problem in my own code thx anyways!

    • @taimjnaidi8156
      @taimjnaidi8156 5 місяців тому

      U earned a sub

  • @NorthGameStudio
    @NorthGameStudio 4 роки тому

    Woah those platforms are awesome! Have you made a moving platforms video?!

    • @1upIndie
      @1upIndie  4 роки тому

      Eh, not really. What you saw is the platformer engine by Tupek. That is the guy who made Cave Blazers, so that is his engine but at an very slim prototype stage.
      I could make an video about that, but then I would need to make an complete sidescroller tutorial series how to get there. So here, not sure if anybody wants to watch those lengthy vids. But maybe I can make a quickfix here too.

    • @NorthGameStudio
      @NorthGameStudio 4 роки тому

      Ha! Dude I would totally watch it lol. I’ve had some trouble with managing the momentum change on moving platformers

    • @NorthGameStudio
      @NorthGameStudio 4 роки тому

      Been seeing a lot of discussion on this engine. Wonder if anyone has tried it. yaru.itch.io/mariaengine

  • @ReynaldoMoysesJunior
    @ReynaldoMoysesJunior Рік тому +1

    simples e funcional, parabéns

    • @1upIndie
      @1upIndie  Рік тому

      Obrigado por assistir o vídeo!

  • @valeriathepaganpriestess7050
    @valeriathepaganpriestess7050 4 роки тому +1

    You are back!!!

    • @1upIndie
      @1upIndie  4 роки тому +1

      Hey mate, I haven't forgotten about you! By the way nice short videos showing your mini game and the current big project.

    • @valeriathepaganpriestess7050
      @valeriathepaganpriestess7050 4 роки тому +1

      @@1upIndie thanks. I open a Patreon

    • @1upIndie
      @1upIndie  4 роки тому +1

      Nice, do you want to have a shoutout (my "time to shill" videos), so people can check out your stuff plus your patreon??
      If yes, can you send a some graphics or something that I can use in the youtube video thumbnail?

    • @valeriathepaganpriestess7050
      @valeriathepaganpriestess7050 4 роки тому

      @@1upIndie
      Oh that would be great mate. What do you need? png, gifs or video?

    • @1upIndie
      @1upIndie  4 роки тому

      @@valeriathepaganpriestess7050 It doesnt really matter, nothing fancy. So a png would be nice to the youtube thumbnail. The rest I will show in my video. So your youtube channel, the cool stuff you do there your game and well your patreon page. Please send me that stuff on discord plus the link to your patreon page.

  • @smidyyy2006
    @smidyyy2006 Рік тому +1

    I did this exact thing word for word and it didnt work.

    • @1upIndie
      @1upIndie  Рік тому

      Hm, hard to help you out there. I have a help section on my discord, so that may do some good.