Game Development Community

T2D Multiplayer Help Please.

by Ben Hamlett · in Torque Game Builder · 01/06/2012 (7:02 am) · 5 replies

Hi there, I have been working on a 2D platform game using T2D Pro and would like to turn it into a 4 player co-op game.
I can creat, search and join a server from the game using the built in server scripts but I have no Idea how to show the 2nd, 3rd and 4th players once they connect. I says they have connected but we do not see one anothers characters.

I have a good feeling that it has something to do with Ghosting?? But I am way out of my brain train when it comes to that, I would like to learn how to do this so if anyone could provide some tutorials to help me I would be grateful, thanks :)

*Seems this was posted in the wrong forum, sorry*

#1
01/06/2012 (12:07 pm)
Moved this to correct forum.

@Ben - A little more information could be useful. Are you basing this on the Checkers tutorial? How are the other characters created and shown?
#2
01/06/2012 (3:54 pm)
well the character* is already placed on the scene, I havnt began to make anything that is hugely in-depth as I would like to get to know the engine and see if it can work with the teams plan.

I did look at the tutorial you mention and I think I got the code to include the built in server GUI from that one but then I got a little excited after I got both clients connected and started looking around for a tutorial that was more towards the platformer multiplayer rather than a board game.

The main goal (as I intend to take baby steps) is to get both P1 and P2 characters to appear on the same screen once they are connected to the same server, once each player can see one another I will then move on haha. It may sound strange to some but thats how I feel im going to learn this best.
#3
01/10/2012 (4:18 pm)
As far as I understand, the built in T2D multiplayer is not setup to support real-time multiplayer games. It does in more of a turn-based style by sending and receiving 'moves' to each player.
#4
01/10/2012 (5:14 pm)
Yeah I read that it needs to be implemented manually but I also read somewhere that the "Turn-Based Networking" (RTN) doesn't mean it cannot do real time it just means its not very reliable I dont even know if that is true but lets hope so as I dont want to purchase TGE just to use the source code for the RTN :/

#5
01/19/2012 (6:32 pm)
I went over the Checkers tutorial and worked with Game Maker from Yoyogames, which used a simple messaging system that TGB's Turn-Based Networking reminds me of. I'm no Torque veteran, but...

I think what you want to do is that whenever a player performs an action (function call), their game sends a message to the others' games to call the same function with the same parameters.

For example, when a client player connects, all other players need to receive a message to spawn that player's character. When that player jumps, the other players need to receive a message to call the "jump" function.

This can be achievable if you design the player character classes so that the actions of the characters are tightly encapsulated into a set of methods. This way, the only difference between a player and their friends' characters in their instance of the game is that the methods of the player's character are called via key bindings and their friends' characters are called by network messages.

I hope this helps.