GameMaker Studio 2 – Random Level Generation

For more GameMaker Tutorials and Courses:


Old GMS 1.4 version of this series:

/r/GameMaker Discord GitHub:


Grid Data Structures:

Follow me on Twitch for GameMaker livestreams:

Follow my twitter:
Like my Facebook page:
Follow me on Tumblr:
GameMaker Tutorials on Reddit:

Thank you all so much for your support!


Xem thêm bài viết khác:

  1. HeartBeast 9 months ago

    Silly me. I forgot to destroy the grid_ data structure in the Clean Up Event. I'll be adding that at the start of part 2.

    Until then, I highly recommend you all do it yourselves 🙂

  2. el fantasma de esparta 9 months ago

    Alexis shady si vez esto respondeme

  3. Andrey Core 9 months ago

    working in gamemaker studio 1.4?

  4. Cyril Gec 9 months ago

    Thank you a lot!

  5. Marvin Playz 9 months ago

    mine don't work… any suggestions?

  6. Alex Young 9 months ago

    Does anyone know how you would make a randomly generating exit door?

  7. Shawn The jolteon 9 months ago

    Pls do one for godot the tutorials for godot is very limited n confusing

  8. NTSC270 9 months ago

    Wow that's really cool!

  9. Cesar Santana 9 months ago

    can someone help me stou with a bug in the sound of game maker 2 I select more than once the start button and the sound doubles?

  10. CowCat 9 months ago

    how'd you make the wall tiles? I tried comaring your floor tilemap with the bitmask tutorial tilemap structure, couldn't find much correlation with the last few tiles..

  11. Josh Maine 9 months ago

    Could you also do choose(0, 90, 180, 270) instead of doing irandom(3) and then multiplying by 90?

  12. Thomas Wareing 9 months ago

    Hi thanks for the tutorial, what variables would I change to make it 64 by 64 instead of 32?

  13. Can I Beat It 9 months ago

    Nice tutorial man, just wanna point out that you could`ve put line 62 in the `else` block of the conditional @ line 52, making the second double `for` loop useless and the whole thing a lot lighter.

  14. Krishna Jawale 9 months ago

    Great tutorial! this helped me a lot with my roguelike game 🙂

  15. The King of Games 9 months ago

    Anyone can help me?
    i have followed a exact step by step and the only thing generated is this

    P.s (Sorry for the bad english :p)

  16. tristan williams 9 months ago

    when ever i try to start up the game it says "tilemap_set()couldn't find specified tilemap" and a map wont appear. can you help me?

  17. Daniel Myers 9 months ago

    Can you use the "Controller" to place objects?

  18. WMeLoN 9 months ago

    Its awesome !Could you show how to create a random generation like in the terraria?
    P.S ty for your lessons <3

  19. Ho Tung 9 months ago

    why do i keep having diagonal maps, please help me out

  20. Evol Christ 9 months ago

    I don't understand how you remember all of this code. : (

  21. Anthony Walnutz 9 months ago

    >doesn't name his events

  22. Zyro Lupercal 9 months ago

    Ah, that's awesome ! It's really gonna help me to build levels for my project, thank you. Altho, is it possible for objects that are not tiles (trees and rock for example) to be placed at random inside the cells ?

  23. sf asy 9 months ago


  24. Mr Peace 9 months ago

    this video is complicated

  25. FingerLickinHood 9 months ago

    Hi HB, I just started trying to code with this video (yes I know this tutorial isn't for beginners but I really wanted to create a bullet hell roguelike) and when I try to run the game at at 21:23 it loads but then comes up with a white code error window that says this:
    action number 1
    of Create Event
    for object o_level:

    Variable o_level.grid_(100005, -2147483648) not set before reading it.
    at gml_Object_o_level_Create_0 (line 10) – ds_grid_set_region(grid_, 0, 0, width_, height_, VOID);

    stack frame is
    gml_Object_o_level_Create_0 (line 10)

    I really wanted to get around this. Excuse my noobiness. I'd really like your help! Thank you!

  26. dookillyou 9 months ago

    Followed along and got to the end product, still mega confused; looks like I need to brush up on some new things. Thanks for the video anyways!

  27. GermanySups 9 months ago

    Am i allowed to use this sprite?

  28. Lincolndog 9 months ago

    Though i want to create one for Platformers

  29. nizwiz ._. 9 months ago

    Does anyone remember those old GameMaker RPG tutorials?

    Man, that was nostalgic.

  30. Onion 9 months ago

    Would this system work with a 2d FPS style game like doom?

  31. Chris Hansen 9 months ago

    Can you make it in drag and drop version?

  32. Hanako IsMyWaifu 9 months ago

    I'm actually beginner and I don't have hard problems to understand. So either this isn't hard or you are great teacher)

  33. Mr. Ward 9 months ago

    This method doesn't seem to be working right for me. The Wall tile set isn't drawing like it does for you. So all the levels I create just look like a mess instead of having defined walls. I'm sure it's something I did, just have to skim through my code and look for a mistake.

  34. Anger kun 9 months ago

    what happened to the comment section on your courses?

  35. Julien531 Zyni 9 months ago

    could you do a tutorial on enemies attacking from afar please?

  36. Нарулан Бауржанулы 9 months ago

    My level generation is weird:
    They often small and their rooms aren't united, I mean there are two rooms with not any ways to unite

  37. kokothecoconut 9 months ago

    rip grain war

  38. NeZvers 9 months ago

    What do you mean – can't do in runtime?

  39. Kenneth Kline 9 months ago

    Happy to see this in GMS2 🙂

  40. ZoidbergForPresident 9 months ago

    It's interesting but I gotta say I have a couple issues with the way you're doing it:
    1) Doing something to prove it works then undo it is counter productive I'd say. We trust you, don't worry, just do your thin.
    2) Also, this video was a little too much "copy-pastey", we just follow and copy the code. I like your "mini challenges" and I definitely missed them here.

    But all in all, neat video, thanks for doing it! 🙂

  41. Dayne Green 9 months ago

    cool, check my space game out it has procedurally generated planets but it's platformer

  42. Supernovaman Game 9 months ago

    Will you be adding a way to save these random levels in the future? Great tutorial, thanks!

  43. FriendlyCosmonaut 9 months ago

    I've been holding off on tackling autotiling myself, hoping for the new functionality to arrive – but that Bitmasking stuff is great! Awesome tutorial, as usual 🙂

  44. DYLwat100 9 months ago

    Hey HeartBeast, just wanted to let you know that your tutorials helped me win a Hackathon at my university, I got a small scholarship and a job interview thanks to you!

  45. Lucas Labrecque 9 months ago

    for the moment it's working with the trial version of Game Maker

  46. Clytax 9 months ago

    I bought your course on your website. Are you gonna update that one to the state of the udemy course? because other wise that would be pretty unfair to sell an unfinished course.

  47. LivelyMC 9 months ago

    Sooo does it work on the trial? I don’t have the money to buy the full Game maker studio 2

  48. DarkKnightDad 9 months ago

    Awesome tutorial. Thanks for your effort 😀

  49. Helder Lima 9 months ago

    Good Lord Ben, you should be hired by Yoyo Games already, your videos are awesome!

  50. KZT 9 months ago

    Why you write vars with underscore?

Leave a Comment

Your email address will not be published.

You may also like