{"id":16607255,"url":"https://github.com/dns2utf8/shotgun","last_synced_at":"2025-08-22T22:45:35.791Z","repository":{"id":68386899,"uuid":"54029340","full_name":"dns2utf8/shotgun","owner":"dns2utf8","description":null,"archived":false,"fork":false,"pushed_at":"2021-01-15T16:18:41.000Z","size":33,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-17T11:45:45.057Z","etag":null,"topics":["game","network"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dns2utf8.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["dns2utf8"],"patreon":"dns2utf8"}},"created_at":"2016-03-16T12:19:45.000Z","updated_at":"2021-01-15T16:18:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"44db5111-946c-45b8-ace8-757ed3ce250c","html_url":"https://github.com/dns2utf8/shotgun","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dns2utf8%2Fshotgun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dns2utf8%2Fshotgun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dns2utf8%2Fshotgun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dns2utf8%2Fshotgun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dns2utf8","download_url":"https://codeload.github.com/dns2utf8/shotgun/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242768076,"owners_count":20182098,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["game","network"],"created_at":"2024-10-12T01:12:10.094Z","updated_at":"2025-03-09T23:54:40.051Z","avatar_url":"https://github.com/dns2utf8.png","language":"Rust","funding_links":["https://github.com/sponsors/dns2utf8","https://patreon.com/dns2utf8"],"categories":[],"sub_categories":[],"readme":"# Shotgun\n\nConnect your bot and play a game.\n\nCurrently this repo is under heavy development.\nIt will be transfered to Github once it reaches a stable phase.\n\n# Protocol\n\nThe protocol is message oriented.\nEach message is terminated with a `\\n` newline.\n\n## Handshake\n\nThe handshake must be initialized from the client by sending a correct `ClientHello`.\nAfter the server responds with the `ServerHello` the conversation enters the multiplexed phase.\n\n## Multiplexing\n\nAfter the handshake each line is prefixed with a global game id.\n\nOffcourse there is no rule without exception:\nThe `RequestNewGame` message does not need to be multiplexed.\n\n## Grammar\n\n```\nClientHello        := 'Nickname: \u003e' \"Nickname\" '\u003c\u003e' \"Programming Language\"\nServerHello        := 'Shotgun Arena Server v' ProtocolVersion ' :: max round length[ms]: ' u64\nProtocolVersion    := '0'\nRequestNewGame     := 'RequestNewGame'\nMultiplexedMessage := u64 ':' Action\nAction             := 'NewGame { player_name_a: ' String ', player_name_b: ' String ' }' | 'WinGame' | 'LoseGame' | RoundAction | 'RoundResult { a: ' RoundAction ', b: ' RoundAction ' }' | 'ErrorEnd'\nRoundAction        := 'Timeout' | 'Duck' | 'Load' | 'Shoot' | 'Klick'\n```\n\n## Example communication\n\nClient messages are prefixed with `\u003c `, server messages with `\u003e `.\nAll messages are terminated with `\\n`:\n\n```\n\u003c ClientHello { nickname: \"me\" }\n\u003e ServerHello\n\u003c RequestNewGame\n\u003e '13:NewGame { player_name_a: \"me\", player_name_b: \"some bot\" }'\n\u003c '13:Load'\n\u003e '13:RoundResult { a: Load, b: Load }'\n\u003c '13:Shoot'\n\u003e '13:RoundResult { a: Shoot, b: Load }'\n\u003e '13:WinGame'\n```\n\n# TODO\n\n  - [X] Define protocol\n  - [X] Handshake\n  - [X] Correct bot\n  - [ ] Server match-makeing\n  - [ ] Server releay communication / Arena mode\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdns2utf8%2Fshotgun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdns2utf8%2Fshotgun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdns2utf8%2Fshotgun/lists"}