{"id":13439493,"url":"https://github.com/ggez/ggez","last_synced_at":"2025-05-13T20:03:28.789Z","repository":{"id":37412435,"uuid":"50728157","full_name":"ggez/ggez","owner":"ggez","description":"Rust library to create a Good Game Easily","archived":false,"fork":false,"pushed_at":"2025-04-17T14:48:32.000Z","size":5953,"stargazers_count":4393,"open_issues_count":78,"forks_count":422,"subscribers_count":53,"default_branch":"master","last_synced_at":"2025-05-06T19:52:00.608Z","etag":null,"topics":["crates","engine","game","game-development","game-engine","game-frameworks","gameengine","rust"],"latest_commit_sha":null,"homepage":"http://ggez.rs","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/ggez.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2016-01-30T14:29:51.000Z","updated_at":"2025-05-06T03:19:39.000Z","dependencies_parsed_at":"2023-10-01T23:14:20.880Z","dependency_job_id":"340d2912-a681-49ea-9e4d-e78f8c3c1f9b","html_url":"https://github.com/ggez/ggez","commit_stats":{"total_commits":2033,"total_committers":206,"mean_commits":9.868932038834952,"dds":0.5287752090506641,"last_synced_commit":"74ed4c7688cdd03a84c5c98f9c8650ec3947cf07"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggez%2Fggez","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggez%2Fggez/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggez%2Fggez/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggez%2Fggez/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ggez","download_url":"https://codeload.github.com/ggez/ggez/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254020473,"owners_count":22000750,"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":["crates","engine","game","game-development","game-engine","game-frameworks","gameengine","rust"],"created_at":"2024-07-31T03:01:14.358Z","updated_at":"2025-05-13T20:03:28.751Z","avatar_url":"https://github.com/ggez.png","language":"Rust","funding_links":[],"categories":["Libraries","Rust","库 Libraries","库","Game Engines","虚拟化"],"sub_categories":["Game development","游戏开发 Game development","游戏开发"],"readme":"# ggez\n\n[![ggez logo](docs/ggez-logo-maroon-full.svg)](http://ggez.rs/)\n\n## What is this?\n\n![Build status](https://github.com/ggez/ggez/workflows/CI/badge.svg)\n[![Docs Status](https://docs.rs/ggez/badge.svg)](https://docs.rs/ggez)\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/ggez/ggez/blob/master/LICENSE)\n[![Crates.io](https://img.shields.io/crates/v/ggez.svg)](https://crates.io/crates/ggez)\n[![Crates.io](https://img.shields.io/crates/d/ggez.svg)](https://crates.io/crates/ggez)\n[![Discord chat](https://img.shields.io/discord/1031224392174293002.svg?label=discord%20chat)](https://discord.gg/48VycPe2ZX)\n\n\nggez is a Rust library to create a Good Game Easily.\n\nThe current version is 0.9.3.\n\nMore specifically, ggez is a lightweight cross-platform game framework\nfor making 2D games with minimum friction.  It aims to implement an\nAPI based on (a Rustified version of) the [LÖVE](https://love2d.org/)\ngame framework.  This means it contains basic and portable 2D\ndrawing, sound, resource loading and event handling, but finer details\nand performance characteristics may be different than LÖVE.\n\nggez is not meant to be everything to everyone, but rather a good\nbase upon which to build.  Thus it takes a fairly\nbatteries-included approach without needing a million additions\nand plugins for everything imaginable, but also does not dictate\nhigher-level functionality such as physics engine or entity\ncomponent system.  Instead the goal is to allow you to use\nwhichever libraries you want to provide these functions, or build\nyour own libraries atop ggez.\n\n### Features\n\n* Filesystem abstraction that lets you load resources from folders or zip files\n* Hardware-accelerated 2D rendering built on the `wgpu` graphics API\n* Loading and playing .ogg, .wav and .flac files via the `rodio` crate\n* TTF font rendering with `glyph_brush`.\n* Interface for handling keyboard and mouse events easily through callbacks\n* Config file for defining engine and game settings\n* Easy timing and FPS measurement functions.\n* Math library integration with `mint`.\n* Some more advanced graphics options: shaders, instanced draws and render targets\n\n### Non-Features (i.e. things to add from elsewhere if needed)\n\n* [Physics](https://arewegameyet.rs/ecosystem/physics/)\n* Animation (check out [keyframe](https://github.com/HannesMann/keyframe); [it works pretty well with ggez](https://psteinhaus.github.io/ggez/web-examples/) ([source](https://github.com/PSteinhaus/PSteinhaus.github.io/tree/main/ggez/web-examples)))\n* [GUI](https://arewegameyet.rs/ecosystem/ui/)\n* [Assets manager](https://github.com/a1phyr/assets_manager)\n* [AI](https://arewegameyet.rs/ecosystem/ai/)\n* [ECS](https://arewegameyet.rs/ecosystem/ecs/)\n* [Networking](https://arewegameyet.rs/ecosystem/networking/)\n\n### Supported platforms\n\n * Fully supported: Windows, Linux, MacOS\n * Not officially supported but might work anyway: Android, iOS, Web\n\nFor details, see [docs/BuildingForEveryPlatform.md](docs/BuildingForEveryPlatform.md)\n\nIf you want to run ggez (up to 0.7 as of now) on Android, iOS or the web using WebAssembly right now, take a look at [good-web-game](https://github.com/ggez/good-web-game).\n\n### Who's using ggez?\n\nCheck out the [projects list!](docs/Projects.md)\n\n### Usage\n\nggez requires rustc \u003e= 1.42 and is distributed on\ncrates.io. To include it in your project, just add the dependency\nline to your `Cargo.toml` file:\n\n```\nggez = \"0.9.3\"\n```\n\nggez consists of three main parts: A `Context` object which\ncontains all the state required to interface with the computer's\nhardware, an `EventHandler` trait that the user implements to\nregister callbacks for events, and various sub-modules such as\n`graphics` and `audio` that provide the functionality to actually\nget stuff done.  The general pattern is to create a struct holding\nyour game's data which implements the `EventHandler` trait.\nCreate a new `Context` object with default objects from a `ContextBuilder`\nor `Conf` object, and then call `event::run()` with\nthe `Context` and an instance of your `EventHandler` to run your game's\nmain loop.\n\nSee the [API docs](https://docs.rs/ggez/) for full documentation, or the [examples](/examples) directory for a number of commented examples of varying complexity.  Most examples show off\na single feature of ggez, while `astroblasto` and `snake` are small but complete games.\n\n### Getting started\n\nFor a quick tutorial on ggez, see the [Hello ggez](https://github.com/ggez/ggez/blob/master/docs/guides/HelloGgez.md) guide in the `docs/` directory.\n\n### Examples\n\nSee the `examples/` directory in the source.  Most examples show off\na single feature of ggez, while `astroblasto` is a small  but\ncomplete Asteroids-like game.\n\nTo run the examples, just check out the source and execute `cargo run --example`\nin the root directory:\n\n```\ngit clone https://github.com/ggez/ggez.git\ncd ggez\ncargo run --example 05_astroblasto\n```\n\nIf this doesn't work, see the\n[FAQ](https://github.com/ggez/ggez/blob/master/docs/FAQ.md) for solutions\nto common problems.\n\n#### Basic Project Template\n\n```rust,no_run\nuse ggez::{Context, ContextBuilder, GameResult};\nuse ggez::graphics::{self, Color};\nuse ggez::event::{self, EventHandler};\n\nfn main() {\n    // Make a Context.\n    let (mut ctx, event_loop) = ContextBuilder::new(\"my_game\", \"Cool Game Author\")\n        .build()\n        .expect(\"aieee, could not create ggez context!\");\n\n    // Create an instance of your event handler.\n    // Usually, you should provide it with the Context object to\n    // use when setting your game up.\n    let my_game = MyGame::new(\u0026mut ctx);\n\n    // Run!\n    event::run(ctx, event_loop, my_game);\n}\n\nstruct MyGame {\n    // Your state here...\n}\n\nimpl MyGame {\n    pub fn new(_ctx: \u0026mut Context) -\u003e MyGame {\n        // Load/create resources such as images here.\n        MyGame {\n            // ...\n        }\n    }\n}\n\nimpl EventHandler for MyGame {\n    fn update(\u0026mut self, _ctx: \u0026mut Context) -\u003e GameResult {\n        // Update code here...\n        Ok(())\n    }\n\n    fn draw(\u0026mut self, ctx: \u0026mut Context) -\u003e GameResult {\n        let mut canvas = graphics::Canvas::from_frame(ctx, Color::WHITE);\n        // Draw code here...\n        canvas.finish(ctx)\n    }\n}\n```\n\n### Implementation details\n\nggez is built upon `winit` for windowing and events, `rodio` for\nsound, and a 2D drawing engine implemented with `wgpu`. It is entirely\nthread-safe (though platform constraints mean the event-handling loop\nand drawing must be done in the main thread), and portable to Windows\nand Linux.\n\nggez is pure Rust™.\n\n### Help!\n\nSources of information:\n\n * The [FAQ](https://github.com/ggez/ggez/blob/master/docs/FAQ.md) has answers to common questions and problems.\n * The [API docs](https://docs.rs/ggez/), a lot of design stuff is explained there.\n * Check out the [examples](https://github.com/ggez/ggez/tree/master/examples).\n\n If you still have problems or questions, feel free to ask!  Easiest ways are:\n\n * Open an issue on [the Github issue tracker](https://github.com/ggez/ggez/issues)\n * Say hi on [our new Discord server](https://discord.gg/48VycPe2ZX)\n * Or ask the wise people on the [unofficial Rust Discord server](http://bit.ly/rust-community), the [Rust Gamedev server](https://discord.gg/yNtPTb2) or the [good-web-game Discord server](https://discord.gg/jum3Fjek2A)\n\nLicense: MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggez%2Fggez","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fggez%2Fggez","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggez%2Fggez/lists"}