LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Structure of game server

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.

0 Kudos
Message 1 of 3
(2,669 Views)

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

Message 2 of 3
(2,635 Views)

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

 

Message Edited by dan_u on 05-28-2009 09:25 AM
0 Kudos
Message 3 of 3
(2,631 Views)