Game Maker Minecraft Tutorial #4 – Infinite Terrain

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

Game Maker Minecraft Tutorial
Game Maker Terrain

In this video we learn how to create an infinite terrain system within our game in 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.

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

45 responses to “Game Maker Minecraft Tutorial #4 – Infinite Terrain”

  1. The Red Cup Avatar

    When I try to test the game, it says that I don't have an INI file so I can't run it. How do I fix this?

  2. Chris Gumtie Avatar

    FOR THOSE USING GMS2:
    The view code in player.Step (3:40) will not work, replace it with this:

    camera_set_view_pos(view_camera[0], x – (view_wport[0] / 2), y – (view_hport[0] / 2));

  3. Tom Morris Avatar

    what code would you change to infinitely generate going down

  4. Anthony Avatar

    How would I go about creating an infinite terrain in both the x and y directions for a top down game.

  5. raphael welti Avatar

    Hey, really nice video! I have a question: How can i do it like for "Doodle Jump" as exp. it doesnt work with Y ax for me. Can anyone help me?

  6. N8 Avatar

    This isn't a minecraft tutorial, this is a Infinite terrain Terraria tutorial. Minecraft in 2d would be a top down, while Terraria is a platform-like.

  7. ZeXaLTAS Avatar

    I can't get it to generate on the left side. It works everywhere else though

  8. Squeezy Frog Avatar

    why the lag spikes!!?? when it loads a chunk

  9. Kyle B: The Cheesy Crafter Avatar

    loaded chunks are loading on top of one another for my game so I stoped at 4:49

  10. Christopher Boggan Avatar

    Omg UR too fast! slow down on the typing!

  11. Dark Elixir Avatar

    My Sprite does not face right or left. Even start the sprite animation! Help here?

  12. shit Avatar

    can someone help me ?

    _________________________________________
    ############################################################################################
    FATAL ERROR in
    action number 1
    of Step Event0
    for object object_player:

    Push :: Execution Error – Variable Get -5.length2(100012, -2147483648)
    at gml_Object_object_player_StepNormalEvent_1 (line 28) – if(x <= (global.length2 / 2) && canCreate)
    ############################################################################################

  13. Antonio Cavrić Avatar

    I've done everything as it stands in tutorial but I don't get new chunk creation to neither of sides. Merely an column of blocks unperfectly overlapping last column on the right. help!?

  14. Shadow Lurker Avatar

    EVERYONE SHOULD READ IT:

    On my computer, I was always having huge lags after finishing project…

    view_xview[0] = x – (view_wview[0]/2);
    view_yview[0] = y – (view_hview[0]/2);

    never use Gamemaker built in views ever again.

    Unless I used two lines of code for views and fps got x5 times bigger than always, this shit is unreal.

  15. DR_Finn 64 Avatar

    and how do you make a birds eye view infinite terrain

  16. DR_Finn 64 Avatar

    my game is laging so hared
    pleas help!!!

  17. Arturo Carballo Avatar

    Pls Help!!! What i need to do?
    FATAL ERROR in
    action number 1
    of Step Event 0
    for object object_player:

    Push :: Execution Error – Variable Get -5. lenght(100012, -2147483648)
    at gml_Object_object_player_StepNormalEvent_1(line 16) – if(x >=(global.lenght / 2) && canCreate)

  18. HereTo Annoy Avatar

    why are my chunks not lined up properly? is there any way to fix this?

  19. Gabriel Andrés Henao Tangarife Avatar

    awesome game but my player is rusty it goes one block stops and does the thing again is there anyway to fix that?

  20. Haydon Dale Avatar

    _________________________________________
    ############################################################################################
    FATAL ERROR in
    action number 1
    of Step Event0
    for object obj_Player:

    Push :: Execution Error – Variable Get -5.length2(100012, -2147483648)
    at gml_Object_obj_Player_StepNormalEvent_1 (line 30) – global.length2 = Generate(global.length2- 3200);
    ############################################################################################
    some one please help!!!

  21. Haydon Dale Avatar

    WTF when I run it loads of waters starts generating under the map and it gives me major lag and I can see a little island floating the room and if I walk right it starts taking the camera to the right of my screen

  22. Evokes Avatar

    getting this error.. worked fine yesterday… any tips

    _________________________________________
    ############################################################################################
    FATAL ERROR in
    action number 1
    of  Step Event0
    for object object_player:

    Push :: Execution Error – Variable Get -5.length(100009, -2147483648)
     at gml_Object_object_player_StepNormalEvent_1 (line 20) –     if(x >= (global.length / 2) && canCreate)
    ############################################################################################

  23. Pattanakan Methavikul Avatar

    What the fuck.Why I move right Have no Infinite Terrain

  24. Mikey -boss Avatar

    I can't get the camera or screen to follow the player when he moves around.
    Can anyone help me?

  25. Mehu Avatar

    _________________________________________
    ############################################################################################
    FATAL ERROR in
    action number 1
    of  Step Event0
    for object obj_player:

    Push :: Execution Error – Variable Get -5.length2(100013, -2147483648)
     at gml_Object_obj_player_StepNormalEvent_1 (line 29) –      if(x <= (global.length2 / 2) && canCreate)
    ############################################################################################

  26. VimeCrafter Avatar

    My Laptop (which is like ultra for Gaming (GTA V etc)) has so deep lag-spikes when a new "chunk" is generated.. idk why but its really ugly 😛

  27. agge blue Avatar

    This is sooo sick!  thankyou so much!!

  28. FireMario211 Avatar

    view_xview[0] = x – view_wview[0]/2) does a error
    remove the ) it will be better :3

  29. Dread Wolf Avatar

    ok im having some difficulty lol i followed the tutorial and my player doesn't move and i don't have infinite terrain i get a blank black screen after i enable views but if i take enable off it generates one long 1600 block of terrain

  30. HeroSnipe Avatar

    help

    _________________________________________
    COMPILATION ERROR in Script: generate
    Error in code at line 5:
       var starting_room = argument0;
                         ^
    at position 20: Unexpected symbol in expression.

  31. Theblackparrott Avatar

    I have tried to figure this out, their are a couple people who have commented about it. Does any one know the problem
    _________________________________________
    ############################################################################################
    FATAL ERROR in
    action number 1
    of  Step Event0
    for object object_player:

    Push :: Execution Error – Variable Get -5.length(100009, -2147483648)
     at gml_Object_object_player_StepNormalEvent_1 (line 15) –     if (x >= (global.length / 2) && canCreate)
    ############################################################################################

  32. Synphul Hero Avatar

    Please help dont know what i did wrong
    _________________________________________
    ############################################################################################
    FATAL ERROR in
    action number 1
    of Create Event
    for object obj_generate:

    illegal access of argument, argument is not provided to script
     at gml_Script_generate (line 6) – var ending_room = argument + 1600;
    ############################################################################################
    ——————————————————————————————–
    stack frame is
    gml_Script_generate (line 6)
    called from – gml_Object_obj_generate_CreateEvent_1 (line 3) – generate(0);

  33. XxOfDanTDMxX Channel Avatar

    obj_player.Step
    if(place_free(x,y+1))
    gravity = 1;
    else
    gravity = 0;

    if(keyboard_check(ord("D"))) { x += 5; facing = 1; }
    if(keyboard_check(ord("A"))) { x -= 5; facing = -1; }

    if(keyboard_check_pressed(vk_space)) { vspeed -= 15; }

    view_xview[0] = x – (view_wview[0]/2);
    view_yview[0] = y – (view_hview[0]/2)

    if(facing == 1)
    {
        if(x >= (global.length / 2) && canCreate)
    {
        canCreate = false;
        global.length = scr_generate(global.length);
        canCreate = true;
        }
    }else if(facing == -1)
    {
        if(x <= (global.length2 / 2) && canCreate)
        {
        canCreate = false;
        global.length2 = scr_generate(global.length2 = 10);
        canCreate = true;
        }
    }

    global.length2 = scr_generate(global.length2 = 10)
    dont put 3600 is annoying

  34. Marcus Avatar

    I need help!!!! when creating the terrain blocks keep generating in the same spot and overlapping each other    

  35. Boring Landscape Studios Avatar

    I would recommend adding this in the player step event:
    //if moving right…
    if(x>(global.length/2) && cancreate && x >0)
    instead of:
    if(x>(global.length/2) && cancreate )
    Because when you move left… x becomes negative when passing the "room border"and therefore possibly larger then global.lenght2/2…(example: global.lenght2/2 =-800 and x =-500)  thus generating the same chunck over the previous one =extra lag.
    //so in if moving left…
    ad && <  0
    Or am I missing something?

  36. ://SyCx1 Productions Avatar

    but what if you want the terrain to end at one point and loop back around say from left to right? i'm trying to simulate a 360 degree view using 2D and need my star-field to loop around when the "cockpit" view reaches the edge of space.

  37. paulisawesome10 Avatar

    fps droped to 2 pls help

  38. MrHillyCraft Avatar

    Hey, im following u, and facing doesn't work! Please Reply!

  39. DRAGONMASTER412 Avatar

    Lol game maker really do this in java without a tutorial and then you can say you've made a achievement. Don't believe me? http://Www.indiedb.com/games/paradigm-2d that's pretty much it… Didn't mean to sound like advertising but owell

  40. TNTdude7 Avatar

    If you have extreme lag after this, in the Player Step Event, where it says:
    if(x >= global.length / 2)

    Make the "2" a larger number, or remove it entirely. Hope that helped.

  41. guy jacklin Avatar

    Hi I'm having trouble (like most people) where my generate is not purple. How can I fix this

  42. scttyper Avatar

    get this error at the halfway point when it is generating the next chunk. any suggestions? sorry if you already covered but the other guy who asked i did not find the answer. thank you for the amazing video btw.

    FATAL ERROR in
    action number 1
    of  Step Event0
    for object obj_player:

    Push :: Execution Error – Variable Get -5.length(100012, -2147483648)
     at gml_Object_obj_player_StepNormalEvent_1 (line 16) –     global.length = generate(global.length);

  43. Henley adams Avatar

    Minecraft does have a end TheGamingPro found it

  44. Paul Dielenschneider Avatar

    Please help, when I spawn a new chunk, the blocks are misaligned with the main chunk 🙁

  45. gottisgoon28 Avatar

    Thanks for the tutorial on infinite terrain. One thing, how do I make sure that my terrains do not generate higher than a certain level? I am trying to make a platformer with random platforms and sometimes the platforms are higher than the player and there is nothing below me but and endless fall.

Leave a Reply

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