{"id":38617740,"url":"https://github.com/teeworlds-go/protocol","last_synced_at":"2026-01-17T08:51:00.753Z","repository":{"id":242166385,"uuid":"808842501","full_name":"teeworlds-go/protocol","owner":"teeworlds-go","description":"Teeworlds 0.7 network protocol library","archived":false,"fork":false,"pushed_at":"2024-09-19T02:53:25.000Z","size":343,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-19T05:54:45.780Z","etag":null,"topics":["ddnet","ddnet-client","teeworlds","teeworlds-client","teeworlds-protocol"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teeworlds-go.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2024-06-01T00:27:56.000Z","updated_at":"2024-09-19T02:53:28.000Z","dependencies_parsed_at":"2024-06-22T15:18:05.810Z","dependency_job_id":"69a47166-86fd-4128-a703-f9c085d17b70","html_url":"https://github.com/teeworlds-go/protocol","commit_stats":null,"previous_names":["chillerdragon/teeworlds_client","teeworlds-go/teeworlds","teeworlds-go/protocol"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/teeworlds-go/protocol","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teeworlds-go%2Fprotocol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teeworlds-go%2Fprotocol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teeworlds-go%2Fprotocol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teeworlds-go%2Fprotocol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teeworlds-go","download_url":"https://codeload.github.com/teeworlds-go/protocol/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teeworlds-go%2Fprotocol/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28504553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ddnet","ddnet-client","teeworlds","teeworlds-client","teeworlds-protocol"],"created_at":"2026-01-17T08:50:59.748Z","updated_at":"2026-01-17T08:51:00.194Z","avatar_url":"https://github.com/teeworlds-go.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# teeworlds 0.7 protocol library for go\n\nA client side network protocol implementation of the game teeworlds.\n\n## high level api for ease of use\n\nThe package **teeworlds7** implements a high level client library. Designed for ease of use.\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/teeworlds-go/protocol/messages7\"\n\t\"github.com/teeworlds-go/protocol/snapshot7\"\n\t\"github.com/teeworlds-go/protocol/teeworlds7\"\n)\n\nfunc main() {\n\tclient := teeworlds7.NewClient()\n\tclient.Name = \"nameless tee\"\n\n\t// Register your callback for incoming chat messages\n\t// For a full list of all callbacks see: https://github.com/teeworlds-go/protocol/tree/master/teeworlds7/user_hooks.go\n\tclient.OnChat(func(msg *messages7.SvChat, defaultAction teeworlds7.DefaultAction) error {\n\t\t// the default action prints the chat message to the console\n\t\t// if this is not called and you don't print it your self the chat will not be visible\n\t\terr := defaultAction()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif msg.Message == \"!ping\" {\n\t\t\t// Send reply in chat using the SendChat() action\n\t\t\t// For a full list of all actions see: https://github.com/teeworlds-go/protocol/tree/master/teeworlds7/user_actions.go\n\t\t\treturn client.SendChat(\"pong\")\n\t\t}\n\t\treturn nil\n\t})\n\n\tclient.OnSnapshot(func(snap *snapshot7.Snapshot, defaultAction teeworlds7.DefaultAction) error {\n\t\tfmt.Printf(\"got snap with %d items\\n\", len(snap.Items))\n\n\t\tfor _, character := range client.Game.Snap.Characters {\n\t\t\tfmt.Printf(\"  got tee at %.2f %.2f\\n\", float32(character.X)/32.0, float32(character.Y)/32.0)\n\t\t}\n\n\t\tchar, found, err := client.SnapFindCharacter(client.LocalClientId)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif !found {\n\t\t\treturn nil\n\t\t}\n\t\tfmt.Printf(\"  we are at %d %d\\n\", char.X/32, char.Y/32)\n\t\tclient.Right()\n\t\treturn nil\n\t})\n\n\terr := client.Connect(\"127.0.0.1\", 8303)\n\tif err != nil {\n\t\tfmt.Println(err)\n\t\tos.Exit(1)\n\t}\n}\n```\n\nExample usages:\n\n- [client_verbose](./examples/client_verbose/) a verbose client show casing the easy to use high level api\n- [client_echo](./examples/client_echo/) a simple client echoing messages in chat\n- [client_trivia](./examples/client_trivia/) a trivia chat bot\n\n## low level api for power users\n\nThe packages **chunk7, messages7, network7, packer, protocol7** Implement the low level 0.7 teeworlds protocol. Use them if you want to build something advanced such as a custom proxy.\n\n## projects using protocol\n\n- [MITM teeworlds proxy](https://github.com/teeworlds-go/proxy)\n- [goofworlds gui client](https://github.com/teeworlds-go/goofworlds)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteeworlds-go%2Fprotocol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteeworlds-go%2Fprotocol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteeworlds-go%2Fprotocol/lists"}