
Security News
Ruby's Bundler 4.0.18 Extends Cooldown to bundle lock and bundle cache
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.
@playertwo/ide
Advanced tools
Embeddable multiplayer game IDE with dual-view local testing.
Note: TypeScript type checking is deferred to Phase 2
pnpm add @playertwo/ide
<script lang="ts">
import { playertwoIDE, type playertwoIDEConfig } from '@playertwo/ide';
const config: playertwoIDEConfig = {
files: {
'/src/game.ts': `
import { defineGame } from '@playertwo/core';
export const game = defineGame({
minPlayers: 2,
maxPlayers: 2,
setup: () => ({ players: {} }),
actions: {
move: (state, playerId, input) => {
state.players[playerId] = input;
}
}
});
`,
'/src/scene.ts': '...',
'/src/main.ts': '...'
},
engine: 'phaser',
transport: { type: 'local' },
layout: 'dual',
onChange: (files) => {
console.log('Files changed:', Object.keys(files));
}
};
</script>
<playertwoIDE {config} />
playertwoIDEConfiginterface playertwoIDEConfig {
/** Initial project files */
files: Record<string, string>;
/** Game engine (Phase 1: phaser only) */
engine: 'phaser';
/** Multiplayer transport (Phase 1: local only) */
transport: { type: 'local' };
/** Layout mode */
layout?: 'dual' | 'code-only';
/** Editor settings */
editor?: {
theme?: 'dark' | 'light';
fontSize?: number;
};
/** Callbacks */
onChange?: (files: Record<string, string>) => void;
onError?: (error: GameError) => void;
onReady?: () => void;
onRun?: () => void;
}
Each game preview has a built-in DevTools overlay that can be toggled with the 🛠️ button in the preview header.
To send messages to the DevTools console from your game code, the sandbox runtime intercepts standard console methods:
console.log('Player position:', x, y); // Shows as info
console.warn('Low health!'); // Shows as warning
console.error('Failed to connect'); // Shows as error
Each console message includes:
@playertwo/ide/
src/
lib/
PlayerTwoIDE.svelte # Main IDE component
components/
CodeEditor.svelte # CodeMirror wrapper
GamePreview.svelte # Dual-view game preview
DevToolsPanel.svelte # Per-game debugging overlay
core/
VirtualFS.ts # In-memory file system
ESBuildManager.ts # ESBuild-powered preview runtime
Run the demo to see it in action:
cd @playertwo/demos
pnpm dev
Then visit http://localhost:5173/ide
See spec-phase-2.ts for details.
MIT
FAQs
Embeddable multiplayer game IDE with dual-view local testing
We found that @playertwo/ide demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.