跳到正文
VibeFather
免费注册

用这个模板做的 2 个案例

同一份提示词,不同的 [VARIABLES] 变量。点一个在上方预览。

关于这个模板

《开放世界城市驾驶游戏》是一款单页浏览器游戏,场景设在一座黄昏时分的微型城市街区。第一屏就是街区本身:低多边形建筑、口袋公园、六辆停放的共享汽车、已经在行驶的车流,画面旁边是标题卡。玩家随后走上人行道,坐进任意一辆俱乐部汽车,用简单的街机式转向驾驶。这些车属于一个虚构的社区汽车俱乐部。任务是上门送货和一场友好的计时圈。

默认世界是 Reed Wharf 的 Amber Row Club。会员借用薄荷条纹的共享汽车,把烘焙盒从俱乐部送到三家商店,或者跑 Lantern Lap:围绕外围街道的六道门,标准时间 52 秒。北向小地图、傍晚时钟和路灯让街区保持清晰可读。在大约两分半钟里,天空从淡紫黄昏过渡到深夜,更多窗户亮起。名称改变时,道路形状保持不变。

操作在桌面和手机上都能用。键盘可以行走、驾驶、上下车和开门。手机使用左摇杆加上油门、刹车和动作按钮,这些按钮可以同时按住。暂停、帮助、默认静音的声音开关以及保存的最佳成绩都是循环的一部分。减少动态效果会停止标题镜头的漂移和额外脉冲。驾驶本身保持直接。

开发者和独立开发者可以把游戏作为静态文件发布。五个变量可以重命名俱乐部、街区、货物、比赛和标语。商店招牌、街道标签和小道具会跟随这些文本。道路、车辆操控、任务和光照保持固定。夜间花市是第二个案例。这里不需要服务器、账号或下载的城市模型。

模板提示词

在线演示就是用这份提示词原样做出来的,没有额外补充。其他案例只是改了 [VARIABLES] 变量的值。 提示词保持英文原版,国内常用的 AI 编程工具都能直接理解;下面附中文参考译文。

# Open World City Driving Game

Build this website exactly as described below. Replace the [VARIABLES] with your own values; keep everything else.

## Brief
Build [BRAND], a complete single-page 3D browser game in the invented district of [DISTRICT]. The player walks a small low-poly city at dusk, borrows any mint-striped pool car, and either carries [ERRAND] to three doors or drives [RACE_NAME], a six-gate lap. The whole district is loaded at once and is the first thing on screen. Lighting eases from lilac dusk to night over two and a half minutes of play. Default tagline: [TAGLINE].

- Audience: Indie hackers, front-end developers, and designers who want a polished static Three.js driving toy with keyboard and on-screen gamepad controls, readable at neighborhood speed on both a desk and a phone.
- Goal: Ship one replayable evening: a title card over a living street grid, free walking, entering and leaving pool cars, arcade driving, eight ambient traffic cars, a north-up minimap, a porch-run errand, a lap time trial, dusk-to-night light, pause and help, and local bests. Two different name sets must keep the same roads, handling, and mission geometry.
- Tone: Warm, local, and playful. Short US English, concrete place names, and the manners of a neighborhood car club. The player is a welcome member borrowing club cars and dropping parcels or flowers at doors.

## Stack
- Framework: Vite 6 + TypeScript 5
- Styling: Vanilla CSS
- Libraries: three (MIT), lucide (ISC), @fontsource-variable/fraunces (OFL), @fontsource-variable/outfit (OFL), @fontsource/ibm-plex-mono (OFL)
- Build: `npm run build` → static files in `dist/`. No backend, no server code, no external APIs.
- Setup:
  - Scaffold Vite's vanilla TypeScript template. Scripts: dev=vite, build=tsc && vite build, preview=vite preview. Package name is the slug of BRAND, not a fixed template id. Set vite base to './', build.outDir to dist, build.emptyOutDir to true, and build.sourcemap to false. tsconfig: strict true, noEmit true.
  - Install only three, lucide, @fontsource-variable/fraunces, @fontsource-variable/outfit, and @fontsource/ibm-plex-mono as runtime dependencies, plus Vite and TypeScript as dev dependencies. Do not add React, a physics engine, a game framework, postprocessing, or a tween library.
  - Import Fraunces variable weights 600 and 700, Outfit variable weights 400, 500, and 600, and IBM Plex Mono weight 500 from those packages. Import only the Lucide icons Play, Pause, Volume2, VolumeX, CircleHelp, Car, Flag, Package, and X. Wait for document.fonts.ready before drawing canvas signs.
  - Use modules src/content.ts, main.ts, world.ts, drive.ts, traffic.ts, missions.ts, lighting.ts, minimap.ts, ui.ts, audio.ts, and styles.css. Keep every proper name, button label, help line, toast, and sign string in content.ts. Simulation code reads that module.
  - World axes: +x east, +y up, +z north. Heading yaw for a mesh is Math.atan2(forwardX, forwardZ) assigned to rotation.y. Yaw 0 faces +z. Verify the Kiln pool car points north; if it points south, flip the yaw sign rather than mirroring the map.
  - Use BRAND, DISTRICT, ERRAND, RACE_NAME, and TAGLINE everywhere player-facing copy is built. When any value differs from the defaults, rewrite signs, shop names, awning props, and board sentences in content.ts and keep every coordinate, speed, color, and gate. If DISTRICT is Orchid Blocks and ERRAND is flower crates, use the alternate name table in the world section exactly.
  - Persist only porch best points, best lap seconds, and mute in localStorage under a key slugified from BRAND plus -evening. No calendar dates. Parse nothing from the network.
  - One index.html, lang=en, viewport with viewport-fit=cover, a full-view canvas, and HTML overlays. Document title is BRAND + an em dash + DISTRICT. Body overflow hidden. No router.

## Variables
- [BRAND] — Club name (default: "Amber Row Club"). Invented club or market name on the title card, clubhouse sign, and save key.
- [DISTRICT] — District (default: "Reed Wharf"). Invented neighborhood. Used in the eyebrow, idle objective, and title.
- [ERRAND] — Cargo (default: "bakery boxes"). Lowercase plural noun for the porch-run cargo.
- [RACE_NAME] — Lap name (default: "Lantern Lap"). Short name of the six-gate time trial.
- [TAGLINE] — Title deck (default: "Walk the blocks before the lamps take over."). One sentence under the club name on the title card.
- [CREDIT] — keep a small "Template by VibeFather" link to https://vibefather.ai/t/open-world-city-driving-game in the footer (default: yes; delete this line to remove it)

The copy under Pages & Sections is written for the default values. If your values differ, rewrite every headline, paragraph, label and image for them — same length, tone and structure. Layout, colors, type and motion stay as described.
Keep all copy, image paths and links in one content file (for example `src/content.ts`), keyed by section, so the content can be swapped later without touching components.

Pro 模板

解锁完整提示词和源码

  • 完整提示词:设计、版块、动效、素材
  • 每个在线演示的源码
  • 商用授权

在线演示和 DESIGN.md 仍然免费。

$9/月起 · 年付和终身正在上线特惠

DESIGN.md

单独的设计规范:配色、字体、间距和动效。可以把这套视觉用到你已有的项目上。

---
name: "Open World City Driving Game"
colors:
  night_ink: "#141821"
  paper: "#F4EFE4"
  lilac: "#6E5B8A"
  zenith: "#1B2440"
  fog_plum: "#4C4568"
  mint: "#3DDCB5"
  clay: "#C47A6A"
  window_gold: "#F2C56B"
  lamp: "#F6E2A8"
  asphalt: "#2C3140"
  sidewalk: "#6E675C"
  park: "#3E6B52"
  lane: "#E7D7A8"
  brake: "#E07A5F"
typography:
  title_card_name_and_clubhouse_sign: { family: "Fraunces Variable", weights: [600, 700] }
  hud_buttons_help_and_signs: { family: "Outfit Variable", weights: [400, 500, 600] }
  clock_lap_timer_and_speed: { family: "IBM Plex Mono", weights: [500] }
spacing: "Use a 4 px base. Desktop HUD inset 16 px, cluster gap 8 px, title card padding 28 px. Mobile inset 10 px plus safe-area insets, cluster gap 8 px. Buttons are at least 44 px; the stick and GAS are at least 72 px. The center of the frame stays clear of chrome."
radius: "Title card 20 px, HUD chips 14 px, buttons 12 px, gamepad buttons fully round. World forms stay faceted; only wheels, lamp bulbs, heads, and the fountain are round."
---

# Open World City Driving Game — Design System

Apply this design system to an existing project. It describes the look and feel only; for the full site, use prompt.md.

## Colors
- **Night ink** `#141821` — Page background, HUD chips, text on paper, dark pool-car paint
- **Paper** `#F4EFE4` — Title card, toasts, street signs, light car paint, crosswalks
- **Lilac** `#6E5B8A` — Dusk horizon, hemisphere sky at the start of the evening
- **Zenith** `#1B2440` — Sky top, renderer clear color, night fog target
- **Fog plum** `#4C4568` — Dusk fog color
- **Mint** `#3DDCB5` — Pool-car stripe, primary button, active lap gate, player scarf, minimap player
- **Clay** `#C47A6A` — Selected roofs and awnings, one pool car, brake-light neighbor
- **Window gold** `#F2C56B` — Lit windows and the active errand dot
- **Lamp** `#F6E2A8` — Street-lamp bulbs and the driven car's headlights
- **Asphalt** `#2C3140` — Road surfaces
- **Sidewalk** `#6E675C` — Ground plane and curbs
- **Park** `#3E6B52` — Pocket-park grass and a few tree crowns
- **Lane** `#E7D7A8` — Lane dashes, cargo box, bay rectangles
- **Brake** `#E07A5F` — Brake lights and the single wrong-way toast

## Typography
- **Title card name and clubhouse sign** — Fraunces Variable (OFL), weights 600/700. Self-host the font files.
- **HUD, buttons, help, and signs** — Outfit Variable (OFL), weights 400/500/600. Self-host the font files.
- **Clock, lap timer, and speed** — IBM Plex Mono (OFL), weights 500. Self-host the font files.

## Spacing & shape
- Spacing: Use a 4 px base. Desktop HUD inset 16 px, cluster gap 8 px, title card padding 28 px. Mobile inset 10 px plus safe-area insets, cluster gap 8 px. Buttons are at least 44 px; the stick and GAS are at least 72 px. The center of the frame stays clear of chrome.
- Radius: Title card 20 px, HUD chips 14 px, buttons 12 px, gamepad buttons fully round. World forms stay faceted; only wheels, lamp bulbs, heads, and the fountain are round.

## Motion
- Fixed simulation step of 1/60 second, accumulator capped at 0.05 seconds. Render with the latest state. Decorative motion uses the frame delta.
- Title camera drifts by a sine of 0.09 radians over about 20 seconds. Chase camera damps with exponential smoothing. Wheels roll from distance traveled. The driven car leans at most 3 degrees into a turn. No camera shake.
- Dusk is a single 0 to 1 mix over 150 seconds of unpaused play, applied to sky, fog, sun, windows, and lamps. It holds at 1. It does not advance on the title card, board, help, or pause.
- Gates and the objective dot pulse scale from 1 to 1.06 over 1.2 seconds. Toasts fade in 160 ms. Buttons darken on press in 80 ms.
- With prefers-reduced-motion, freeze the title drift, cloud cards, fountain bob, gate pulse, and figure sway. Snap UI in place. Keep walking, driving, traffic, and the slow dusk mix, because those are the game.

## Imagery
Draw the entire district from original Three.js primitives with MeshLambertMaterial, flatShading true, roughness not used, and no texture maps, HDRIs, or downloaded models. The first screen is the 3D district beside a paper title card, never type on a flat field. People are geometric: a sphere head with no face, a box coat, and simple legs. Vary coat colors. They are fictional and do not resemble any real person. No photographs.

## Tone
Warm, local, and playful. Short US English, concrete place names, and the manners of a neighborhood car club. The player is a welcome member borrowing club cars and dropping parcels or flowers at doors.

---
Inspired by One-prompt open-world city driving demo by @XFreeze — https://www.tweaktown.com/news/113703/forget-gta-6-ahem-grok-4-7-made-a-gta-style-game-from-one-prompt-as-musk-boasts-of-ai-developing-photo-realistic-games/index.html
— Prompt by VibeFather · https://vibefather.ai/t/open-world-city-driving-game · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown

改成你自己的

  • 本地汽车俱乐部:将 BRAND 设为你的俱乐部名称,DISTRICT 设为你的街区,并把上门送货的货物换成会员商店之间的零件或咖啡配送。
  • 夜市组织者:将俱乐部重命名为你的市场,将 ERRAND 设为鲜花箱,将 RACE_NAME 设为市场环线,然后重写商店招牌以匹配你的摊位。
  • 独立游戏作品集项目:保留 Amber Row Club 世界,将 TAGLINE 改为你的工作室标语,并用保存的最佳圈速作为你网站上的可重玩演示。
  • 城市旅游局:将 DISTRICT 设为感觉真实市中心,将送货任务重命名为本地配送,并将六道门重新标记为环线上的地标站点。

开放世界城市驾驶游戏:常见问题

《开放世界城市驾驶游戏》里实际能做什么?

《开放世界城市驾驶游戏》让你在一座微型城市街区里度过一个傍晚。你走在人行道上,借用任意一辆薄荷条纹的共享汽车,在两种玩法中选择:一种是上门送货,把烘焙盒从俱乐部送到三家商店;另一种是 Lantern Lap,围绕外围街道的六道门计时赛,标准时间 52 秒。小地图、傍晚时钟和保存的最佳成绩让循环持续下去。

怎么用 AI 做一个开放世界城市驾驶游戏?

复制本页的完整提示词(Pro),或者运行 npx vibefather add open-world-city-driving-game,把 [BRAND]、[ERRAND]、[TAGLINE]、[DISTRICT] 换成你自己的内容,再粘贴到 Claude Code、Codex、Cursor 等 AI 编程工具里。在线演示就是用这份提示词原样做出来的。