{"id":25833584,"url":"https://github.com/netskillzgh/rollo","last_synced_at":"2025-09-15T20:04:35.270Z","repository":{"id":41995337,"uuid":"411813332","full_name":"netskillzgh/rollo","owner":"netskillzgh","description":"A 🦀 Rust-based multiplayer framework.","archived":false,"fork":false,"pushed_at":"2024-03-22T19:52:05.000Z","size":1539,"stargazers_count":28,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-06T17:03:48.705Z","etag":null,"topics":["game","game-framework","game-server","gameserver","gaming","mmo","mmorpg","online","rust","server","unity","unreal-engine-4"],"latest_commit_sha":null,"homepage":"","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/netskillzgh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","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":"2021-09-29T20:01:55.000Z","updated_at":"2025-06-19T01:14:12.000Z","dependencies_parsed_at":"2024-11-15T01:15:39.196Z","dependency_job_id":null,"html_url":"https://github.com/netskillzgh/rollo","commit_stats":{"total_commits":387,"total_committers":2,"mean_commits":193.5,"dds":"0.16020671834625322","last_synced_commit":"4aadfb073f16b4e91d341a7696da83731c2469a5"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/netskillzgh/rollo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netskillzgh%2Frollo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netskillzgh%2Frollo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netskillzgh%2Frollo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netskillzgh%2Frollo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netskillzgh","download_url":"https://codeload.github.com/netskillzgh/rollo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netskillzgh%2Frollo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274744062,"owners_count":25341136,"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","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["game","game-framework","game-server","gameserver","gaming","mmo","mmorpg","online","rust","server","unity","unreal-engine-4"],"created_at":"2025-02-28T23:17:43.390Z","updated_at":"2025-09-15T20:04:34.951Z","avatar_url":"https://github.com/netskillzgh.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\u003cimg src=\"https://github.com/netskillzgh/rollo/blob/master/doc/rollo-logo.png?raw=true\" alt=\"logo\" height=\"48\" width=\"48\" style=\"height: 65px; width:65px;\"/\u003e\n\u003ch2\u003eRollo\u003c/h2\u003e\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n \u003cstrong\u003e\n    A Rust-based multiplayer framework.\n \u003c/strong\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://crates.io/crates/rollo\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/v/rollo.svg\"\n    alt=\"Crates\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://docs.rs/rollo\"\u003e\n    \u003cimg src=\"https://docs.rs/rollo/badge.svg\"\n    alt=\"Documentation\" /\u003e\n  \u003c/a\u003e\n   \u003ca href=\"https://github.com/netskillzgh/rollo/actions/workflows/rust.yml\"\u003e\n    \u003cimg src=\"https://github.com/netskillzgh/rollo/actions/workflows/rust.yml/badge.svg\"\n    alt=\"Github Action\" /\u003e\n  \u003c/a\u003e\n   \u003ca href=\"https://github.com/netskillzgh/rollo#license\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\"\n    alt=\"License\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003chr\u003e\n\n## Features\n\n- [Unity Client](https://github.com/netskillzgh/Rollo-Unity)\n- TCP (with TLS support)\n- Packet (command/payload)\n- Game Loop (Update)\n- Event Manager ([example](https://github.com/netskillzgh/rollo/blob/master/examples/event.rs))\n- Interval Manager ([example](https://github.com/netskillzgh/rollo/blob/master/examples/interval.rs))\n- DoS protection ([example](https://github.com/netskillzgh/rollo/blob/master/examples/dos.rs))\n\n## Installation\n\nAdd the following to your `Cargo.toml` file:\n\n```toml\n[dependencies]\nrollo = { version = \"0.13.0\", features = [\"full\"] }\n```\n\n## Example\n\n```rust,no_run\nuse rollo::{\n    error::Error,\n    game::GameTime,\n    packet::to_bytes,\n    packet::Packet,\n    server::{ListenerSecurity, SocketTools, World, WorldSession, WorldSocketMgr},\n    tokio, AtomicCell,\n};\nuse std::{sync::Arc, time::Duration};\n\n#[tokio::main]\nasync fn main() {\n    // lazy_static works as well.\n    let world = Box::leak(Box::new(MyWorld {\n        game_time: AtomicCell::new(GameTime::new()),\n    }));\n\n    let mut socket_manager = WorldSocketMgr::new(world);\n    // Run the server and the game loop at a 15ms interval\n    socket_manager\n        .start_game_loop(Duration::from_millis(15))\n        .start_network(\"127.0.0.1:6666\", ListenerSecurity::Tcp)\n        .await\n        .unwrap();\n}\n\nstruct MyWorld {\n    game_time: AtomicCell\u003cGameTime\u003e,\n}\n\nimpl World for MyWorld {\n    type WorldSessionimplementer = MyWorldSession;\n    fn update(\u0026'static self, _diff: i64, game_time: GameTime) {\n        println!(\"Update at : {}\", game_time.timestamp);\n    }\n\n    // Your GameTime will be updated automatically. (Optional)\n    fn game_time(\u0026'static self) -\u003e Option\u003c\u0026'static AtomicCell\u003cGameTime\u003e\u003e {\n        Some(\u0026self.game_time)\n    }\n}\n\nstruct MyWorldSession {\n    socket_tools: SocketTools,\n}\n\n#[rollo::async_trait]\nimpl WorldSession\u003cMyWorld\u003e for MyWorldSession {\n    async fn on_open(\n        tools: SocketTools,\n        _world: \u0026'static MyWorld,\n    ) -\u003e Result\u003cstd::sync::Arc\u003cSelf\u003e, Error\u003e {\n        Ok(Arc::new(Self {\n            socket_tools: tools,\n        }))\n    }\n\n    fn socket_tools(\u0026self) -\u003e \u0026SocketTools {\n        \u0026self.socket_tools\n    }\n\n    async fn on_message(world_session: \u0026Arc\u003cSelf\u003e, _world: \u0026'static MyWorld, packet: Packet) {\n        // If the message received is Login(1), send a response to the player.\n        if packet.cmd == 1 {\n            // Create a packet without payload\n            let new_packet = to_bytes(10, None);\n            let new_packet = new_packet;\n            // Send it to the player\n            world_session.socket_tools.send_data(new_packet.into());\n        }\n    }\n\n    async fn on_close(_world_session: \u0026Arc\u003cSelf\u003e, _world: \u0026'static MyWorld) {\n        println!(\"Session closed\");\n    }\n}\n```\n\n## Packet Structure\n\n[Payload size(u32); Command(u16); Payload]\n\n## License\n\nMIT license ([LICENSE-MIT](LICENSE-MIT))","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetskillzgh%2Frollo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetskillzgh%2Frollo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetskillzgh%2Frollo/lists"}