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:
- Register a user with the GameCore master server
- Login to Master Server
- 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.
- 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:
- Register a user with the GameCore master server
- Login to Master Server
- Retrieve a list of current game host sessions.
- Call JoinGame() with either a direct IP Address to connect to, or a specified hostID that was returned by the Master Server
- Setup a message loop to call 'GetNetworkMessage()' to retrieve incoming network messages from clients and respond appropriately.
Printer-friendly version- Login to post comments
- PDF version
