Development:Network:Testing

From VsWiki
Revision as of 10:41, 10 August 2006 by Nachtwolf (talk | contribs) (Added network testing page.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Compilation

Every should compile without a hitch. If it does not, post a question on the forum about the specific error.

Linux

The vegaserver and accountserver already compile by default in Linux.

Windows

There should be two projects for vegaserver and accountserver. They should compile without any changes.

I also recommend that you build vegastrike using "Debug GLUT" or "Release GLUT", since you will get a console. Otherwise you only get a stderr/out.txt for one of the clients.

Setup

  • You will want to move the vegastrike.config.netplayer file over the vegastrike.config file to get some extra settings.
  • Now, open up Setup.
    • You should be able to choose between players (test1, test2, and test3).
    • You should also get an option for screen resolution labeled "Skinny". This will make a skinny windows so that you can fit two on top of each other. At 1600x1200 you can fit two instances of VS, as well as three terminals and a setup screen if you tile it right.

Starting

Linux

I highly recommend running linux programs in seperate GNU screen windows. If you have never used screen before, it's basically a detachable session that holds multiple "terminals". You can switch between them with C-a " and you can make new ones with C-a c -- you can detach with C-a d and reattach with screen -r... Very handy for running multiple instances of Vegastrike in my opinion, but don't use it if you are not comfortable as it can be confusing.

  • You will want to run everything from the data4.x directory.
  • First, start up the accountserver: ../vegastrike/accountserver
  • Now, start up vegaserver: ../vegastrike/vegaserver
  • Clients should be able to connect. I have only tested localhost, but remote connections should be able to connect as well with some config file changes.
    • To connect, run vegastrike with the --net option: ../vegastrike/vegastrike --net
    • To run more than one client, you must choose a different user, so select test2 for example, run vegastrike, then select test1 and run vegastrike again in a different terminal.

Windows

  • Double-click accountserver.exe
  • Double-click vegaserver.exe
  • Now, click on either debug_net_client.bat or release_net_client.bat, depending on whether you built in "Debug GLUT" or "Release GLUT".
  • To open more than one, switch users and try again.
  • You should get a console for each client as well as the servers.

Loading and Playing

  • When the window opens up, the network will start connecting when the screen reads "Vegastrike Loading..."
  • You will very possibly encounter the client exiting on load. Read the console for more info. A common error is LOGIN_ALREADY, meaning that the client was already connected, or that there was another error and the accountserver didn't reset itself. This will hopefully be fixed someday.
  • If you get passed the "Vegastrike Loading..." screen then everything should continue as normal until you get into space. You should not see anyone else at first...
  • If you connect with another client and a different username, the second client should target the first client, however the first client will not autotarget, so hit "t" to target the new unit.
  • Fly around in both users and fire around and so on. However beware: As soon as one client dies from a collision, the server will crash due to a NULL pointer dereference. This is being looked at, but until it is fixed, don't die by crashing into someone.