From f462ed68d66f66e7d70602999a3ca3cc34eb4975 Mon Sep 17 00:00:00 2001
From: S4muelJef <235882257+S4muelJef@users.noreply.github.com>
Date: Tue, 21 Oct 2025 15:02:25 +0300
Subject: [PATCH 1/2] Add `H` and `L` to move bar
---
README.md | 4 +++-
src/game.jai | 8 +++++---
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 0c7edf0..8761e84 100644
--- a/README.md
+++ b/README.md
@@ -32,9 +32,11 @@ You can also check an already deployed WebAssembly version here: [https://tsodin
|keys|description|
|---|---|
-|A/D or ←/→|move bar left/right|
+|A/D or ←/→ H/L|move bar left/right|
|ESC|toggle pause|
|SPACE|release the "ball"|
+|W|score right-to-left|
+|P|switch translation|
### Debug Build
diff --git a/src/game.jai b/src/game.jai
index f27ae50..add7e62 100644
--- a/src/game.jai
+++ b/src/game.jai
@@ -29,9 +29,10 @@ update :: (dt: float) {
key_press :: (key: u32) {
if key == {
case #char "Q"; #if DEBUG if state == .PLAY for *targets target_hit(it);
- case #char "L"; rtl = !rtl;
+ case #char "W"; rtl = !rtl;
case #char "P"; lang = cast(I18N_Lang) ((lang + 1) % I18N_LANG_COUNT);
case 130; #through;
+ case #char "H"; #through;
case #char "A"; {
left = true;
if state == .START {
@@ -40,6 +41,7 @@ key_press :: (key: u32) {
}
}
case 131; #through;
+ case #char "L"; #through;
case #char "D"; {
right = true;
if state == .START {
@@ -59,8 +61,8 @@ key_press :: (key: u32) {
key_release :: (key: u32) {
if key == {
- case 130; #through; case #char "A"; left = false;
- case 131; #through; case #char "D"; right = false;
+ case 130; #through; case #char "A"; #through; case #char "H"; left = false;
+ case 131; #through; case #char "D"; #through; case #char "L"; right = false;
}
}
From dc54db674cbf6d71b13ad280eb2a4d6a9dfd8718 Mon Sep 17 00:00:00 2001
From: S4muelJef <235882257+S4muelJef@users.noreply.github.com>
Date: Tue, 21 Oct 2025 15:41:12 +0300
Subject: [PATCH 2/2] Add `A`/`F` to move bar
---
README.md | 3 ++-
src/game.jai | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 8761e84..7a0e459 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,8 @@ You can also check an already deployed WebAssembly version here: [https://tsodin
|keys|description|
|---|---|
-|A/D or ←/→ H/L|move bar left/right|
+|A/D or ←/→|move bar left/right|
+|A/F or H/L|move bar left/right|
|ESC|toggle pause|
|SPACE|release the "ball"|
|W|score right-to-left|
diff --git a/src/game.jai b/src/game.jai
index add7e62..65654e5 100644
--- a/src/game.jai
+++ b/src/game.jai
@@ -41,6 +41,7 @@ key_press :: (key: u32) {
}
}
case 131; #through;
+ case #char "F"; #through;
case #char "L"; #through;
case #char "D"; {
right = true;
@@ -62,7 +63,7 @@ key_press :: (key: u32) {
key_release :: (key: u32) {
if key == {
case 130; #through; case #char "A"; #through; case #char "H"; left = false;
- case 131; #through; case #char "D"; #through; case #char "L"; right = false;
+ case 131; #through; case #char "D"; #through; case #char "L"; #through; case #char "F"; right = false;
}
}