
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
@robingamedev/visual-novel-dialogue
Advanced tools
A minimal, JSON-driven dialogue plugin for Phaser 3 games with support for branching choices, typewriter effects, and simple inline formatting.
A minimal, JSON-driven dialogue plugin for Phaser 3 games with support for branching choices, typewriter effects, and simple inline formatting.
jump
{style=value}
jumpTo
, pause
, and hooks{audio=value}{/audio}
tagsnpm install @robingamedev/visual-novel-dialogue
import VisualNovelDialogue from '@robingamedev/visual-novel-dialogue';
// Initialize the dialogue system
const dialogue = new VisualNovelDialogue(this, {
fontFamily: 'VT323',
typeSpeed: 30,
boxStyle: 'default',
autoForward: false,
});
// Load your dialogue data
dialogue.load(dialogueData);
// Start the dialogue
dialogue.start('Start');
// Handle events
dialogue.onChoice = (label, text) => {
console.log(`Player chose: ${text}`);
};
dialogue.onEnd = () => {
console.log('Dialogue finished!');
};
{
"settings": {
"characters": {
"alice": { "name": "Alice", "color": "#ff6b6b" },
"bob": { "name": "Bob", "color": "#4ecdc4" }
}
},
"script": {
"Start": [
"alice Hello there!",
"bob Hi Alice!",
{
"Choice": {
"continue": "Continue the conversation",
"end": "End here"
}
}
],
"continue": [
"alice Let's keep talking!",
"jump end"
],
"end": [
"bob Goodbye!",
"end"
]
}
}
// Control dialogue flow
dialogue.start('Start'); // Start at label
dialogue.jumpTo('continue'); // Jump to label
dialogue.pause(); // Pause dialogue
dialogue.resume(); // Resume dialogue
dialogue.nextLine(); // Manual advance
dialogue.skipTypewriter(); // Skip typewriter effect
// Check state
dialogue.isTypewriterActive(); // Is typewriter running?
dialogue.isChoicesActive(); // Are choices showing?
// Show/hide dialogue box
dialogue.show();
dialogue.hide();
dialogue.onLineEnd = (line) => {
console.log('Line finished:', line);
};
dialogue.onChoice = (label, text) => {
console.log('Choice made:', label, text);
};
dialogue.onShow = (characterId, emotion) => {
// Show character sprite
showCharacter(characterId, emotion);
};
dialogue.onHide = (characterId) => {
// Hide character sprite
hideCharacter(characterId);
};
dialogue.onEnd = () => {
// Dialogue sequence finished
console.log('Dialogue ended!');
};
const config = {
fontFamily: 'Arial', // Font family
typeSpeed: 30, // Characters per second
boxStyle: 'default', // Dialogue box style
autoForward: false, // Auto-advance dialogue
boxAnimationSpeed: 0, // Box animation speed
boxPosition: 'bottom', // 'bottom', 'top', 'center'
styles: { // Custom text styles
bold: { bold: true },
red: { color: '#ff0000' }
},
audio: { // Audio file mapping
type: 'typewriter.wav',
choice: 'choice.wav'
},
debug: false // Enable debug logging
};
MIT
Built for small teams, hobbyists, and story-heavy games. Perfect for visual novels, RPGs, and narrative-driven experiences.
FAQs
A minimal, JSON-driven dialogue plugin for Phaser 3 games with support for branching choices, typewriter effects, and simple inline formatting.
The npm package @robingamedev/visual-novel-dialogue receives a total of 327 weekly downloads. As such, @robingamedev/visual-novel-dialogue popularity was classified as not popular.
We found that @robingamedev/visual-novel-dialogue 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
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.