{"id":16698801,"url":"https://github.com/TakWolf/tge","last_synced_at":"2025-10-31T06:30:38.532Z","repository":{"id":57669649,"uuid":"229923331","full_name":"TakWolf/tge","owner":"TakWolf","description":"A lightweight cross-platform 2D game framework written in pure Rust and based on OpenGL 3.3+.","archived":false,"fork":false,"pushed_at":"2025-01-24T17:43:40.000Z","size":16551,"stargazers_count":34,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-02T18:26:31.572Z","etag":null,"topics":["game-engine","graphics","opengl","rust","tge"],"latest_commit_sha":null,"homepage":"","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/TakWolf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2019-12-24T10:41:39.000Z","updated_at":"2025-01-24T21:13:12.000Z","dependencies_parsed_at":"2024-09-29T03:01:12.936Z","dependency_job_id":null,"html_url":"https://github.com/TakWolf/tge","commit_stats":{"total_commits":391,"total_committers":1,"mean_commits":391.0,"dds":0.0,"last_synced_commit":"76ceca13a2419aa00cfd0a9efd49ac4d1864d591"},"previous_names":["takwolf-deprecated/tge","takwolf/tge"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TakWolf%2Ftge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TakWolf%2Ftge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TakWolf%2Ftge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TakWolf%2Ftge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TakWolf","download_url":"https://codeload.github.com/TakWolf/tge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239126447,"owners_count":19586097,"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-engine","graphics","opengl","rust","tge"],"created_at":"2024-10-12T18:01:56.962Z","updated_at":"2025-10-31T06:30:38.519Z","avatar_url":"https://github.com/TakWolf.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TakWolf's Game Engine (tge)\n\n[![crates.io](https://img.shields.io/crates/v/tge)](https://crates.io/crates/tge)\n[![Docs.rs](https://docs.rs/tge/badge.svg)](https://docs.rs/tge)\n[![License](https://img.shields.io/crates/l/tge)](#License)\n\nA lightweight cross-platform 2D game framework written in pure Rust and based on OpenGL 3.3+.\n\n## Features\n\n* 2D only and use pixel unit.\n* Hardware-accelerated rendering base on OpenGL.\n* Automatically process rendering batch.\n* Dynamic font rendering with text layout.\n* Support high-DPI.\n* Keyboard, mouse, touch, touchpad and gamepad input handling.\n* Audio play. (TODO)\n\n## Non goals\n\n* 3D.\n* Visual editor.\n\nThe following does not contain, but can easily work with other crates:\n\n* Entity Component System (ECS).\n* Physics engines and collision detection.\n* Network.\n\n## Usage\n\nAdd the dependency line to your `Cargo.toml` file:\n\n```toml\n[dependencies]\ntge = \"0.0.4\"\n```\n\nTo release performance, also add the following configs:\n\n```toml\n[profile.dev]\nopt-level = 3\n```\n\nThen create a basic template. Here is the minimal example that will create a window:\n\n```rust\nuse tge::prelude::*;\n\nstruct App {}\n\nimpl App {\n    fn new(_: \u0026mut Engine) -\u003e GameResult\u003cSelf\u003e {\n        // load assets\n        Ok(Self {})\n    }\n}\n\nimpl Game for App {\n    fn update(\u0026mut self, _: \u0026mut Engine) -\u003e GameResult {\n        // handle logic\n        Ok(())\n    }\n\n    fn render(\u0026mut self, engine: \u0026mut Engine) -\u003e GameResult {\n        engine.graphics().clear(Color::BLUE);\n        // draw sprites\n        Ok(())\n    }\n}\n\nfn main() -\u003e GameResult {\n    let mut engine = EngineBuilder::new()\n        .window_config(WindowConfig::new()\n            .title(\"My Game\")\n            .inner_size((1024.0, 600.0)))\n        .build()?;\n    let mut app = App::new(\u0026mut engine)?;\n    engine.run(\u0026mut app)\n}\n```\n\nThat is!\n\nYou can also see the [`examples/`](examples/) directory to learn other examples.\n\n## Examples\n\n### [camera](examples/camera.rs)\n\n![Camera](docs/camera.png)\n\n### [cannon](examples/cannon.rs)\n\n![Cannon](docs/cannon.png)\n\n### [clock](examples/clock.rs)\n\n![Clock](docs/clock.png)\n\n### [bunny_mark](examples/bunny_mark.rs)\n\n![Bunny Mark](docs/bunny_mark.png)\n\n### [hare_mark](examples/hare_mark.rs)\n\n![Hare Mark](docs/hare_mark.png)\n\n### [frame_animation](examples/frame_animation.rs)\n\n![Frame Animation](docs/frame_animation.png)\n\n### [parallax_forest](examples/parallax_forest.rs)\n\n![Parallax Forest](docs/parallax_forest.png)\n\n### [parallax_mountain](examples/parallax_mountain.rs)\n\n![Parallax Mountain](docs/parallax_mountain.png)\n\n### [dvd](examples/dvd.rs)\n\n![DVD](docs/dvd.png)\n\n### [text_layout](examples/text_layout.rs)\n\n![Text Layout](docs/text_layout.png)\n\n### [stroke_text](examples/stroke_text.rs)\n\n![Stroke Text](docs/stroke_text.png)\n\n## License\n\n[MIT License](LICENSE-MIT) OR [Apache License 2.0](LICENSE-APACHE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTakWolf%2Ftge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTakWolf%2Ftge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTakWolf%2Ftge/lists"}