Game Maker Studio: Let’s Build a Multiplayer Shooter #2

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

200 likes and I’ll post the next episode tomorrow!

In this video we’re creating the client side of the code to create a basic connection where we can see the boxes moving around. If you have any questions or errors in your project feel free to comment and let me know! I will try to answer everybodys questions.

Support my Patreon –

Beginner Java Game Design Course Now Available

Thijs Twitter (He knows a lot about multiplayer)

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


Posted

in

by

Tags:

Comments

50 responses to “Game Maker Studio: Let’s Build a Multiplayer Shooter #2”

  1. Germashker Avatar

    hey can anyone tell me what oClientServer does, it's the only thing i don't get from these videos.

  2. John Lee Avatar

    I can compile with no errors. Create the server. Connect 2 clients.

    However, the two clients do not see each other at all.

    Has anyone found a solution for this issue?

  3. Palmuz Avatar

    help!
    when i join a server it says

    _________________________________________
    ############################################################################################
    FATAL ERROR in
    action number 1
    of Async Event: Networking
    for object ctrl_server:

    Unable to find any instance for object index '1' name 'obj_player'
    at gml_Script_server_handle_message
    ############################################################################################
    ——————————————————————————————–
    stack frame is
    gml_Script_server_handle_message (line 0)
    gml_Object_ctrl_server_Other_68

  4. Palmuz Avatar

    When i start the game it doesnt do anything, no window pops up. and this happends when i have the client in the room

  5. Palmuz Avatar

    client_connect and client_disconnect arent functions anymore, help!!

  6. Sergio Navarro Czyz Avatar

    Igualmente need the .gmz i cant fix a problem connecting a second player even if i follow the tutorial line by line

  7. Mark de Haan Avatar

    I have read all comments (responded to some), but I still haven't seen any clear explanation for the issue where clients can't see each other.

  8. Table Flip Avatar

    I run the game and basically when I press "Create server" It shows "cannot create server!" (it runs the error)
    I checked out the compile and I found this:

    Error (0x    2740): Can't bind port
    Setting SO_REUSEADDR and retrying..
    Error (0x    271d): Can't bind port even with SO_REUSEADDR
    cannot bind port
    ERROR!!! :: ############################################################################################
    FATAL ERROR in
    action number 1
    of Create Event
    for object obj_server:

    "Cannot bind port"
    I googled it and apparently it means port is already occupied or something. How do I fix this?

  9. Italian Hick Avatar

    Thank you very much. I have been taking notes, listening to everything you're saying and for once I'm gaining a damn grasp on this.

    You're a great teacher.

  10. SmithSn0w Avatar

    Pls the proyect in gmz. 🙁

  11. EnderIsaacCore Avatar

    Error : gml_Script_server_handle_message(9) : Assignment operator expected
    .Error : gml_Script_server_handle_message(9) : malformed assignment statement

  12. Gabriel Grecco Avatar

    Great video, man!
    But i have a question… in my game the character is diferent… have movement, walking right, left, up and down… but this movements i just can see in the oplayer not in the oclient… what i need to do???

  13. damaging wazza Avatar

    the green player doesn't show up, when I launch the server and join it
    I need help me please

  14. raspberry_picker39 Avatar

    i dont like how you need to create a server first and then the guy that created the server isnt even in the game
    why
    why would anyone do that to themselves
    oh yes you need to start this server first and then completely reenter the game and then you need to join your server, yes, do that plz

  15. Feuerwehrmann Potatütata Avatar

    This is so difficult. D: so much new functions which i have never seen before. I dont think i can handle all of this, but i try 😛
    Thanks for this great tutorial!

  16. Weewomp Avatar

    Why does the client id value have to be referred to with string()?
    it's a number, no reason to make it a string

  17. XirmiX Avatar

    13:19 oh come on!!! Not flexible, NOT FLEXIBLE CODE! What if I'm working with two GML files instead and have the object on the server side, but not on the client side? Why would you even and use a server object as a client?! Wouldn't this allow for extremely easy cheating?

    At this point I just want to give up and just have a template server ready for me, so I can work on actual content, this is annoying as hell.

    In fact, what even is oServerClient supposed to be?! Why does the server need a player object? Since when? Server simply sends information between clients and holds onto the vital data (e.g. damage, health), that's the standard, why do you need the server to be happy-go-lucky and replicate within itself something clients do? Why?!

  18. HarveyTj03 - Stickman Gaming Studios Avatar

    Anyone having an issue with the blue box not appearing at all.

  19. Kuncu Avatar

    Thats soo weird,i don't know whats going on,please help

    _________________________________________
    ############################################################################################
    FATAL ERROR in
    action number 1
    of Create Event
    for object obj_client:

    Could not connect to server!
    at gml_Script_client_connect (line 11) – if (connect<0) {show_error("Could not connect to server!",true);}
    ############################################################################################
    ——————————————————————————————–
    stack frame is
    gml_Script_client_connect (line 11)
    called from – gml_Object_obj_client_CreateEvent_1 (line 1) – connect=client_connect("127.0.0.2",9000);

  20. Sopor Avatar

    in the create event of the client object, should we put our IP ??

  21. agge blue Avatar

    You're so awesooooome!!! THANKYOU FOR MAKING THIS!! <333 LOVE YOU!!!

  22. - srPerez - Avatar

    Please you have to release the .gmz project!
    I spent 2 days trying to make this work, i re-did the entire thing 2 times and it didn't worked,
    I just want to compare my code to yours to see whats wrong.
    seriously, this is getting me crazy…
    EDIT: i did it a 3th time, copying EVERY SINGLE line of code you put, and it worked.
    i didn't wanted to do that, but still.
    Thx for the tutorial.

  23. Jonatherin Gaming Avatar

    Help please!
    I've followed up till here and I've found 2 problems. There is no such script as create_server and client_connect which obviously causes a problem. I'm using version v1.4.1763 so maybe the update changed some things around?

  24. Rusten Råtass Avatar

    does this work with anyone in the world?

  25. Gizmon plays Avatar

    um help i got this error and ive check everything twice now and still cant find where the problem is and i know its a typo but i dont know where… ############################################################################################
    FATAL ERROR in
    action number 1
    of Alarm Event for alarm 0
    for object obj_client:

    Variable obj_client.send(100016, -2147483648) not set before reading it.
    at gml_Script_client_send_movement
    ############################################################################################
    ——————————————————————————————–
    stack frame is
    gml_Script_client_send_movement (line 0)
    gml_Object_obj_client_Alarm_0

    I DONT want to have to write all of that again because of a typo

  26. Käptn Kook Avatar

    somehow cant compile it, the button is greyed out for me. using gamemaker studio 2.

  27. Rusten Råtass Avatar

    everytime i run it, it crashes! no firewall! please help!

  28. GetSchlecked_ Avatar

    i cant connect because of the ip :C

  29. dj505Gaming Avatar

    When I create a server, then create 2 clients and hit "connect" on both, neither client shows up on the other's screen, plus it takes up to a minute for them to connect.

  30. dj505Gaming Avatar

    Getting a really weird error when I create a server…

    _________________________________________
    ############################################################################################
    FATAL ERROR in
    action number 1
    of Create Event
    for object objServer:

    Couldn't connect to server
    at gml_Script_server_create (line 13) – show_error("Couldn't connect to server", 1);
    ############################################################################################
    ——————————————————————————————–
    stack frame is
    gml_Script_server_create (line 13)
    called from – gml_Object_objServer_CreateEvent_1 (line 1) – server = server_create(9000);

    EDIT: Fixed it. Didn't put quotes around the "9000"

  31. The Best Avatar

    i need help i cant connect each other also then i make join only one oPlayer Spawning

  32. blablabla Avatar

    can u connect server with other pc (network)?

  33. Connor Aitken Avatar

    _________________________________________
    ############################################################################################
    FATAL ERROR in
    action number 1
    of Async Event: Networking
    for object obj_server:

    Variable obj_server.<unknown variable>(100008, -2147483648) not set before reading it.
    at gml_Script_server_handle_message
    ############################################################################################
    ——————————————————————————————–
    stack frame is
    gml_Script_server_handle_message (line 0)
    gml_Object_obj_server_Other_68

  34. Lauge Rønberg Avatar

    this is so freaking awesome!

  35. raphael welti Avatar

    That doesnt work on other pc's. I cant connect to an other one which has opened the same file. 1 PC: Opened 1time for servercreation, and 1 time for joining. 2 PC: 1time for joining.

    And it doesnt work. Why? Please i have insvested 2.5 hours for this from your videos. Please help, am i doing sth. wrong?

  36. Sakexz Avatar

    hello, RealTutsGML.

    I have an issue, idk what. i was wondering if you or anyone has any ideas, as you can see on the gyazo pic here. https://gyazo.com/6395be89a6948605c2aa06bb7b26278d.
    My server "starts" but it doesnt create the actuall host player nor can the players see eachother…

  37. Ibrahem Alsha6y Avatar

    excuse me m8 i really want to know what did i do wrong in the code plz need a little help ={

    ############################################################################################
    FATAL ERROR in
    action number 1
    of Async Event: Networking
    for object oclient:

    Variable oclient.client_object(100011, -2147483648) not set before reading it.
    at gml_Script_client_handle_massage
    ############################################################################################
    ——————————————————————————————–
    stack frame is
    gml_Script_client_handle_massage (line 0)
    gml_Object_oclient_Other_68

  38. AmitDBZ Avatar

    help someone plz :

    _________________________________________
    ############################################################################################
    FATAL ERROR in
    action number 1
    of Create Event
    for object oServer:

    Could not connect to Server!
    at gml_Script_server_create (line 10) – if (server < 0) show_error("Could not connect to Server!", true);
    ############################################################################################
    ——————————————————————————————–
    stack frame is
    gml_Script_server_create (line 10)
    called from – gml_Object_oServer_CreateEvent_1 (line 1) – server = server_create(9000);

  39. gullible burger Avatar

    ############################################################################################
    FATAL ERROR in
    action number 1
    of Async Event: Networking
    for object oServer:

    Variable oServer.client(100009, -2147483648) not set before reading it.
    at gml_Script_server_handle_message
    ############################################################################################
    ——————————————————————————————–
    stack frame is
    gml_Script_server_handle_message (line 0)
    gml_Object_oServer_Other_68

    please help!

  40. JamSnack Avatar

    Help I am now mentally dead

  41. applepagoogle Avatar

    error at line 3 pos 8 unknown function or script client_handle_message please help!

  42. Fitz Avatar

    Due to how insanely easy it is for someone to get something wrong, I highly suggest you upload the project after each video to give people an easy way to compare their code to yours to see what they did wrong.

  43. StanleySK Avatar

    FATAL ERROR in
    action number 1
    of Async Event: Networking
    for object oServer:

    Push :: Execution Error – Variable Get -7.message_id(100010, -2147483648)
    at gml_Script_server_handle_message
    ############################################################################################
    ——————————————————————————————–
    stack frame is
    gml_Script_server_handle_message (line 0)
    gml_Object_oServer_Other_68

  44. Zyro _ Avatar

    _________________________________________
    ############################################################################################
    FATAL ERROR in
    action number 1
    of Async Event: Networking
    for object obj_server:Variable obj_serverClient.cient_id(100012, -2147483648) not set before reading it.
    at gml_Script_server_handle_message
    ############################################################################################
    ——————————————————————————————–
    stack frame is
    gml_Script_server_handle_message (line 0)
    gml_Object_obj_server_Other_68

    help

  45. Zyro _ Avatar

    I can launch up a server but when I try to click on the join server button it doesn't work

  46. maxdax55 Avatar

    hey! thx a lot with the tutorials. i try to learn exacly on how to use but its doing 3 time i look at your 2 first video and done exactly what you done to see if it work fine and i get this error. i think its my ip but i am not sure

    could not connect to server!
    at gml_Script_client_connect
    #############
    #############
    —————————–
    stack frame is
    gml_Script_client_connect (line 0)
    gml_Object_oclient_Create_0

Leave a Reply

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