diff --git a/apps/client/src/main.ts b/apps/client/src/main.ts index de0cf01..bb8cce3 100644 --- a/apps/client/src/main.ts +++ b/apps/client/src/main.ts @@ -1,6 +1,7 @@ import { Application } from 'pixi.js'; import { Joystick } from './input/Joystick'; import { Player } from './entities/Player'; +import { GAME_CONFIG } from '@repo/shared/src/config/gameConfig'; // アプリケーション初期化 const app = new Application(); @@ -27,7 +28,7 @@ // 4. ゲームループ (毎フレーム実行) app.ticker.add((ticker) => { // 秒単位の経過時間 (Delta Time) - const dt = ticker.deltaTime / 60; + const dt = ticker.deltaTime / GAME_CONFIG.TARGET_FPS; // ジョイスティックの入力があれば移動 if (joystick.input.x !== 0 || joystick.input.y !== 0) { diff --git a/packages/shared/src/config/gameConfig.ts b/packages/shared/src/config/gameConfig.ts index 987b7be..4139e4c 100644 --- a/packages/shared/src/config/gameConfig.ts +++ b/packages/shared/src/config/gameConfig.ts @@ -10,4 +10,7 @@ // プレイヤー設定 PLAYER_RADIUS: 20, // キャラの大きさ PLAYER_SPEED: 300, // 移動速度 (ピクセル/秒) + + // システム設定 + TARGET_FPS: 60, // 基準となるFPS } as const; \ No newline at end of file