diff --git a/client/src/game/scripts/objects/DebugInfo.ts b/client/src/game/scripts/objects/DebugInfo.ts index e7032cc..178df8d 100644 --- a/client/src/game/scripts/objects/DebugInfo.ts +++ b/client/src/game/scripts/objects/DebugInfo.ts @@ -53,6 +53,7 @@ export class DebugInfo extends Phaser.GameObjects.Text { else this.showHitboxes(); } + // TODO use circular buffer getSpriteInfo(sprite: any) { if (!sprite) return ""; const textLines = [ diff --git a/client/src/game/scripts/objects/Sprite/Spaceship/Spaceship.ts b/client/src/game/scripts/objects/Sprite/Spaceship/Spaceship.ts index e307d08..33bed83 100644 --- a/client/src/game/scripts/objects/Sprite/Spaceship/Spaceship.ts +++ b/client/src/game/scripts/objects/Sprite/Spaceship/Spaceship.ts @@ -508,8 +508,7 @@ export class Spaceship extends Sprite { const { rotation, velocityPercentage } = this.#thrust; const speed = this.status.maxSpeed * velocityPercentage; - // const gravity = { rotation: 0, magnitude: 40, accelerationMultiplier: 1 }; - + // TODO tweak magnitude and acceleration multipliers const gravity = { ...this.scene.getGravity(this), accelerationMultiplier: 10 }; this.move([{ rotation, magnitude: speed, accelerationMultiplier: 7 }, gravity]); diff --git a/client/src/game/scripts/scenes/core/BaseScene.ts b/client/src/game/scripts/scenes/core/BaseScene.ts index 7a369e8..795e5c3 100644 --- a/client/src/game/scripts/scenes/core/BaseScene.ts +++ b/client/src/game/scripts/scenes/core/BaseScene.ts @@ -162,6 +162,7 @@ export class BaseScene extends Phaser.Scene { return [originPoint.x, originPoint.y]; } + // TODO make magnitude nonlinear getGravity(entity: Phaser.GameObjects.Sprite, magnitudeMultiplier = 0.1) { const [closestX, closestY] = this.getClosestPointInsideWorldBorder({ x: entity.x,