大炮物理游戏

概要

基于 Matter.js 的物理游戏,调整炮角和力度,在30秒内击中移动目标。

提示

开发一款游戏,玩家使用大炮发射球体攻击移动目标。球体的轨迹和碰撞由 Matter.js 模拟。玩家可通过滑块调节大炮角度和发射力度,同时实时图表显示球体高度与距离。游戏从左下角的大炮和顶部随机移动目标开始。目标是在30秒内尽可能击中更多目标,根据准确度获得积分。界面包括计分板和重置按钮,为物理爱好者提供既有趣又具教育意义的体验。

原始提示

Create a game where players use a cannon to launch a ball at moving targets, powered by Matter.js for realistic physics.

Players can adjust the cannon’s angle and launch power using sliders, and a live graph shows the ball’s height vs. distance as it flies.

The goal is to hit as many targets as possible within a time limit, with points awarded based on accuracy.

Players start with a cannon at the bottom left of the screen and targets floating across the top.
Matter.js handles the ball’s trajectory and collisions, while the graph updates in real time as the ball moves.
Add a reset button to try again and a scoreboard to track hits, making it fun and educational for physics-loving students.

Q: Do you have a specific game duration or time limit in mind?
A: 30 seconds

Q: How would you like to arrange the user interface elements, such as the sliders, live graph, scoreboard, and reset button?
A: you decide

Q: Do you have any particular requirements for the movement patterns of the targets or should they move randomly?
A: randomly

生成成本概要

模型名称: o3-mini-medium

响应时间: 31.75 sec.

结果令牌: 6,009

成本: $0.02695880