Frequently Asked Questions

Quick answers to common questions. For detailed guides, see the Getting Started section.

General

What is martini-kit SDK?

martini-kit SDK is an engine-agnostic, host-authoritative multiplayer framework for building real-time multiplayer games. See Architecture for details.

Is martini-kit production-ready?

martini-kit SDK is currently in v0.1 (alpha). It’s suitable for prototypes and small-scale games. For production use, choose an appropriate transport for your needs.

What license is it under?

MIT license - free and open source.

Architecture

Why host-authoritative instead of deterministic lockstep?

See the Architecture guide for a detailed comparison. TL;DR: Host-authoritative is simpler to implement and works with existing physics engines, but the host has a latency advantage.

How does state synchronization work?

See State Management for the full explanation of the diff/patch system.

What happens if the host disconnects?

Currently, the game ends. Host migration is planned for a future release and is a great contribution opportunity!

Compatibility

What game engines does martini-kit support?

  • Phaser 3 - Full integration with @martini-kit/phaser
  • Vanilla JavaScript - Use @martini-kit/core directly

Planned: Unity (WebGL), Godot, Three.js. You can also create custom adapters.

Does it work with React/Vue/Svelte?

Yes! Embed the game canvas as a component and sync state to your UI framework. See UI & HUD guide.

What browsers are supported?

All modern browsers: Chrome/Edge (recommended), Firefox, Safari, and mobile browsers.

Do I need TypeScript?

No, but it’s highly recommended for type safety and better IDE support.

Development

How do I test locally?

Use @martini-kit/transport-local - see Testing guide.

How do I debug state sync issues?

Use StateInspector from @martini-kit/devtools - see Troubleshooting.

  • Slow-paced (turn-based): 100-200ms
  • Normal (platformers): 50ms (default)
  • Fast-paced (shooters): 33ms or 16ms

See Performance guide for optimization tips.

Performance

What’s the maximum number of players?

  • P2P (Trystero): 2-8 players
  • WebSocket/Server: 100+ players with proper architecture

See Deployment guide for scaling strategies.

How much bandwidth does it use?

Typically 1-10 KB/s per client. The diff/patch system minimizes bandwidth by only sending changes.

Can I optimize for mobile?

Yes! See the Performance guide for mobile-specific optimizations.

Networking

What transports are available?

See Transport Overview for a full comparison of available transports.

Can I use it without a server?

Yes! Use @martini-kit/transport-trystero for P2P games (2-8 players). See Deployment guide.

How do I implement custom transports?

See Custom Transports guide.

Features

Can I save/load game state?

Yes! State is just a JavaScript object - serialize it to JSON and save to localStorage or your backend.

Does it support voice chat?

Not built-in. Integrate third-party services like Agora, Twilio, or Discord.

Can I record and replay games?

Not built-in yet, but you can implement it by recording actions with timestamps. Great contribution opportunity!

Does it support AI/bots?

Yes! Bots are simulated players - create a bot player ID and submit actions for them. Use context.random for deterministic AI.

Comparisons

How does it compare to Colyseus?

Featuremartini-kitColyseus
HostingSelf-hosted or P2PServer required
TransportPluggableWebSocket only
EnginePhaser, vanillaFramework-agnostic
PricingFree (MIT)Free (self-hosted)

Use martini-kit if: You want P2P support, Phaser integration, or transport flexibility.

Use Colyseus if: You need battle-tested server infrastructure.

How does it compare to Photon?

Featuremartini-kitPhoton
HostingSelf-hostedPhoton Cloud
PricingFreePaid (free tier)
PlatformWebWeb, Unity, Unreal

Use martini-kit if: You want open source, no vendor lock-in, free hosting.

Use Photon if: You need cross-platform support with hosted infrastructure.

Contributing

How can I contribute?

See the Contributing Guide for setup instructions and finding issues to work on.

Where do I report bugs?

Open an issue on GitHub with:

  • Steps to reproduce
  • Expected vs actual behavior
  • Browser and OS
  • Minimal code example

How do I request features?

Post in GitHub Discussions with your use case and implementation ideas.

Still Have Questions?