View Single Post
Old 29-Mar-2007, 03:50 AM   #2 (permalink)
Iphone
Fixed Error!
 
Iphone's Avatar

Posts: 4,202
Join Date: Mar 2007
Rep Power: 6 Iphone is on a distinguished road

IM:
Default Re: directplay: peertopeer or client/server?

I would personally suggest client/server for this project. The load should be light enough that one of the machines should be able to host the server while playing the game no problem. The reason I'd pick client/server is the simplicity of the model. Its very easy to keep one consistant game state (i.e. the server) and have it send that state out to the clients. No worries about a client getting out of sync, because it can just get the current state again from the server. I think it's much easier to conceptualize, personally, as well.

Client - > Fire Shot (position, direction, shot type) - >
Server - > Add to list of shots - > Check shots for impacts - > Tell clients that Tank A was hit - >
Client - > Blow up Tank A

Hope that makes sense : ) Take care and good luck!
Iphone is offline   Reply With Quote