像素风篮球游戏
- 播放
- 1.3万
- 点赞
- 206
- 评论
- 25
- 收藏
- 134
一个单页 HTML 像素风3D篮球比赛模拟,由 Sonnet 5.5 用 three.js 构建。比赛自动进行,包含攻防AI、球体物理、犯规、换人、回放和合成音效,耗时1小时35分钟,花费48.31美元。
完整提示词4,869 字符
Build "Lamplight Classic": a single self-contained HTML page (no build step needed to run; one <title>, inline CSS/JS, only three.js r128 from cdnjs and Google Fonts allowed) that simulates a 5-on-5 basketball Grand Final as a pixel-art 3D diorama. The match plays itself; the viewer coaches and watches. SETTING Fictional "Brightwater Arena" on a floating island: indoor hall with stands (~1200 seats, ~1100 animated fans, two mascots), scoreboard video screen, scorer's table, benches, tunnel, plus an outside plaza (ticket booth, coffee cart, bus, street court, lamps). Four fictional teams, 12 named players each, unique first/last names per league. Women's league: Cedar Falls Magpies vs Redstone Stags. Men's league: Ironbridge Wolves vs Copperfield Falcons. RENDERING - Orthographic camera, 31 degree elevation, 45 degree azimuth, quarter-turn rotation, zoom, drag to orbit. - Render to a low-res target with NearestFilter; one art pixel = 1-6 CSS px (slider, default 2). - Depth-based outlines, fixed 90-colour OKLab palette quantisation, Bayer dithering. - Custom lit material with 12 dynamic light slots (corner columns, flash/replay, hall glow, photographer flashes). - People are instanced box-rigs (about 30 parts each, cap 64) with a pose system: dribble, shoot, pass, jump, block, rebound, celebrate, sit. - "Doll's-house" cutaway: the near E/S walls lift so the court is never hidden. - Three floors (Hardwood, Blue, Orange; each changes bounce and squeak), three lightings (Day, Evening, Show). - Cameras: TV follow, Whole hall, Close-up, free. Show mode must not blow out. WORLD AND PHYSICS Metres, +x east, +z south. Court 28x15 (long axis z), rims at z=+/-12.425, rim height 3.05, three-point arc 6.75. Ball physics with real rim, backboard and net interaction, deterministic given a seed. Fixed 1/60 s step with accumulator, speed 0.5x-4x plus turbo. Two seeded RNGs: scenery and gameplay. GAME AI (separate modules, clean ownership by possession phase) - BK (body kinematics): timed actions, reach limits; dunks only when fingertips reach the rim (about 1 of 24 women, 8 of 24 men). - PLAY (offence): ball handler, set plays and scripts, jump ball, inbounds, free throws, fast breaks. - DEF (defence): man and zone, press, traps, rebounding, steals, blocks, contact, charges and fouls. - Shared steering layer, A* navigation grid, event bus for handshakes (shotPressure, gain, foulCommit). - BALL owns the ball (give, drive, hit, release, basket detection). - Targets per team per 40 game-min: about 75-85 points, FG 42-48%, 3PA share 30-40%, 6-9 steals, 3-5 blocks, 17-22 fouls, 13 turnovers, 25-32% offensive rebounds. RULES AND FLOW (coroutine-based match scheduler) FIBA-style: 24 s shot clock, team fouls and bonus, free throws, throw-ins, possession arrow, 3-second rule, 8-second rule, substitutions (automatic and requested), timeouts, overtime. Game clock runs 2x. Formats: Quick 4x2:00, Standard 4x5:00, Full 4x10:00, Best of 3 (4x3:00). Coach's challenge with video review, instant replay of baskets from a ring buffer, ceremonies (walk-on, anthem, warm-up, handshakes, trophy), commentary lines, full box score and team stats that must reconcile (score = period scores = team stats = player points). UI Panel beside the stage (stacked under it on phones, scoreboard sticky on top). Sections: Match (league, format, teams, new match, skip ceremony), Hall (floor, lights, light columns), Coach (offence: push the pace, run sets, pick and roll; defence; Feed him; timeout; substitutions), View (camera, pixel size), live stats, play-by-play log. Keyboard shortcuts for rotate, camera, pause, new match, skip, timeout. Scoreboard bug: period, game clock, 24 s clock, per-team fouls, bonus, timeouts, possession arrow. Visual identity: "programme of a night game", cream paper and charcoal ink, signal orange and lamp yellow, Big Shoulders Display + Hanken Grotesk, light and dark themes. English UI. AUDIO No audio files: synthesise everything in WebAudio (crowd murmur and roars, whistle, buzzer, rim, net, sneaker squeaks, ball bounce, anthem). Start from a button, with a mute toggle. QUALITY BAR - The first match after page load must play exactly like "New match". - Headless whole-game tests across all formats and both leagues: no console errors, no negative or NaN clocks, no rule-violation events, reconciled stats. - Screenshot QA at four camera quarter-turns, three lightings, three floors and a 390x844 phone viewport; no horizontal scroll. - Keep sim+view under about 3 ms per 1/60 s step on a software renderer. DELIVERY Write a short module contract first (public API per module), then build modules in parallel if you can: court and hoops, hall and stands, people and poses, ball physics, BK, PLAY, DEF, match flow, crowd and FX, audio, UI. Publish the page as an artifact and also give me a standalone .html file.
出处:作者在原帖下的回复。提示词保留原文语言,未做改写。
作者提到的工具
Three.jsWebAudio
原帖:https://x.com/vib3coded/status/2118465677455478784
全部作品数据开源在 GitHub · awesome-opus-5.5-video。
模型归属以作者自述为准,本站未独立复现。播放量为 2026-11-08 的快照。作品版权归原作者,修改署名或下架请在 X 私信 @GoSailGlobal。
