Hello,
I am very new to this forum and G-Develop as a whole. Currently, I am working on a real-time multiplayer game where one master user’s perspective needs to be cloned across several other users.
The game is similar to Dungeons and Dragons where one user (a dungeon master) controls the story, can roll dice, and view charts. The players on the other hand have a health and attack counter at the top of their screens with a cloned view of the main map (which is controlled by the ‘dungeon master’)
I do not want the players to see anything else (such as the die rolls or chart viewing) because it may detract from their gaming experience.
I have already created the base game and I am wondering how one goes about designing the multiplayer aspect.
Ironically, that is what I am using. However, I am struggling to get the characters to show up on different clients. Also, the top-down character I have in the game doesn’t want to move. I have to switch it to platformer to get it to work. Any suggestions on how to fix this?
Lastly, how do I ensure all the different users appear on the screen (As shown in the video?)
What events are you using? It sounds like you are using platformer behavior “simulate key press” actions instead of the ones from the top down movement behavior.
With THNK, all you need to do to have an object show up on the clients screens is to add the “synchronise” behavior to that object
I am sorry, but I don’t understand what you mean (not see any video?)
While your client is dragging the object (I think the behavior has a condition to check for that), send messages to the server with the position the object is being dragged to as extra data. On the server, when that message is received, check if the position for that object is within acceptable bounds, and move that object to the requested location if it is.
That’s arguably hard to do, I’ll see sometime if I can create a behavior to simplify this.
I’m sorry, but I think I am doing something wrong. Players still don’t sync with each other and I have “synchronize” enabled.
In the game, I want the players to see each other moving around in the game. (As shown in the video) I also need to be able to delete specific randomized objects within a set by right-clicking, but when I connect this event to the server, it deletes all of the cards on the screen instead. Do you know how to fix this?
Another item I need to point out is this is a card game. Which means the cards need to be draggable and show up on everyone’s screen in the exact same place. I got it working in single-player, but things broke in multiplayer. I think this relates to the syncing across players issue I am having with the users.
It seems you do not have server-side events. THNK is an authoritative framework, which means that only the server is allowed to make changes to the game state that will be synchronized with the clients. The clients can certainly try nonetheless but the other games won’t listen to that client, and only answer to the server.
By creating and deleting objects on the client side, THNK won’t synchronize anything. Instead, just like you did with the player objects, you need to send a message to the server if you want a client to do an action, and let the server do that action on behalf of the player.
I recommend you read this page to understand what authoritative multiplayer means
And this one to understand the rules THNK imposes as a framework:
I have concluded the game I am designing isn’t multiplayer compatible. The other players are not supposed to interact, but one of the users controls the entire system while a ‘screen share’ of some kind is displayed to the others. They interact in the game through verbal communication with the user controlling the game.