Can FarSeer be used in a networked XNA game?

Topics: Developer Forum, Project Management Forum, User Forum
Mar 1, 2007 at 6:36 PM
I'm interested using FarSeer Physics engine with XNA to create a multiplayer (eg. networked via TCP/IP) game.

I realize that XNA doesn't have any networking support on the X-Box 360 so my game will have to be Windows only (or support local multiplayer only on the 360).

Do you know if it's possible to create a networked game using FarSeer Physics engine? If so, do you have any tips or suggestions for me?

I'm a web application developer (with several years of experience), but I don't have much experience in game programming (or XNA) or network programming, but I'm determined to get this working!

Mar 1, 2007 at 7:32 PM
I don't see any reason why it couldn't be used for network gameplay, however I've never tried it.

Good luck with it though.
Dec 12, 2008 at 3:40 PM
Edited Dec 12, 2008 at 3:44 PM
I am in a similar situation.  I am making a server application that will keep track of everything much like World of warcraft.  I'm am unsure of the best way to send the physics information to each client.  I am planning on having 4-6 players connected to the server max, so I'm trying to find the best way to sync up the physics on all clients through the network.  I know how to do the easier stuff like health or whatever (for the most part) but I'm very unsure of how I will get each of the physics updates over to each client so they all see the same things as eachother.  Any links or concepts or anything else is much appreciated.  I guess I should mention I am using System.Net/ System.Net.Sockets and not xna networking (  <-- i'm using this and modifying as needed.
Dec 12, 2008 at 4:13 PM
I was planning on attempting this some time in the future, but I can't think of a real effecient way to do it.  It's frowned apon to directly set the position and velocity variables, so how would we make sure everyone is in sync?  Even if you could, who would you trust to supply that sort of information in a P2P network?  Even if you had a central server for the game, you couldn't expect it to handle the physics of every game to keep the clients up to date.  And you still have to worry about cheaters with their fancy memory editing and packet injection tools!

Then there's the subject of bandwidth.  What data would you send?  I suppose only the position, linear and angular velocities would be important (and an ID to reference the body).  Full body and geom data would need to be sent for newly created objects, unless you can hard-code templates.  Then how often would you need to send the data?

Baah!  I have so little experience in network communication, I don't even know where to start. =[
Dec 12, 2008 at 4:29 PM
"Even if you had a central server for the game, you couldn't expect it to handle the physics of every game to keep the clients up to date"

I know,  that was boggling my mind,  I have no Idea of what I would need to do physics wise,  since I will most likely want to have "rooms" or whatever much like and Diablo.  I would assume they have multiple games (instances) running on one server so I don't know how intensive that would be to control the physics, any particle systems, player things, ai and whatever else gets in there, but I am new to everything in game programming so I really have no Idea how it's being done in the real world.

Luckily i'm not to concerned about hackers primarily because I'm no great programmer and I will probably have holes in my code all over the place anyway as well as this is mainly for my education.

This seems more and more overwhelming every time I think about about it, but it is very intriguing to me and would love to see something working like this using xna as well as physics.