{"id":13439527,"url":"https://github.com/VictoremWinbringer/Victorem","last_synced_at":"2025-03-20T08:31:31.063Z","repository":{"id":47193941,"uuid":"160554717","full_name":"VictoremWinbringer/Victorem","owner":"VictoremWinbringer","description":"Victorem - easy UDP game server and client framework for creating simple 2D and 3D online game prototype in Rust.","archived":false,"fork":false,"pushed_at":"2019-01-14T18:03:48.000Z","size":161,"stargazers_count":32,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-07T08:10:10.973Z","etag":null,"topics":["game-framework","game-server","game-servers","multiplayer","realtime","rust","rust-library","server","udp","udp-client","udp-server"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/victorem","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VictoremWinbringer.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}},"created_at":"2018-12-05T17:32:12.000Z","updated_at":"2024-09-14T12:24:27.000Z","dependencies_parsed_at":"2022-08-30T14:41:15.615Z","dependency_job_id":null,"html_url":"https://github.com/VictoremWinbringer/Victorem","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VictoremWinbringer%2FVictorem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VictoremWinbringer%2FVictorem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VictoremWinbringer%2FVictorem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VictoremWinbringer%2FVictorem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VictoremWinbringer","download_url":"https://codeload.github.com/VictoremWinbringer/Victorem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221739733,"owners_count":16872779,"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-framework","game-server","game-servers","multiplayer","realtime","rust","rust-library","server","udp","udp-client","udp-server"],"created_at":"2024-07-31T03:01:14.703Z","updated_at":"2025-03-20T08:31:31.056Z","avatar_url":"https://github.com/VictoremWinbringer.png","language":"Rust","readme":"# Victorem\n[\u003cimg src=\"https://api.travis-ci.org/VictoremWinbringer/Victorem.svg?branch=master\"\u003e](https://travis-ci.org/VictoremWinbringer/Victorem)\n\nEasy UDP game server and client framework for creating simple 2D and 3D online game prototype in Rust.\n## Example \n### Cargo.toml\n```toml\n[dependencies]\nvictorem = \"0.8.2\"\n```\n### Client \n```rust\nuse victorem;\nuse std::time::{Duration, Instant};\n\nfn main() {\n    let mut client = victorem::ClientSocket::new(11111, \"127.0.0.1:22222\").unwrap();\n    let mut id: u32 = 0;\n    let mut timer = Instant::now();\n    let period = Duration::from_millis(100);\n    loop {\n        if timer.elapsed() \u003e period {\n            timer = Instant::now();\n            id += 1;\n            let _ = client.send(format!(\"Ping {}\", id).into_bytes());\n        }\n        let _ = client\n            .recv()\n            .map(|v| String::from_utf8(v).unwrap_or(String::new()))\n            .map(|s| println!(\"From Server: {}\", s));\n    }\n}\n```\n### Server\n```rust\nuse victorem;\nuse std::net::SocketAddr;\nuse std::time::Duration;\n\nstruct PingPongGame {\n    id: u32,\n}\n\nimpl victorem::Game for PingPongGame {\n    fn handle_command(\n        \u0026mut self,\n        delta_time: Duration,\n        commands: Vec\u003cVec\u003cu8\u003e\u003e,\n        from: SocketAddr,\n    ) -\u003e victorem::ContinueRunning {\n        for v in commands {\n            println!(\n                \"From Client: {:?} {} {}\",\n                delta_time,\n                from,\n                String::from_utf8(v).unwrap_or(String::new()),\n            );\n        }\n        true\n    }\n\n    fn draw(\u0026mut self, delta_time: Duration) -\u003e Vec\u003cu8\u003e {\n        self.id += 1;\n        format!(\"Pong {} {:?}\", self.id, delta_time).into_bytes()\n    }\n}\n\nfn main() {\n    let mut server = victorem::GameServer::new(PingPongGame { id: 0 }, 22222).unwrap();\n    server.run();\n}\n```\n\n","funding_links":[],"categories":["Libraries","库 Libraries","库"],"sub_categories":["Game development","游戏开发 Game development","游戏开发"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVictoremWinbringer%2FVictorem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FVictoremWinbringer%2FVictorem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVictoremWinbringer%2FVictorem/lists"}