Make Your First RPG | Movement & Enemies

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ม.ค. 2025

ความคิดเห็น • 102

  • @GameMakerEngine
    @GameMakerEngine  17 วันที่ผ่านมา +30

    The next part for Turn-Based Combat will drop in a couple weeks! Stay tuned 👾
    ⚠ For those using their own sprites and getting stuck in walls: make sure obj_player has a mask sprite assigned. It can be any one of your player sprites.
    Alternatively, you can assign a mask in the Create event of the player:
    mask_index = spr_player_idle_down;
    This should fix the issue of the player getting stuck in walls.

    • @tommcmullin1875
      @tommcmullin1875 17 วันที่ผ่านมา +5

      Exciting. I requested this months ago, glad to see you decided to make such a series!

    • @hunterc9741
      @hunterc9741 11 วันที่ผ่านมา +1

      darn, a couple weeks is a while.

    • @afgh1408
      @afgh1408 วันที่ผ่านมา

      thanks so much for this!

  • @KelpThing79
    @KelpThing79 12 วันที่ผ่านมา +6

    I was just thinking about making an RPG. You guys came to the rescue once again, thanks!

  • @DeathByPixelsVisuals
    @DeathByPixelsVisuals 11 วันที่ผ่านมา +3

    Excellent tutorial Gurpreet!
    You've really grown as a tutor over the last couple of years.
    The new code editor looks nice too - I'm going to give that a try now.

  • @RainBullet_Studios
    @RainBullet_Studios 16 วันที่ผ่านมา +4

    I loved your platforming tutorial and I just got home to THIS GEM

  • @Sharlenwar
    @Sharlenwar 12 วันที่ผ่านมา +3

    Epic, jumping right in to use the new ide and what not. Can't wait to get back into things.

  • @misterr3083
    @misterr3083 16 วันที่ผ่านมา +1

    So so so so good! Thank you Gurpreet!! Your teaching style is so engaging. Thank you 🤟

  • @krisp422
    @krisp422 วันที่ผ่านมา

    Yeah thank you for coming out with this right when I need it! I love your in game sprite of you as well lol excellent video!

  • @fp_ami
    @fp_ami 5 วันที่ผ่านมา +5

    having some trouble around 21:50
    When I try to run the game I keep getting an error in line 1 of the step event saying it doesn’t recognize target_x but I’m not sure where I went wrong as I typed everything correctly (as far as I’m concerned)

    • @dakota4706
      @dakota4706 3 วันที่ผ่านมา

      Yea I keep getting the same error code and I have redone that part so many times.
      ___________________________________________
      ############################################################################################
      ERROR in action number 1
      of Step Event0 for object obj_enemy_parent:
      Variable .target_y(100007, -2147483648) not set before reading it.
      at gml_Object_obj_enemy_parent_Step_0 (line 2) - var _ver = clamp(target_y - y, -1, 1);
      ############################################################################################
      gml_Object_obj_enemy_parent_Step_0 (line 2)

    • @juancarlosleyvabustamante6429
      @juancarlosleyvabustamante6429 2 วันที่ผ่านมา

      declare the targets in enemy1 create code and it will run

    • @muhammedbinnizar7197
      @muhammedbinnizar7197 8 ชั่วโมงที่ผ่านมา

      @@juancarlosleyvabustamante6429 how to do that??

  • @makell6597
    @makell6597 16 วันที่ผ่านมา +1

    thank you so much , i was in the middle of making all my tiles for my game and you drop this Tutorial , now i can make a basic tsting room for my game . again thank you

  • @tommcmullin1875
    @tommcmullin1875 17 วันที่ผ่านมา +5

    I just finished watching it. Good stuff.

  • @UnluckyFoxRot420
    @UnluckyFoxRot420 6 วันที่ผ่านมา +1

    This was so helpful. Thank you so much. You have simplified a lot of things I had been super confused about

    • @UnluckyFoxRot420
      @UnluckyFoxRot420 6 วันที่ผ่านมา

      I did have to add
      move_speed = 1;
      to make the enemy characters actually run

  • @afgh1408
    @afgh1408 วันที่ผ่านมา

    bro i was following a different tutorial before.. i can't believe how much more simple your movement code is!

    • @GameMakerEngine
      @GameMakerEngine  10 ชั่วโมงที่ผ่านมา

      Thank the maker for move_and_collide!

  • @BLOOKET-k2i
    @BLOOKET-k2i 16 วันที่ผ่านมา +3

    i feel lucky that the day i decide to start coding again a video is put out

  • @PsychoFishus
    @PsychoFishus 16 วันที่ผ่านมา +1

    This is honestly really cool, well explained, well made. Great Tutorial concept and execution.
    Also: even though I consider myself a somewhat experienced user and hence wasn't fully sure if this video was going to be for me, I somehow only now learned about the new script editor which I already got incredibly excited about! (*happy developer noises*)
    Absolutely worth the watch

  • @TheGrimGary
    @TheGrimGary 17 วันที่ผ่านมา +2

    Only a few seconds in, love the chibi Matharoo sprite =)

  • @lilflax0396
    @lilflax0396 5 วันที่ผ่านมา

    This is a LIFESAVER! Thank you so much!

  • @hug-the-raccoon
    @hug-the-raccoon 17 วันที่ผ่านมา +1

    Keep up the great work! 💪💪

  • @Nicolobos77
    @Nicolobos77 13 วันที่ผ่านมา +1

    Finally, a RPG game of the tutorial guy

  • @stardreamix786
    @stardreamix786 17 วันที่ผ่านมา +1

    Amazing! I must try this

  • @sonicfactory-uk
    @sonicfactory-uk 15 วันที่ผ่านมา

    Your tutorials are amazing! Thanks for making these.

  • @Kaemonster
    @Kaemonster 17 วันที่ผ่านมา +1

    heck yeah!
    finally!
    Thank you!

  • @smidy3
    @smidy3 17 วันที่ผ่านมา +5

    unfinished udemy course not wasted :P AWESOME!

    • @fionnreidy6078
      @fionnreidy6078 16 วันที่ผ่านมา

      Which course did you sign up for?

    • @smidy3
      @smidy3 16 วันที่ผ่านมา

      @fionnreidy6078 Matharoo had an RPG Udemy course in the works, but never finished it. this is because he got employed by gamemaker themselves.
      This tutorial looks like its successor.

    • @GameMakerEngine
      @GameMakerEngine  16 วันที่ผ่านมา +1

      @@smidy3 Gurpreet here - that's true! Although I did cover a lot in the unfinished 2-hour video I put up on my channel, I planned to cover Turn Based Battle in that course, which I couldn't get to. In this series I'll finally get to do that.
      Thanks for following along!

  • @CrabMusicCrabMusic
    @CrabMusicCrabMusic 16 วันที่ผ่านมา

    these new tuts are fantastic

  • @MrEnderNerd
    @MrEnderNerd 16 วันที่ผ่านมา +4

    GameMaker Is The Best 2D Game Engine In My Opinion 😁

  • @SorceressGamelab
    @SorceressGamelab 16 วันที่ผ่านมา

    Very nice! Will be following this one!☺️

  • @NekoPatty06
    @NekoPatty06 16 วันที่ผ่านมา +1

    Finally, it is here!!

  • @D3PR3SS81A
    @D3PR3SS81A 17 วันที่ผ่านมา +1

    Yooo, thank you❤❤❤

  • @yepic3
    @yepic3 9 วันที่ผ่านมา +1

    15:08 I have the same problem but with the enemies when they collide with each other

  • @siskavard
    @siskavard 16 วันที่ผ่านมา

    Looking forward to the turn based tutorial!

  • @thefoxicreator4556
    @thefoxicreator4556 17 วันที่ผ่านมา +3

    now we REALLY have tutorial guy rpg before gta 6

  • @silvastephen
    @silvastephen 16 วันที่ผ่านมา +2

    My player object is getting stuck when moving left or right onto a wall. Any fixes? Quadruple checked that the code matched and I have the beta code tester on as well

    • @silvastephen
      @silvastephen 16 วันที่ผ่านมา

      For those experiencing similar issues, a temporary (possibly permanent) fix is to just put:
      mask_index = spr_player_idle_down;
      make sure it's in the Create event, I put mine directly below the tilemap collision code.
      This will allow you to keep the same collision mask for all sprite directions, seems there's an issue there. I had also experienced a visual glitch when idle left or right, causing a default "image undefined" texture with the red and white squares. Try adding two more frames to the animations so that all animation frames have four for the count.

    • @GameMakerEngine
      @GameMakerEngine  16 วันที่ผ่านมา

      Thanks for pointing this out, I missed that in the tutorial. I've updated the starter template to make sure all sprites have the same mask, and added a note for this in the pinned comment.
      -Gurpreet

    • @silvastephen
      @silvastephen 15 วันที่ผ่านมา

      @@GameMakerEngine Thank you, and great tutorial so far! Can't wait for part 2!

    • @silvastephen
      @silvastephen 10 วันที่ผ่านมา

      For those having issues with the attack animation being confined to the right side while idle, add this code for each idle direction the player is facing:
      if (keyboard_check_pressed(vk_space))
      {
      var _inst = instance_create_depth(x, y, depth, obj_attack);
      _inst.image_angle = point_direction(0, 0, _hor, _ver);
      _inst.damage *= damage;

      if sprite_index = spr_player_idle_left{
      _inst.image_angle = point_direction(0, 0, -1, 0);
      }
      if sprite_index = spr_player_idle_down{
      _inst.image_angle = point_direction(0, 0, 0, 16);
      }
      if sprite_index = spr_player_idle_up{
      _inst.image_angle = point_direction(0, 0, 0, -16);
      }
      }
      I kept the attack keyboard assignment in the example so you can see where I placed it in the code block. I understand what I did here, but I'm also awful at explaining my process. Best I can summarize, it has to do with adding and subtracting from the player's origin point. It's already assigned while the player is moving, but not while idle. This code just makes it so that you don't always have to be moving in the direction you want to attack.

  • @bryangreeley842
    @bryangreeley842 2 วันที่ผ่านมา

    I have an issue at 20:19 where "distance_to_player" is defined as a variable and an error pops up when the game is run the "distance_to_player" is an undefined

    • @GameMakerEngine
      @GameMakerEngine  2 วันที่ผ่านมา +1

      Make sure you have defined it properly in the Variables of obj_enemy_parent. Make sure the name is correct and that the parent is set correctly for obj_enemy1.

  • @NotoriousGarbagePerson
    @NotoriousGarbagePerson 10 วันที่ผ่านมา

    at around 21:50 i get an error "Object: Obj_Enemy_Parent_PreCreate at line 2 : invalid token `" i did not name my object with `_PreCreate` and i cant find it in my files

    • @GameMakerEngine
      @GameMakerEngine  9 วันที่ผ่านมา

      PreCreate is the variable definitions of your object. You may have written ` accidentally in one of the variable names or values.

  • @craigcashman2275
    @craigcashman2275 11 วันที่ผ่านมา

    This is excellent.

  • @lordskyline9766
    @lordskyline9766 11 วันที่ผ่านมา

    Thank you person who's name I don't know who has an accent that I think belongs to india. This is a great tutorial. I would love to learn more from you.

  • @bugshavefeelerstoo
    @bugshavefeelerstoo 4 วันที่ผ่านมา

    Looking at 9:38 - is it okay to initialize variables like that inside the step event? I wasn't sure if it's bad practice. I thought I needed to initialize all my variables at the create event

    • @GameMakerEngine
      @GameMakerEngine  3 วันที่ผ่านมา

      Any variables created using 'var ' are local variables and only available in the event they're created in. So those variables were only needed for the Step event and will only exist during the Step event. You should use the Create event for instance variables that are available throughout all events.

  • @slamlk-b6n
    @slamlk-b6n 16 วันที่ผ่านมา

    so good tutorial :)

  • @KenazzYT
    @KenazzYT 12 วันที่ผ่านมา

    Hi mate, 2 of us have tried up to 11:30 and the movement doesn't work for us. We type it as shown and press WASD but no movement :(
    EDIT - nvm, turns out I had collider tiles behind the background tiles so it was stuck on them lol

  • @ajinkyax
    @ajinkyax 16 วันที่ผ่านมา +1

    Great start to 2025. Thanks gamemaker team ❤️

  • @GBAura
    @GBAura 16 วันที่ผ่านมา +3

    Can we talk about how one the project files at the 0:48 mark is literally called "ship go brrr"?

    • @Zer0cip
      @Zer0cip 16 วันที่ผ่านมา +1

      Gotta name those random projects something yknow? Or else they'll just lack personality and look alittle depressing.

    • @da_cool_figure1445
      @da_cool_figure1445 4 วันที่ผ่านมา

      I REMEMBER WATCHING THAT SERIES!

  • @CrownedRose
    @CrownedRose 4 วันที่ผ่านมา

    Hey i dont know what happend but the enemy wont move at all or follow me. i dont know what to do.

  • @DanteCorwyn
    @DanteCorwyn 16 วันที่ผ่านมา

    I've just tried to launch the project and got an error message saying "{"status":"failed","message":"session not found"}?
    Looking at it again, I think it's trying to download the assets, but it's failing for some reason.
    Edit: Got it working, turns out that for some reason I wasn't signed into GameMaker.

  • @fierorecensione5828
    @fierorecensione5828 16 วันที่ผ่านมา

    Thank you!

  • @Rallypoly
    @Rallypoly 8 วันที่ผ่านมา

    Great Thanks.
    I try enemy how work together sprite directions
    : _hor _ver= clamp(target_x, _y)

    • @GameMakerEngine
      @GameMakerEngine  8 วันที่ผ่านมา

      You can do it the same way as done in the player object.

  • @DanielChanthavong-x5r
    @DanielChanthavong-x5r 3 วันที่ผ่านมา

    I’m very grateful for this video and the work u put in but I did what u did line for line and I keep getting a error message in alarm 0 of obj_enemy_parent about not setting the distance between the player and enemy parent and I’m super confused

    • @GameMakerEngine
      @GameMakerEngine  3 วันที่ผ่านมา

      Make sure you have set up the Variables in obj_enemy_parent correctly, and the name matches in the event

    • @DanielChanthavong-x5r
      @DanielChanthavong-x5r 2 วันที่ผ่านมา

      @ thx I mistyped the distance to player var

  • @dylanobedear
    @dylanobedear 3 วันที่ผ่านมา

    So, I did as explained in the tutorial, but my animations doesn't end, and I can"t understand why. I checked and the code is exactly the same
    I have no idea why lmao

  • @valentinusrk
    @valentinusrk 15 วันที่ผ่านมา +2

    I can't download the template. It said session not found

    • @MMOsiris
      @MMOsiris 14 วันที่ผ่านมา

      Same :(

    • @take6letters
      @take6letters 14 วันที่ผ่านมา +1

      Create an account or login by pressing the user icon at the top right of the main load menu, and then retry. This worked for me

    • @MMOsiris
      @MMOsiris 13 วันที่ผ่านมา

      @@take6letters Worked for me, Thank you!

  • @jannemarieart
    @jannemarieart 3 วันที่ผ่านมา

    Hey I had a question, I thought itd be fun if the enemy sprite could turn and face around like the player, what type of code would I use to make this happen? I have my own sprites in all directions! ( Im very much a beginner so it would help out a lot! :> )

    • @GameMakerEngine
      @GameMakerEngine  2 วันที่ผ่านมา +1

      Hey, the same code that we used in the player to turn it, can be used in the enemy too. It's just basic conditions. Make sure you use the correct variables for the condition check as we may not use the same variables as the player in the enemy.

  • @TheEpicSpire
    @TheEpicSpire 12 วันที่ผ่านมา

    is this going to be a full series with a working inventory system and battle mechanics? i am in desperate need for something better than a "zelda" style one slot inventory

    • @GameMakerEngine
      @GameMakerEngine  11 วันที่ผ่านมา

      Turn based battle is coming soon. Inventory is not planned but we may consider. Thanks for the suggestion!

    • @TheEpicSpire
      @TheEpicSpire 11 วันที่ผ่านมา

      @@GameMakerEngine that's unfortunate. i really need an inventory system. i wasted months of work on a project and i can't get the inventory to work. please let me know if you decide to do a full inventory (equipping weapons, armor, ect.) all i can find is lame ass zelda clone one item/ cycle. until then i give up.

  • @MiguelAngelValdepenaDelgado
    @MiguelAngelValdepenaDelgado 16 วันที่ผ่านมา

    wow que manera de trabajar esta a su mecha wow !!!

  • @patuncioZINHO
    @patuncioZINHO 16 วันที่ผ่านมา +3

    hello devs

  • @Adorkablesoft
    @Adorkablesoft 16 วันที่ผ่านมา

    When I downloaded this tutorial from inside GameMaker, the Tile Sets are not included.

    • @GameMakerEngine
      @GameMakerEngine  16 วันที่ผ่านมา

      The tile set sprite should be included (spr_tileset), and then you can make a Tile Asset from that, as shown in the video.

  • @nbvw3
    @nbvw3 4 วันที่ผ่านมา

    I just downloaded the LTS version, and it looks ALREADY different - no RPG tutorial in NEW! (today is 12 days after your tutorial was uploaded!) - what am I missing, please?

    • @GameMakerEngine
      @GameMakerEngine  3 วันที่ผ่านมา

      Please try the monthly release instead of LTS, that should have the project and the new code editor.

    • @nbvw3
      @nbvw3 3 วันที่ผ่านมา

      @@GameMakerEngine Thanks. However, the tutorials coming straight from the GM website suggested the LTS version. This is really confusing, and for a beginner to boot! Can I download BOTH versions?

  • @slamlk-b6n
    @slamlk-b6n 14 วันที่ผ่านมา

    How to dowload a rpg starter pack?

    • @GameMakerEngine
      @GameMakerEngine  14 วันที่ผ่านมา

      As shown in the video at 0:50, from GameMaker's start screen you can select that as a template when making a new project.

  • @OnixSouls
    @OnixSouls 7 วันที่ผ่านมา

    17:08

  • @hunterc9741
    @hunterc9741 10 วันที่ผ่านมา

    BRO I WAS TRYING TO USE ASSET LAYERS INSTEAD OF LAYERS

  • @onekoff8480
    @onekoff8480 16 วันที่ผ่านมา +1

    They really know that indians make the best programming tutorials on the internet 🥰

  • @emanuelec2704
    @emanuelec2704 วันที่ผ่านมา +1

    no ai coding? this looks so 2021...

  • @resproject1731
    @resproject1731 17 วันที่ผ่านมา

    Unfortunately, Game Maker continues to disappoint me with its shortcomings, which the developers, instead of fixing, breed new shortcomings. With each update, the engine becomes poorly optimized and heavy. The engine is capable of creating only primitive games based on simple shapes, since complex sprites lead to a decrease in fps and freezes. It is worth noting that collision handling remains at an ugly primitive level, which leads to failures in the execution of the written code. Physics modeling also remains at the level of "why is it needed if it does not work". Conclusion: Game Maker is good as a children's construction set for developing thinking and first steps. But it cannot be called a full-fledged engine, like Unity, Godot, Unreal Engine or CryEngine. It is a pity that you do not continue to develop(

    • @GameMakerEngine
      @GameMakerEngine  16 วันที่ผ่านมา +4

      Shame to hear this. Can you perhaps be more specific with your issues? Have you reported everything? We are striving to make GameMaker a powerhouse and this is even more apparent with our upcoming GMRT runtime which will be an huge leap forwards for GameMaker (See more: gamemaker.io/en/blog/winter-update-2024 & gamemaker.io/en/blog/gmrt-open-beta )
      You are totally welcome to your opinion and again - we'd love to address these issues directly. However, claims like 'it's just a children's construction set' when multiple Game Awards nominees for 2024 were released using GameMaker is very clearly not the case. We want people to make games and we're doing a good job at that.

    • @resproject1731
      @resproject1731 16 วันที่ผ่านมา +1

      @@GameMakerEngine I am glad that you responded to my message quickly. I hope that my criticism will encourage you to make your product better. A bad rating is still better than indifference) In order not to be unfounded, I will give a recent example: the enemy character refused to execute the embedded algorithm, due to the fact that the collision of the walking sprite caught the collision of the ground surface. I spent more than two hours of manual adjustments, adjusting pixel by pixel in different directions so that the character did not catch on the ground and stopped twitching when walking. As a result, I had to reload the character sprites again. This problem arose because I wanted to slightly adjust the size of the walking sprite.
      Guys, are you serious? Simple manipulations with the sprite sizes lead to disruptions in the operation of the mechanism that I programmed a long time ago?
      Also, with the latest update, the compilation time of the project has increased significantly. I thought that the updates were aimed at optimization and improvement)
      And why can't we still combine physics simulation with procedural physics, for example, in the same platformer? For example, in Unity, this can be done for about 10 years) To describe elementary physics in code, it takes weeks and months and knowledge of vector algebra and physics.

    • @RYTHETRO
      @RYTHETRO 16 วันที่ผ่านมา +2

      @@resproject1731 You should think of game engines like characters in a game. Some characters are easier which makes them commonly better for/against beginners. Easier to perform its strengths as a beginner and beginners aren't good enough to punish its more obvious weaknesses. Then vice versa there's more high skilled characters which are better for pros because they are good enough to execute the characters strengths while the characters weaknesses are harder to punish overall since harder characters usually have more flexibility. But the point being is that even if an easier character is better for beginners and probably worst against more skilled ones, doesn't mean that it is a worst character all the time. If you know how to perform on a low skill character because you understand all of its strengths and know how to counter its weaknesses as well as in general accept the characters weaknesses then it can be equally as good as a high skilled character. Same goes for high skilled characters. In this case Gamemaker Studio 2 would seem to be more of a low skill character with some weaknesses like 3d or networking etc. but it is an extremely easy engine to pick up and can do simple things really fast and even with the weaknesses mentioned it is still capable of doing it, you just need to try harder so you have to accept those weaknesses while knowing how to use its strengths. Plus Gamemaker does get improvements overtime and doesn't seem to be getting any harder to code with and from my experience easy characters getting buffed is kinda broken 😉

    • @falseknight4371
      @falseknight4371 16 วันที่ผ่านมา +1

      here we go another goofball, without gamemaker we wouldnt have hit games like Pizza tower, Undertale, Nuclear Throne, Heartbound. You dont need to have that much power if you don't need to use it. You probably havent even released any successful titles, and no one should take your opinion seriously because ur just another generic thought in the wind.

  • @shovelmanyayntekrarlar
    @shovelmanyayntekrarlar 5 วันที่ผ่านมา

    i messed up the enemy tilemap collision they just phaze tru walls