ai21.net
言語

Ignition(1997)にインスパイアされたレーシングゲームを作る:斜め見下ろしの…

Ignition(1997)にインスパイアされたレーシングゲームを作る:斜め見下ろしの… — 1

プロンプト

Build a racing game inspired by Ignition (1997): angled top-down camera, arcade-leaning
physics, vehicles with very distinct personalities. This must be an original game,
not a copy. Use an original name, an original track, and zero original assets.

## Stack
- Vite + TypeScript (strict), Three.js for rendering, no UI framework
  (HUD in plain DOM/CSS).
- Low-poly graphics generated in code (BoxGeometry, CylinderGeometry, etc.),
  no external models or textures. Solid colors and simple materials.
- Custom simplified 2.5D physics (movement on the XZ plane, height from terrain).
  No physics engine.

## Architecture
- src/game/ (game loop with fixed timestep), src/vehicles/, src/track/, src/ai/,
  src/render/, src/ui/
- Vehicles are data-driven: mass, power, top speed, grip, steering, collision
  resistance, and boost parameters (strength, duration, recharge time).
  One Vehicle class, different configurations.
- Any vehicle can be controlled by either the player or the AI
  (shared control interface: throttle, brake, steer, boost).
- Track as data: centerline spline + width + list of zones
  (ice, shortcut, obstacle). Generate the road mesh and AI waypoints from it.

## Vehicles (original names, no brands)
Four vehicles. The player picks one on the selection screen; the remaining 3
are driven by the AI.
- 90s-style police sedan (black and white, light bar): heavy, stable,
  pushes hard in collisions.
- Muscle car convertible: fastest on straights, oversteers in corners.
- Red monster truck: slow, but ignores bumps and rams everything else.
- Postal delivery van: slow, high center of gravity, sways in corners.
The handling differences must be clearly noticeable. All four must be playable
and competitive. Slower vehicles compensate with e.g. collision resistance,
terrain handling, or a stronger or more frequent boost.

## Boost
- Every vehicle has a boost: a short, pronounced acceleration beyond its
  normal top speed.
- Boost charges automatically from 0 to 100%. It can only be used at 100%.
  After use, the meter drops to 0 and starts charging again.
- Strength, duration and recharge time are unique to each vehicle
  (e.g. muscle car: short and very strong; van: weaker but recharges fast;
  monster truck: long but slow to recharge).
- Visual effect while boosting: exhaust flame or trail, slight camera
  pull-back.
- The AI also uses boost, sensibly: on straights, not before sharp corners
  or on ice.

## Track
A mountain town with a Canadian feel, winter turning into spring thaw:
- closed loop, roughly 60–90 seconds per lap
- a waterfall visible from the track and a wooden bridge over a river
- a railroad crossing with a train passing periodically
  (collision = strong knockback, not game over)
- ice patches with reduced grip
- one shortcut (tight, risky); decorations: spruce trees, wooden houses, snow
- barriers or natural obstacles so vehicles can't get stuck off the track.
  Failsafe: if a vehicle (including bots) is stuck for more than ~4 s,
  automatically return it to the track at the last checkpoint.

## Gameplay
- 3 laps, standing grid start, 3-2-1 countdown
- AI follows waypoints with a driving style that depends on the vehicle,
  light rubber-banding, avoids obstacles, no teleporting (except the
  failsafe track return described above)
- Sliding comes purely from physics (grip, speed, ice), no handbrake
- Camera: top-down at ~50°, follows the player with a slight look-ahead
  in the direction of travel
- Controls: arrows/WASD (throttle, brake/reverse, steering), space = boost
- Screens: start → vehicle selection (model preview + stat bars, including
  boost) → race → results → restart (with option to change vehicle)

## HUD
- Position, lap, lap time, best lap, minimap.
- Boost meter styled as a car battery: rectangular casing with two terminals
  (+/−) on top, fill level rises as it charges. Color shifts from red through
  yellow to green. At 100% the battery clearly signals readiness (pulsing or
  glow, "BOOST" label or lightning bolt icon). While boosting, the meter
  drains quickly.

## Out of scope for v1
Sound, options menu, multiple tracks, multiplayer, save state.

## Workflow
1. First propose a plan and file structure, then implement in stages:
   (a) game loop + one vehicle on a flat plane, including boost,
   (b) track, (c) remaining vehicles and AI, (d) obstacles and train,
   (e) vehicle selection, HUD with battery meter, and screens.
2. After each stage run `npm run build` and fix type errors.
3. Add unit tests (Vitest) for vehicle physics, boost logic (charging,
   lockout below 100%, reset after use), and lap/position logic.
4. Finally: a README describing the controls and how to add a new track
   or vehicle.

## Acceptance criteria
`npm install && npm run dev` launches the game. You can pick any of the 4
vehicles and complete 3 laps against 3 bots. Each vehicle handles differently
and has a noticeably different boost. Boost only works with a full battery,
and bots use it too. The train and ice work. Results show the correct order.
Stable 60 FPS on an average laptop.

日本語訳

Ignition(1997)にインスパイアされたレーシングゲームを作る:斜め見下ろしのカメラ、
アーケード寄りの物理挙動、個性がはっきり異なる車両。これはオリジナルのゲームであり、
コピーではない。オリジナルの名前、オリジナルのコースを使い、オリジナル作品のアセットは一切使わない。

## スタック
- Vite + TypeScript(strict)、レンダリングには Three.js、UI フレームワークは使わない
  (HUD は素の DOM/CSS)。
- コード内で生成するローポリゴンのグラフィック(BoxGeometry、CylinderGeometry など)、
  外部モデルやテクスチャは使わない。単色とシンプルなマテリアル。
- 独自の簡略化した 2.5D 物理(XZ 平面上の移動、高さは地形から)。
  物理エンジンは使わない。

## アーキテクチャ
- src/game/(固定タイムステップのゲームループ)、src/vehicles/、src/track/、src/ai/、
  src/render/、src/ui/
- 車両はデータ駆動:質量、パワー、最高速度、グリップ、ステアリング、衝突への強さ、
  ブーストのパラメータ(強さ、持続時間、再チャージ時間)。
  Vehicle クラスは 1 つ、設定を変えるだけ。
- どの車両もプレイヤーと AI のどちらでも操作できる
  (共通の操作用インターフェース:スロットル、ブレーキ、ステアリング、ブースト)。
- コースもデータとして持つ:中心線のスプライン + 幅 + ゾーンのリスト
  (氷、ショートカット、障害物)。そこから道路メッシュと AI のウェイポイントを生成する。

## 車両(オリジナル名、ブランドなし)
4 台の車両。プレイヤーは選択画面で 1 台を選び、残りの 3 台
は AI が運転する。
- 90 年代風のパトカーセダン(白黒、ルーフのライトバー):重くて安定し、
  衝突では強く押し返す。
- マッスルカーのコンバーチブル:直線は最速だが、コーナーでオーバーステアする。
- 赤いモンスタートラック:遅いが、段差をものともせず他のすべてを突き飛ばす。
- 郵便配達バン:遅く、重心が高く、コーナーでふらつく。
操縦性の違いははっきり分かること。4 台すべてがプレイ可能で
競争力があること。遅い車両は、たとえば衝突への強さ、
地形への対応力、より強い/より頻繁なブーストなどで補う。

## ブースト
- すべての車両にブーストがある:通常の最高速度を超える、
  短くはっきりした加速。
- ブーストは 0 から 100% まで自動でチャージされる。使えるのは 100% のときだけ。
  使用後はメーターが 0 に落ち、再びチャージが始まる。
- 強さ、持続時間、再チャージ時間は車両ごとに固有
  (例:マッスルカーは短く非常に強い、バンは弱いがチャージが速い、
  モンスタートラックは長いがチャージが遅い)。
- ブースト中の視覚効果:排気の炎か軌跡、カメラがわずかに
  引く。
- AI もブーストを賢く使う:直線で使い、急カーブの手前や
  氷の上では使わない。

## コース
カナダの雰囲気を持つ山あいの町、冬から春の雪解けへ:
- 閉じたループ、1 周およそ 60〜90 秒
- コースから見える滝と、川に架かる木の橋
- 定期的に列車が通過する線路の踏切
  (衝突すると大きく弾き飛ばされるが、ゲームオーバーではない)
- グリップが下がる氷のパッチ
- ショートカットが 1 つ(狭くて危険)、装飾:トウヒの木、木造の家、雪
- 車両がコースを外れて立ち往生しないよう、バリアか自然の障害物を置く。
  フェイルセーフ:車両(ボットを含む)が約 4 秒以上動けない場合、
  最後のチェックポイントで自動的にコースに戻す。

## ゲームプレイ
- 3 周、スタンディンググリッドスタート、3-2-1 のカウントダウン
- AI はウェイポイントに従い、運転スタイルは車両によって変わる、
  軽いラバーバンディング、障害物を避ける、テレポートしない(上記の
  フェイルセーフのコース復帰を除く)
- スライドは物理(グリップ、速度、氷)だけから生じ、ハンドブレーキはない
- カメラ:約 50°の見下ろし、進行方向に少し先読みして
  プレイヤーを追従
- 操作:矢印キー/WASD(スロットル、ブレーキ/バック、ステアリング)、スペース = ブースト
- 画面:スタート → 車両選択(モデルのプレビュー + ブーストを含むステータスバー)
  → レース → リザルト → リスタート(車両を変更するオプション付き)

## HUD
- 順位、周回、ラップタイム、ベストラップ、ミニマップ。
- ブーストメーターはカーバッテリー風:長方形のケースの上部に 2 つの端子
  (+/−)、チャージに応じて充填レベルが上がる。色は赤から
  黄色を経て緑へ変わる。100% になるとバッテリーは使用可能をはっきり示す(脈動か
  発光、「BOOST」のラベルか稲妻アイコン)。ブースト中はメーターが
  急速に減る。

## v1 のスコープ外
サウンド、オプションメニュー、複数コース、マルチプレイヤー、セーブ状態。

## ワークフロー
1. まず計画とファイル構成を提案し、その後段階的に実装する:
   (a) ゲームループ + 平坦な平面上の車両 1 台(ブーストを含む)、
   (b) コース、(c) 残りの車両と AI、(d) 障害物と列車、
   (e) 車両選択、バッテリーメーター付き HUD、各画面。
2. 各段階の後に `npm run build` を実行し、型エラーを修正する。
3. 車両の物理、ブーストのロジック(チャージ、100% 未満での
   ロックアウト、使用後のリセット)、周回と順位のロジックの単体テスト(Vitest)を追加する。
4. 最後に:操作方法と、新しいコースや車両の追加方法を
   説明する README。

## 受け入れ基準
`npm install && npm run dev` でゲームが起動する。4 台のうちどの車両でも選べて、
3 体のボット相手に 3 周を完走できる。各車両は操縦性が異なり、
ブーストも明らかに違う。ブーストはバッテリーが満タンのときだけ機能し、
ボットもそれを使う。列車と氷が機能する。リザルトは正しい順位を示す。
平均的なノート PC で 60 FPS が安定して出る。

出典

原作者
_nieGRAMotny_
公開日
2026-09-24(由推文 ID 反解)
原典
元の投稿を見る ↗
収録元
yihui-dev/awesome-opus5-5-videos · niegramotny-197521 · MIT