summaryrefslogtreecommitdiff
path: root/src/engine/config/constants.ts
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-01 21:29:40 -0700
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-01 21:29:40 -0700
commitc3242b171cdbb36a26fda04c7148b9b40a5f5c33 (patch)
tree5060cb6d34e01f36687c0ce79e5ae0b1b8767e63 /src/engine/config/constants.ts
parentd08e0105cbc59c6cc804f04aaf1e4e625a13960c (diff)
downloadthe-abstraction-engine-c3242b171cdbb36a26fda04c7148b9b40a5f5c33.tar.gz
the-abstraction-engine-c3242b171cdbb36a26fda04c7148b9b40a5f5c33.zip
player movement
Diffstat (limited to 'src/engine/config/constants.ts')
-rw-r--r--src/engine/config/constants.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/engine/config/constants.ts b/src/engine/config/constants.ts
index c2cbc76..0b07108 100644
--- a/src/engine/config/constants.ts
+++ b/src/engine/config/constants.ts
@@ -41,10 +41,17 @@ export namespace KeyConstants {
}, new Map());
}
+export namespace PhysicsConstants {
+ export const GRID_MOVEMENT_VELOCITY = 2;
+}
+
export namespace Miscellaneous {
export const WIDTH = 800;
export const HEIGHT = 800;
- export const DEFAULT_GRID_WIDTH = 30;
- export const DEFAULT_GRID_HEIGHT = 30;
+ export const GRID_ROWS = 15;
+ export const GRID_COLUMNS = 15;
+
+ export const GRID_CELL_WIDTH = Math.floor(WIDTH / GRID_COLUMNS);
+ export const GRID_CELL_HEIGHT = Math.floor(HEIGHT / GRID_ROWS);
}