diff options
author | Julien Dessaux | 2022-09-21 23:19:45 +0200 |
---|---|---|
committer | Julien Dessaux | 2022-09-21 23:19:45 +0200 |
commit | 8f76ba782669bc986a5e450e5a50ac84232c1323 (patch) | |
tree | 6c3b0b55437a453dabfe4f1ea5ba1d6a702dba10 /src/utils.zig | |
parent | Fixed game reset (diff) | |
download | grenade-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.zig | 12 |
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 }; |