I've tried the gms_info_isconnected() function and it returns true, however if I remove the Windows version and add in the All version (and add the gms_network() to the network section) the gms_info_isconnected() function returns a false. No matter what I do, it simply won't do anything when I click the login button or try to register a new user. I then opened the VS Mode - GML project example you included and ran that. So I figured I must have made a mistake somewhere.
Docs2 choose gamemaker registration#
I tried inserting the code (using the Windows version, not the All version) into my game and it would display the login box, but if I clicked login, nothing would happen and if i went to the registration section, clicking register did nothing as well (before and after filling out the forms). Hey, I'm trying to get the server working, but I'm getting absolutely nowhere. Global/local/instance variables are only shared within a session. Sessions can be used to separate different players. I think this is the best way to send a turn to the other player, but you could also use player variables. This can be done cross-session, as long as you know the playerID. You can use P2P messages to send turns, or anything else really, from one player to the other. You'll still be able to use gms_self_set, but you'll have to use gms_other_get to retrieve the variable. If you want to use GameMaker Server for a turn based game, you're most likely better off disabling the entire simple mode, and simply setting the player and other player object to -1 (or noone).ĭisabling the simple mode will turn off all the "nice" stuff like automatic syncronisation of the player position and variables.
Docs2 choose gamemaker free#
I'll do a rundown of some things that you might want to consider, feel free to ask if something isn't clear :) The "live" game thing is the easiest use case, and the most used one. Add this piece of code to the create event:Ĭorrect. This will be done automatically by the extension.Īdd a sprite and some logic to make the object move when pressing the arrow or WASD keys to the obj_player object.Ĭreate a new object, and name it something like obj_login. You should not put any game logic in this object. Every player that is online will get an instance of the " other player object". The " other player object" ( obj_other_player) will be representing all other players that are online. Walking, shooting, health, setting variables, etcetera. The " player object" ( obj_player) should be the object in which you place all game logic. Obj_player and obj_other_player should be two different objects. When a player logs out incorrectly, it is possible that not all data is saved properly on the server side. It is important that you log out correctly. The Drag & Drop action " Logout" on the tab " Online 1" can also be used. Make sure you've added the extension to your game. To do so, you should set up an object that initializes the extension.
If you want to use a new GameID, you'll need to create a new game.Īfter you've registered your game, the game will be able to connect to the server. The title can be changed later if you want. Enter the GameID of your game, and type in a title. Scroll down to the "Register a new game"-section. Now that you're registered as a developer, click the "Developer" tab on the menu bar at the top of the page. If you're not registered as a developer, click your name in the upper right corner of the page, and then click "Register as a developer" and follow the steps on the web page. Open up the GameMaker Server website and login if you haven't already. The GameID is the number in the text box labelled "Game Identifier" at the left upper part of the window.
The GameID can be found by opening "Global Game Settings".