05-27-2009 08:45 AM
Want to make a game server by tcp.
- User can login
- Start game with another one.
May I know any sample structure or where to start.
Thanks.
05-28-2009 02:10 AM
Hi turbot,
you can use a listener to wait for connections. If a connection starts you can read the login data, assumed the client sends it directly with the connection. After that you can use a vi template to create a seperate session for each connected user. There you can handle the game seletion or what ever (i don't know it the user has to select the game on the server, or if this informtion is part of the connection process. If a user has selected the game, then you can start an instance of the game and add the user or you only add the user to the existing game.
First idea, hope it helps.
Can you explain a bit more please? What type of games do you mean? Is the client the game you want to play?
Mike
05-28-2009 02:24 AM - edited 05-28-2009 02:25 AM
Have a look at the examples inlcuded with LabVIEW. There's an example called "DateServerUsingReentrantRun.vi". This is a TCP server that waits for incoming connections and spawns a handler process (DateServerHandler.vi) for each connection. The handler VI must be reentrant.
This should get you started from the architecture point of view.
(It's pretty much what Mike suggested in the previous post.)
Hope this helps,
Daniel