aboutsummaryrefslogtreecommitdiff
path: root/src/utils.zig
diff options
context:
space:
mode:
authorJulien Dessaux2022-09-21 23:19:45 +0200
committerJulien Dessaux2022-09-21 23:19:45 +0200
commit8f76ba782669bc986a5e450e5a50ac84232c1323 (patch)
tree6c3b0b55437a453dabfe4f1ea5ba1d6a702dba10 /src/utils.zig
parentFixed game reset (diff)
downloadgrenade-brothers-8f76ba782669bc986a5e450e5a50ac84232c1323.tar.gz
grenade-brothers-8f76ba782669bc986a5e450e5a50ac84232c1323.tar.bz2
grenade-brothers-8f76ba782669bc986a5e450e5a50ac84232c1323.zip
Began rewriting the game as a wasm4 cartridge
Diffstat (limited to 'src/utils.zig')
-rw-r--r--src/utils.zig12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/utils.zig b/src/utils.zig
new file mode 100644
index 0000000..5fa40f9
--- /dev/null
+++ b/src/utils.zig
@@ -0,0 +1,12 @@
+//----- Physics ---------------------------------------------------------------
+pub const gravity: f64 = 9.807; // m/s²
+pub const scale: f64 = 1.0 / 30; // 30 pixels == 1m
+
+//----- Playground ------------------------------------------------------------
+pub const side = enum(u1) {
+ left,
+ right,
+};
+pub const startingX = [2]u8{ 23, 160 - 23 - 16 };
+pub const leftLimit = [2]u8{ 0, 81 };
+pub const rightLimit = [2]u8{ 77, 159 };