How to Make a Point and Click (Adventure) Game
How to Vibe Code a Point-and-Click Adventure Game
Stay in your creative flow. Direct AI models with mystery & narrative intent, design clever inventory-combination puzzles, and ship a playable Point-and-Click Adventure in your browser in under 20 minutes.
Core Stack
HTML5 Canvas + JS
Puzzle Engine
Hotspots & Inventory
AI Partner
Claude / Gemini
Target Time
15–20 Mins
The Vibe Coding Adventure Philosophy
Classic point-and-click development used to require specialized scripting languages, manual polygon walkable masks, and tangled boolean flags across dozens of files. Vibe coding turns adventure creation into pure storytelling: you act as the Mystery Writer & Puzzle Architect—defining atmospheric rooms, witty inspect dialogue, and lock-and-key item combinations while AI synthesizes the dynamic cursor, character walk cycle, and inventory tray.
Old-School Adventure Stress
- Learning proprietary 1990s scripting tools before writing a single puzzle.
- Hardcoding nested
if/elseflags that break when a player visits rooms out of order. - Pixel-hunting frustration where players have no visual clue which objects are interactive.
- Spending weeks drawing sprite sheets before testing if your puzzle logic makes sense.
The Vibe Coder Way
- Declarative JSON room & hotspot dictionary inside a single
index.htmlfile. - Dynamic context cursor that switches from Arrow (Walk/Navigate) to Hand/Eye (Interact/Pick Up) on hover.
- Prompt the puzzle chain: "Find the brass key under the rug, unlock the desk drawer, and use the UV lens on the wall map."
- Instant playable mystery adventure in any desktop or mobile browser.
The 4-Step Blueprint
From a story concept to a multi-room adventure with inventory puzzles and NPC dialogue.
Set the Tone & Plan Your Rooms
Decide whether your adventure is a lighthearted comedy (like Monkey Island) or a tense noir mystery, and sketch out 2 to 3 connected rooms in a single index.html.
The "One-Shot Architect" Prompt
Ask your AI for an HTML5 Canvas scene renderer with clickable Hotspots, an Arrow-vs-Hand hover cursor, a walking protagonist, and a bottom Inventory bar.
Wire Item Interactions & Clues
Let players click an inventory item to hold it in hand, then click a scene hotspot or another inventory item to trigger puzzle solutions and witty typewriter dialogue.
Playtest Clues & Save Progress
Watch a friend play through your rooms, add a subtle Hint button if they get stuck, save puzzle flags in localStorage, and publish on the web.
Vibe Prompt Configurator
Choose your adventure setting, interaction style, and puzzle features. Copy the generated master prompt into Claude, Cursor, or Gemini.
Essential Elements of a Point-and-Click Game
Every classic point-and-click adventure is built around three core pillars—the Cursor, the Environment, and the Interaction:
-
The Cursor (Arrow vs. Hand)
The cursor is the player's window into the world—switching between an Arrow cursor to navigate and select and a Hand cursor to pick up, examine, or operate objects.
-
The Explorable Environment
Whether a mystical kingdom, pirate tavern, or post-apocalyptic bunker, richly detailed rooms give the game its atmosphere and sense of discovery.
-
The Interaction & Puzzle Logic
Clicking objects causes meaningful reactions—examining clues, picking up tools, combining items, and unlocking new pathways through clever logic.
-
Persistent Inventory Tray
Let players collect items across rooms, select an item in hand, and test using it on environmental hotspots to solve multi-step puzzles.
-
Expressive Dialogue & Clues
Reward curiosity with witty character commentary and subtle narrative hints whenever the player inspects props or talks to NPCs.
-
Anti-Pixel-Hunt Hotspot Feedback
Display hover action labels (e.g., "Examine Ancient Painting") and an optional hotspot highlighter so players never get stuck guessing what is clickable.
The "Golden" Single-File Point-and-Click Adventure Template
Save this as index.html and open it in any browser to play a complete 2-Room Point-and-Click Mystery with Arrow/Hand cursors, Inventory items, and Escape Puzzles.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vibe Adventure: The Alchemist's Study</title>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }
body {
background: #080c14;
color: #f8fafc;
font-family: system-ui, -apple-system, sans-serif;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
padding: 12px;
}
.top-bar {
width: 860px;
max-width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
background: #131c31;
border: 1px solid #283655;
padding: 8px 16px;
border-radius: 10px;
margin-bottom: 8px;
font-size: 13px;
}
.hint-btn {
background: #38bdf8;
color: #080c14;
border: none;
padding: 5px 12px;
border-radius: 6px;
font-weight: 800;
cursor: pointer;
}
canvas {
border: 2px solid #334155;
border-radius: 14px;
box-shadow: 0 20px 55px rgba(0,0,0,0.7);
max-width: 100%;
height: auto;
}
</style>
</head>
<body>
<div class="top-bar">
<span><strong>Vibe Point & Click 🔍</strong> — Click floor to walk • Click objects to inspect/take • Click inventory item to use!</span>
<button class="hint-btn" id="hint-btn">💡 Show Hint</button>
</div>
<canvas id="game" width="860" height="500"></canvas>
<script>
const canvas = document.getElementById('game');
const ctx = canvas.getContext('2d');
canvas.addEventListener('contextmenu', e => {
e.preventDefault();
state.activeItem = null;
});
let mouse = { x: 430, y: 250 };
let state = {};
function initGame() {
state = {
room: 'study',
heroX: 220,
targetX: 220,
dialogue: 'The Alchemist locked the Star Portal. I need to find the Astral Crystal to escape!',
hoverLabel: '',
hoverHotspot: null,
activeItem: null,
inventory: [],
flags: {
rugLifted: false,
hasKey: false,
chestOpen: false,
hasLens: false,
hasCrystal: false,
portalOpen: false,
escaped: false
}
};
}
function getHotspots() {
const f = state.flags;
if (state.room === 'study') {
const list = [
{ id: 'rug', name: f.rugLifted ? 'Rolled Rug' : 'Velvet Rug', x: 140, y: 345, w: 150, h: 32, cursor: 'hand' },
{ id: 'chest', name: f.chestOpen ? 'Open Oak Chest' : 'Locked Oak Chest', x: 380, y: 270, w: 110, h: 75, cursor: 'hand' },
{ id: 'bookshelf', name: 'Arcane Bookshelf', x: 70, y: 120, w: 120, h: 210, cursor: 'hand' },
{ id: 'archway', name: 'Go to Observatory Balcony →', x: 700, y: 120, w: 110, h: 230, cursor: 'arrow' }
];
if (f.rugLifted && !f.hasKey) {
list.push({ id: 'key', name: 'Brass Key', x: 195, y: 348, w: 42, h: 20, cursor: 'hand' });
}
return list;
} else {
return [
{ id: 'back', name: '← Back to Alchemist Study', x: 40, y: 120, w: 105, h: 230, cursor: 'arrow' },
{ id: 'telescope', name: 'Brass Starlight Telescope', x: 330, y: 185, w: 120, h: 155, cursor: 'hand' },
{ id: 'pedestal', name: 'Moonstone Pedestal', x: 520, y: 255, w: 80, h: 90, cursor: 'hand' },
{ id: 'portal', name: f.portalOpen ? 'Active Star Portal (Escape!)' : 'Dormant Star Portal', x: 675, y: 105, w: 130, h: 245, cursor: 'hand' }
];
}
}
function addItem(id, name, icon, color) {
state.inventory.push({ id, name, icon, color });
}
function removeItem(id) {
state.inventory = state.inventory.filter(i => i.id !== id);
if (state.activeItem && state.activeItem.id === id) state.activeItem = null;
}
function interact(spot) {
const f = state.flags;
const item = state.activeItem;
if (spot.id === 'archway') {
state.room = 'balcony';
state.heroX = 160;
state.targetX = 160;
state.dialogue = 'The night sky glitters above the Observatory Balcony.';
return;
}
if (spot.id === 'back') {
state.room = 'study';
state.heroX = 650;
state.targetX = 650;
state.dialogue = 'Back inside the Alchemist Study.';
return;
}
if (spot.id === 'rug') {
if (!f.rugLifted) {
f.rugLifted = true;
state.dialogue = 'You fold back the corner of the velvet rug... Something glints underneath!';
} else {
state.dialogue = 'Just dusty floorboards under the rug now.';
}
return;
}
if (spot.id === 'key') {
f.hasKey = true;
addItem('key', 'Brass Key', '🗝️', '#facc15');
state.dialogue = 'Picked up the ornate Brass Key!';
return;
}
if (spot.id === 'bookshelf') {
state.dialogue = 'A journal note reads: "Fit the Starlight Lens to the Telescope to awaken the Pedestal."';
return;
}
if (spot.id === 'chest') {
if (f.chestOpen) {
state.dialogue = 'The oak chest is already empty.';
} else if (item && item.id === 'key') {
f.chestOpen = true;
f.hasLens = true;
removeItem('key');
addItem('lens', 'Starlight Lens', '🔮', '#38bdf8');
state.dialogue = 'Unlocked the chest! Inside you find a polished Starlight Lens!';
} else {
state.dialogue = 'The heavy oak chest is locked tight. It needs a small brass key.';
}
return;
}
if (spot.id === 'telescope') {
if (item && item.id === 'lens') {
removeItem('lens');
f.hasCrystal = true;
addItem('crystal', 'Astral Crystal', '💎', '#a855f7');
state.dialogue = 'You snap the Starlight Lens onto the telescope! A beam opens the pedestal, revealing the Astral Crystal!';
} else if (f.hasCrystal) {
state.dialogue = 'The telescope is focusing starlight onto the Moonstone Pedestal.';
} else {
state.dialogue = 'The telescope is missing its primary focusing lens.';
}
return;
}
if (spot.id === 'pedestal') {
state.dialogue = f.hasCrystal
? 'The secret compartment is open.'
: 'A sealed Moonstone Pedestal with a star-shaped sensor on top.';
return;
}
if (spot.id === 'portal') {
if (f.portalOpen) {
f.escaped = true;
state.dialogue = 'You step through the shimmering Star Portal to freedom! Mystery Solved!';
} else if (item && item.id === 'crystal') {
removeItem('crystal');
f.portalOpen = true;
state.dialogue = 'You slot the Astral Crystal into the arch! The Star Portal Ignites—click it to escape!';
} else {
state.dialogue = 'The ancient portal is dormant. There is a socket shaped like an Astral Crystal.';
}
}
}
document.getElementById('hint-btn').addEventListener('click', () => {
const f = state.flags;
if (!f.rugLifted) state.dialogue = '💡 Hint: Check under the Velvet Rug in the Study.';
else if (!f.hasKey) state.dialogue = '💡 Hint: Pick up the Brass Key revealed under the rug.';
else if (!f.chestOpen) state.dialogue = '💡 Hint: Click the Brass Key in your inventory, then click the Locked Chest.';
else if (!f.hasCrystal) state.dialogue = '💡 Hint: Go through the archway to the Balcony and use the Starlight Lens on the Telescope.';
else if (!f.portalOpen) state.dialogue = '💡 Hint: Use the Astral Crystal from your inventory on the Dormant Star Portal!';
else state.dialogue = '💡 Hint: Click the glowing Star Portal to escape!';
});
canvas.addEventListener('mousemove', e => {
const r = canvas.getBoundingClientRect();
mouse.x = (e.clientX - r.left) * (canvas.width / r.width);
mouse.y = (e.clientY - r.top) * (canvas.height / r.height);
state.hoverHotspot = null;
state.hoverLabel = '';
const spots = getHotspots();
for (const s of spots) {
if (mouse.x >= s.x && mouse.x <= s.x + s.w && mouse.y >= s.y && mouse.y <= s.y + s.h) {
state.hoverHotspot = s;
state.hoverLabel = state.activeItem
? `Use ${state.activeItem.name} on ${s.name}`
: s.name;
break;
}
}
canvas.style.cursor = state.hoverHotspot
? (state.hoverHotspot.cursor === 'hand' ? 'pointer' : 'alias')
: 'default';
});
canvas.addEventListener('mousedown', e => {
if (e.button !== 0) return;
if (state.flags.escaped) {
initGame();
return;
}
// Inventory Bar Click (y > 405)
if (mouse.y >= 405) {
for (let i = 0; i < state.inventory.length; i++) {
const ix = 260 + i * 95;
if (mouse.x >= ix && mouse.x <= ix + 82 && mouse.y >= 418 && mouse.y <= 485) {
state.activeItem = (state.activeItem === state.inventory[i]) ? null : state.inventory[i];
return;
}
}
state.activeItem = null;
return;
}
// Scene Click
if (state.hoverHotspot) {
const spot = state.hoverHotspot;
state.targetX = Math.max(90, Math.min(760, spot.x + spot.w / 2));
interact(spot);
} else {
state.activeItem = null;
state.targetX = Math.max(90, Math.min(760, mouse.x));
}
});
function drawScene() {
const f = state.flags;
if (state.room === 'study') {
// Study background
ctx.fillStyle = '#1e1b2e';
ctx.fillRect(0, 0, 860, 350);
ctx.fillStyle = '#2a223a';
ctx.fillRect(0, 340, 860, 65);
// Bookshelf
ctx.fillStyle = '#451a03';
ctx.fillRect(70, 120, 120, 210);
ctx.fillStyle = '#38bdf8';
ctx.fillRect(85, 145, 90, 18);
ctx.fillStyle = '#f43f5e';
ctx.fillRect(85, 185, 90, 18);
// Rug & Key
ctx.fillStyle = '#9f1239';
ctx.beginPath();
ctx.roundRect(140, 348, f.rugLifted ? 95 : 150, 22, 6);
ctx.fill();
if (f.rugLifted && !f.hasKey) {
ctx.fillStyle = '#facc15';
ctx.font = '22px sans-serif';
ctx.fillText('🗝️', 205, 365);
}
// Chest
ctx.fillStyle = f.chestOpen ? '#a16207' : '#78350f';
ctx.beginPath();
ctx.roundRect(380, 270, 110, 75, 8);
ctx.fill();
ctx.fillStyle = '#facc15';
ctx.fillRect(425, 295, 20, 16);
// Archway to Balcony
ctx.fillStyle = '#0f172a';
ctx.beginPath();
ctx.roundRect(700, 120, 110, 230, [55, 55, 0, 0]);
ctx.fill();
ctx.strokeStyle = '#64748b';
ctx.lineWidth = 4;
ctx.stroke();
} else {
// Observatory Balcony night sky
ctx.fillStyle = '#090d1e';
ctx.fillRect(0, 0, 860, 350);
ctx.fillStyle = '#1e293b';
ctx.fillRect(0, 340, 860, 65);
// Back Door
ctx.fillStyle = '#334155';
ctx.fillRect(40, 120, 105, 230);
// Telescope
ctx.strokeStyle = '#facc15';
ctx.lineWidth = 8;
ctx.beginPath();
ctx.moveTo(390, 340);
ctx.lineTo(390, 240);
ctx.lineTo(440, 195);
ctx.stroke();
// Pedestal
ctx.fillStyle = '#475569';
ctx.fillRect(520, 255, 80, 90);
// Star Portal
ctx.fillStyle = f.portalOpen ? '#7e22ce' : '#1e293b';
ctx.beginPath();
ctx.roundRect(675, 105, 130, 245, [65, 65, 0, 0]);
ctx.fill();
ctx.strokeStyle = f.portalOpen ? '#e879f9' : '#64748b';
ctx.lineWidth = 5;
ctx.stroke();
}
// Highlight hovered hotspot
if (state.hoverHotspot) {
const s = state.hoverHotspot;
ctx.strokeStyle = 'rgba(250, 204, 21, 0.75)';
ctx.lineWidth = 2;
ctx.strokeRect(s.x, s.y, s.w, s.h);
}
// Walking Protagonist
state.heroX += (state.targetX - state.heroX) * 0.1;
ctx.fillStyle = '#38bdf8';
ctx.beginPath();
ctx.roundRect(state.heroX - 18, 250, 36, 95, 10);
ctx.fill();
ctx.fillStyle = '#fde047';
ctx.beginPath();
ctx.arc(state.heroX, 232, 16, 0, Math.PI * 2);
ctx.fill();
// Dialogue & Hover Action Bar
ctx.fillStyle = 'rgba(9, 13, 24, 0.88)';
ctx.fillRect(0, 0, 860, 54);
ctx.fillStyle = '#f8fafc';
ctx.font = 'bold 16px sans-serif';
ctx.textAlign = 'center';
ctx.fillText(state.dialogue, 430, 33);
ctx.fillStyle = '#facc15';
ctx.font = 'bold 14px sans-serif';
const cursorIcon = state.hoverHotspot
? (state.hoverHotspot.cursor === 'hand' ? '✋ ' : '➔ ')
: '';
ctx.fillText(cursorIcon + state.hoverLabel, 430, 392);
// Bottom Inventory Bar
ctx.fillStyle = '#0f172a';
ctx.fillRect(0, 405, 860, 95);
ctx.strokeStyle = '#334155';
ctx.beginPath();
ctx.moveTo(0, 405);
ctx.lineTo(860, 405);
ctx.stroke();
ctx.fillStyle = '#94a3b8';
ctx.font = 'bold 14px sans-serif';
ctx.textAlign = 'left';
ctx.fillText('🎒 INVENTORY:', 30, 456);
state.inventory.forEach((it, idx) => {
const ix = 260 + idx * 95;
const isSel = state.activeItem && state.activeItem.id === it.id;
ctx.fillStyle = isSel ? '#1e293b' : '#131c31';
ctx.strokeStyle = isSel ? '#facc15' : it.color;
ctx.lineWidth = isSel ? 3 : 2;
ctx.beginPath();
ctx.roundRect(ix, 418, 82, 66, 10);
ctx.fill();
ctx.stroke();
ctx.font = '24px sans-serif';
ctx.textAlign = 'center';
ctx.fillText(it.icon, ix + 41, 450);
ctx.fillStyle = '#e2e8f0';
ctx.font = '11px sans-serif';
ctx.fillText(it.name, ix + 41, 474);
});
if (f.escaped) {
ctx.fillStyle = 'rgba(8, 12, 20, 0.88)';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = '#10b981';
ctx.font = 'bold 36px sans-serif';
ctx.textAlign = 'center';
ctx.fillText('MYSTERY SOLVED! YOU ESCAPED! 🎉', 430, 225);
ctx.fillStyle = '#f8fafc';
ctx.font = '18px sans-serif';
ctx.fillText('Click anywhere to replay the adventure', 430, 275);
}
requestAnimationFrame(drawScene);
}
initGame();
drawScene();
</script>
</body>
</html>
How to Debug Without Losing Your Vibe
Point-and-click adventures rely on clean state flags and intuitive cursor feedback. Use these three vibe fixes:
Single Flags State Object
Prevent broken puzzle sequences when players visit rooms out of order by prompting: "Store all puzzle booleans inside a single state.flags dictionary so hotspots dynamically update and save cleanly."
Clear Active-Item Deselect
Stop players from getting stuck holding an inventory item on their cursor by telling the AI: "Clear state.activeItem = null whenever the player right-clicks or clicks on empty floor space."
Hover Tooltip Action Line
Eliminate frustrating pixel-hunting by instructing your AI assistant: "Render a classic LucasArts action line above the inventory bar showing 'Use [Item] on [Hotspot]' on hover."
The Vibe Prompt Vault
Copy-paste prompts to add Branching NPC Dialogue Trees, Item-on-Item Crafting, and Close-Up Keypad Puzzles.
🗣️ Prompt: Add a Monkey Island-Style Branching NPC Dialogue Tree
"Extend my HTML5 Canvas point-and-click game in index.html with an interactive NPC owl familiar in the Study. Clicking the owl opens a 3-choice dialogue menu at the bottom of the screen where players can ask for lore, trade a shiny coin for a secret passkey clue, or say goodbye."
🧪 Prompt: Add Inventory-on-Inventory Item Combination Crafting
"Allow combining two items directly inside the Inventory bar of my point-and-click game. If the player selects 'Unlit Lantern' and clicks 'Flint & Steel' in the inventory tray, merge them into a 'Glowing Lantern' item that illuminates dark rooms."
🔐 Prompt: Add a Close-Up Safe Keypad / Rune Dial Modal Puzzle
"Add a zoomed-in close-up inspection overlay when clicking the Wall Safe in my point-and-click adventure. Draw 4 rotating celestial rune dials that the player can click to cycle through Moon, Sun, Star, and Comet symbols—matching the clue hidden in the bookshelf to pop the safe door open."