Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miapolis/stratepig-server
Server code for Stratepig, a multiplayer game based on Stratego and artwork made by Rovio Entertainment.
https://github.com/miapolis/stratepig-server
board-game elixir rust stratego tcp-server
Last synced: 24 days ago
JSON representation
Server code for Stratepig, a multiplayer game based on Stratego and artwork made by Rovio Entertainment.
- Host: GitHub
- URL: https://github.com/miapolis/stratepig-server
- Owner: miapolis
- License: other
- Created: 2021-05-19T11:09:07.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-27T22:44:38.000Z (almost 3 years ago)
- Last Synced: 2024-10-02T08:53:50.167Z (about 1 month ago)
- Topics: board-game, elixir, rust, stratego, tcp-server
- Language: Rust
- Homepage:
- Size: 197 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Stratepig Server
This is the server code for my game Stratepig,
which I'm making public mainly for two reasons:
- I'm rather new to Rust and Tokio so I'd like to have this be open source so others can give feedback more easily
- I've been working on Stratepig since May of 2020, and I'd like to have something to show since the client code is garbageI am aware I do a lot of bad things here, such as
waste time converting client IDs to strings when sending them to clients,
and this is because there was an original server implementation written in C#
that used UUIDs and I'm too lazy to change things on the client as of right now.Honestly I'm sort of surprised that I got everything working with this
server + room architecture that isn't really safe in Rust,
and I'd love to hear feedback and criticism on my implementation as much as possible.Overall, this was a learning experience more than anything else,
and I will probably not be writing TCP servers in low level languages anytime soon.
However, I do now have a blazingly fast server as far as I am aware.## Technical Details
| Crate | Description |
:--------------------------------------| :------------
| [stratepig_cli](stratepig_cli) | Parses arguments at the start of the application and contains the `CliConfig` struct
| [stratepig_core](stratepig_core) | Manages packet serialization and deserialization
| [stratepig_game](stratepig_game) | Contains all game-related objects, constants, and functions for paths
| [stratepig_macros](stratepig_macros) | Includes the `#[server_packet(id)` and `#[client_packet(id)]` procedular macros for stratepig_core
| [stratepig_server](stratepig_server) | The main crate that ties everything together. Includes most server and game logic#### stratepig_updater
Elixir update server for client downloads and possibly other things in the future.