Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is the best way to code the XNA Game Server for FPS game?
    primarykey
    data
    text
    <p>I'm writing a FPS XNA game. It gonna be multiplayer so I came up with following:</p> <ol> <li>I'm making two different assemblies — one for the game logic and the second for drawing it and the game irrelevant stuff (like rocket trails).</li> <li>The type of the connection is client-server (not peer-to-peer), so every client at first connects to the server and then the game begins.</li> <li>I'm completly decided to use <code>XNA.Framework.Game</code> class for the clients to run their game in window (or fullscreen) and the <code>GameComponent</code>/<code>DrawableGameComponent</code> classes to store the game objects and update&amp;draw them on each frame.</li> </ol> <p>Next, I want to get the answer to the question:</p> <p>What should I do on the server side? I got few options:</p> <ol> <li>Create my own <code>Game</code> class on the server, which will process all the game logic (only, no graphics). The reason why I am not using the standart <code>Game</code> class is when I call <code>Game.Run()</code> the white window appears and I cant figure out how to get rid of it.</li> <li>Use somehow the original XNA's <code>Game</code> class, which is already has the <code>GameComponent</code> collection and Update event (60 times per second, just what I need).</li> </ol> <p>UPDATE:</p> <p>I got more questions:</p> <p>First, what socket mode should I use? TCP or UDP? And how to actually let the client know that <strong>this</strong> packet is meant to be processed <strong>after that</strong> one?</p> <p>Second, if I is going to use exacly <code>GameComponent</code> class for the game objects which is stored and processed on the <strong>server</strong>, how to make <strong>them</strong> to be drawn on the client? Inherit them (while they are combined to an assembly)? Something else?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload