Networking Basics

The following pages cover the basics of networked games in GameCore, including logging into the account / master server, hosting a server and connecting to a hosted server from a GameCore client.


The basic steps of setting up (hosting) an online game are:

  1. Register a user with the GameCore master server
  2. Login to Master Server
  3. Call HostGame() with the number of players that you wish to allow to connect to the game server.  This will automatically register the server session with the master server.
  4. Setup a message loop to call 'GetNetworkMessage()' to retrieve incoming network messages from clients and respond appropriately.

 The steps for connecting to an online game are similar:

  1. Register a user with the GameCore master server
  2. Login to Master Server
  3. Retrieve a list of current game host sessions.
  4. Call JoinGame() with either a direct IP Address to connect to, or a specified hostID that was returned by the Master Server
  5. Setup a message loop to call 'GetNetworkMessage()' to retrieve incoming network messages from clients and respond appropriately.