@antha/multiplayer-core
v0.2.0
Published
Core functionalities for Antha multiplayer mods.
Maintainers
Readme
@antha/multiplayer-core
This package provides the room, signaling, WebRTC, and identifier utilities behind the Antha game engine's peer-to-peer multiplayer features. Use it directly to build a custom multiplayer strategy, or use one of the strategy packages for a ready-made approach.
Install
npm i @antha/multiplayer-coreUsage
import {createMultiplayerApiClient, createMultiplayerId} from '@antha/multiplayer-core';
const roomId = createMultiplayerId.room();
const multiplayerApiClient = await createMultiplayerApiClient({
backendOrigin: 'http://localhost:9348',
portScanOptions: false,
});