aboutsummaryrefslogtreecommitdiff
path: root/protocol.md
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-09-18 14:05:34 +0200
committermetamuffin <metamuffin@disroot.org>2024-09-18 14:05:34 +0200
commite5fdbaadbf01f14290e70c49482e1dce3c9816d8 (patch)
treec2582dd682258867bd5a4e1720dc08beef78f5db /protocol.md
parent33bc7824323149407a2beaeaa0a1e601bccba39a (diff)
downloadhurrycurry-e5fdbaadbf01f14290e70c49482e1dce3c9816d8.tar
hurrycurry-e5fdbaadbf01f14290e70c49482e1dce3c9816d8.tar.bz2
hurrycurry-e5fdbaadbf01f14290e70c49482e1dce3c9816d8.tar.zst
update documentation
Diffstat (limited to 'protocol.md')
-rw-r--r--protocol.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/protocol.md b/protocol.md
index b5201abd..35671e75 100644
--- a/protocol.md
+++ b/protocol.md
@@ -13,7 +13,6 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-->
# Hurry Curry! protocol
@@ -32,9 +31,8 @@ The protocol schema is defined in [`protocol.ts`](./test-client/protocol.ts)
- `add_player` for every player in the game
- `set_player_item` for every item held by a player
5. Run the game loop
- - Send your position every 40ms.
- - Send `interact` when the player interacts with a tile. Make sure to set the
- `edge` parameter consistently.
+ - Send your position every 20ms - 40ms.
+ - Send `interact` when the player interacts with a tile.
- Receive packets
6. The Game ends. The server will remove all players and tiles. Then continue at
step 4.
@@ -62,9 +60,11 @@ be used if either minor or major version differs.
## Movement
-Movement is handled mostly client-side. Therefore it is implemented three times:
+Movement is handled server-side but should be predicted by client for better
+latency. For this reason it implemented three times:
-- In the test-client: [movement.ts](./test-client/movement.ts)
-- For customers in the server: [movement.rs](./server/src/customer/movement.rs)
-- In the client:
+- In GDscript (for the Godot client):
[controllable_player.gd](./client/player/controllable_player.gd)
+- In Rust (for server, pixelcurry and customers):
+ [movement.rs](./server/protocol/src/movement.rs)
+- In TypeScript (for test-client): [movement.ts](./test-client/movement.ts)