Framework

Quickly build client-server LAN multiplayer game, with rich integration of event-driven architecture.


Overview

Use the GamePantry framework to quickly build multiplayer LAN games, which depend on short burst of data being transmitted over the local network. The GamePantry framework uses MultipeerConnectivity as its underlying layer, providing familiarity and serves as the base for the star-topology used by the game-server relation.

Supercharge your game development by implementing event-driven architecture, per Combine Framework’s footpath, that’s bundled with GamePantry since v0.1.3.

Architecture

When working with the GamePantry framework, there are several things you will interact with:

Phases and Behavior

There are two phases in most multiplayer game: the matchmaking phase and the game phase.

In the matchmaking phase, your game client uses GPGameServerBrowser object to search for your game’s hosted room, and may request to join them at player’s disclosure. Simultaneously, your game server uses GPGameServerAdvertiser object to make itself visible on the local network, and decides on any request its gotten through GPGameJoinRequest objects.