{"id":21500085,"url":"https://github.com/abc-engine/abc-game-engine","last_synced_at":"2025-07-15T21:32:01.894Z","repository":{"id":206603681,"uuid":"715891716","full_name":"ABC-Engine/ABC-Game-Engine","owner":"ABC-Engine","description":"A 2d game engine for rust built with simplicity in mind.","archived":false,"fork":false,"pushed_at":"2024-08-02T15:42:29.000Z","size":7327,"stargazers_count":10,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-07T23:30:51.328Z","etag":null,"topics":["blazingly-fast","game-engine","rust"],"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/ABC-Engine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"ABC-Engine"}},"created_at":"2023-11-08T03:18:40.000Z","updated_at":"2024-10-27T09:15:38.000Z","dependencies_parsed_at":"2023-11-25T00:20:10.303Z","dependency_job_id":"a09b3a1d-74f7-4077-9323-6c780886f030","html_url":"https://github.com/ABC-Engine/ABC-Game-Engine","commit_stats":null,"previous_names":["noodlesofwrath/console-renderer","abc-engine/abc-game-engine"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ABC-Engine%2FABC-Game-Engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ABC-Engine%2FABC-Game-Engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ABC-Engine%2FABC-Game-Engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ABC-Engine%2FABC-Game-Engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ABC-Engine","download_url":"https://codeload.github.com/ABC-Engine/ABC-Game-Engine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226072401,"owners_count":17569337,"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":["blazingly-fast","game-engine","rust"],"created_at":"2024-11-23T17:21:05.979Z","updated_at":"2024-11-23T17:21:06.532Z","avatar_url":"https://github.com/ABC-Engine.png","language":"Rust","funding_links":["https://github.com/sponsors/ABC-Engine"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003c!-- Crates version --\u003e\n  \u003ca href=\"https://crates.io/crates/ABC_Game_Engine\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/v/ABC_Game_Engine.svg?style=flat-square\"\n    alt=\"Crates.io version\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- Downloads --\u003e\n  \u003ca href=\"https://crates.io/crates/ABC_Game_Engine\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/d/ABC_Game_Engine.svg?style=flat-square\"\n      alt=\"Download\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- docs --\u003e\n  \u003ca href=\"https://docs.rs/ABC_Game_Engine\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square\"\n      alt=\"docs.rs docs\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- Discord --\u003e\n  \u003ca href=\"https://discord.gg/55R3GsBSYC\"\u003e\n    \u003cimg src=\"https://img.shields.io/discord/1224029164798087239?logo=discord\u0026style=flat-square\" alt=\"Discord Link\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n![s2Kkdcv](https://github.com/ABC-Engine/ABC-Game-Engine/assets/76850177/9f511895-ed68-498e-bd8b-8741ae10cfa2)\n\n# [Website](https://abc-engine.com)\n\n# Under Construction 🚧\nThis project is still under construction and is in the pre-release stage. Significant changes will be made that might break things. We apologize for the inconvenience.\n\n# Ease of use\nThe idea for this project is that it would be so intuitive to use that it would be feasible to learn rust through this game engine. Learning is often made better when you can make something interactable rather than *just* manipulating data and we want to provide that opportunity in Rust.\n\n## OS Support\nMost major operating systems *should* be supported, however only Windows has been tested.\n\n# Current Features\nFor a complete list of features that are planned or done visit [here](https://www.figma.com/design/RGxexDMjVnLHFsUxnKaHhu/ABC-Engine-Roadmap?node-id=0-1\u0026t=mPowocl1rquKjVa9-1)\n\n## Renderers\nBoth a [console renderer](https://github.com/ABC-Engine/console_renderer) and a [pixel art renderer](https://github.com/ABC-Engine/lumenpyx).\n\n## Physics Engine\nRapier is used for physics and can be accessed for collision info as a resource.\n\n## A Simple Platformer Example\n\n```rust\nuse ABC_Game_Engine::physics::rapier2d::geometry::Ray;\nuse ABC_Game_Engine::physics::rapier2d::math::Real;\nuse ABC_Game_Engine::physics::rapier2d::na as nalgebra;\nuse ABC_Game_Engine::physics::rapier2d::na::vector;\nuse ABC_Game_Engine::prelude::*;\nuse ABC_lumenpyx::prelude::*;\n\nstruct Player;\nstruct Ground;\n\nstruct PlayerController {\n    speed: f32,\n    jump_force: f32,\n}\n\nimpl System for PlayerController {\n    fn run(\u0026mut self, entities_and_components: \u0026mut EntitiesAndComponents) {\n        let player_entity;\n        let (player_x, player_y) = {\n            let player_entities = entities_and_components\n                .get_entities_with_component::\u003cPlayer\u003e()\n                .cloned()\n                .collect::\u003cVec\u003cEntity\u003e\u003e();\n\n            player_entity = player_entities[0];\n\n            let (transform,) =\n                entities_and_components.get_components::\u003c(Transform,)\u003e(player_entity);\n            (transform.x, transform.y)\n        };\n\n        let delta_time: f32;\n        let mut normalized_dir = [0.0 as f32; 2];\n        {\n            delta_time = entities_and_components\n                .get_resource::\u003cDeltaTime\u003e()\n                .expect(\"Failed to get DeltaTime resource\")\n                .get_delta_time() as f32;\n\n            let physics_info = entities_and_components\n                .get_resource::\u003cRapierPhysicsInfo\u003e()\n                .expect(\"Failed to get PhysicsInfo resource\");\n\n            let input = entities_and_components.get_resource::\u003cInput\u003e().unwrap();\n\n            if input.get_key_state(KeyCode::A) == KeyState::Held {\n                normalized_dir[0] -= 1.0;\n            }\n\n            if input.get_key_state(KeyCode::D) == KeyState::Held {\n                normalized_dir[0] += 1.0;\n            }\n\n            let is_ground_check = |collider_handle: ColliderHandle, _: \u0026Collider| {\n                let entity = physics_info\n                    .get_associated_entity_with_collider_handle(collider_handle.into())\n                    .expect(\"Failed to get associated entity with collider handle\");\n\n                entities_and_components\n                    .try_get_components::\u003c(Ground,)\u003e(entity)\n                    .0\n                    .is_some()\n            };\n\n            let is_ground_filter = QueryFilter {\n                predicate: Some(\u0026is_ground_check),\n                ..Default::default()\n            };\n\n            let intersection = physics_info.cast_ray(\n                \u0026Ray::new(\n                    vector![player_x as f32, player_y as f32 - 5.01].into(),\n                    vector![0.0, -1.0],\n                ),\n                Real::MAX,\n                true,\n                is_ground_filter,\n            );\n\n            if input.get_key_state(KeyCode::Space) == KeyState::Pressed \u0026\u0026 intersection.is_some() {\n                let intersection = intersection.unwrap();\n\n                if intersection.1 \u003c 0.01 {\n                    normalized_dir[1] = 1.0;\n                }\n            }\n        }\n\n        if let (Some(_), Some(_), Some(rigid_body)) = entities_and_components\n            .try_get_components_mut::\u003c(Player, Transform, RigidBody)\u003e(player_entity)\n        {\n            rigid_body.apply_impulse(\n                vector![\n                    normalized_dir[0] * self.speed * delta_time,\n                    normalized_dir[1] * self.jump_force,\n                ],\n                true,\n            );\n        }\n    }\n}\n\nfn main() {\n    let mut scene = Scene::new();\n\n    let mut lumenpyx_eventloop =\n        LumenpyxEventLoop::new(\u0026mut scene.world, [160, 160], \"Platformer Example\");\n\n    lumenpyx_eventloop.set_render_settings(\n        \u0026mut scene.world,\n        RenderSettings::default()\n            .with_reflections(false)\n            .with_shadows(false),\n    );\n    {\n        let entities_and_components = \u0026mut scene.world.entities_and_components;\n\n        let camera = Camera::new();\n\n        entities_and_components.add_entity_with((camera, Transform::default()));\n\n        let ball = Circle::new([1.0, 1.0, 1.0, 1.0], 5.0);\n\n        let circle_collider = ColliderBuilder::ball(5.0).build();\n        let circle_rb = RigidBodyBuilder::dynamic().additional_mass(1.0).build();\n\n        entities_and_components.add_entity_with((\n            ball,\n            Transform {\n                x: -20.0,\n                y: -20.0,\n                z: 0.0,\n                rotation: 0.0,\n                scale: 1.0,\n                origin_x: 0.0,\n                origin_y: 0.0,\n            },\n            circle_rb,\n            circle_collider,\n            Player {},\n        ));\n\n        let ground_collider = ColliderBuilder::cuboid(160.0, 5.0).build();\n        let ground_rb = RigidBodyBuilder::fixed().build();\n        let ground_rect = Rectangle::new([0.0, 1.0, 1.0, 1.0], 160.0, 10.0);\n\n        entities_and_components.add_entity_with((\n            ground_rect,\n            Transform {\n                x: 0.0,\n                y: -80.0,\n                z: 0.0,\n                rotation: 0.0,\n                scale: 1.0,\n                origin_x: 0.0,\n                origin_y: 0.0,\n            },\n            ground_collider,\n            ground_rb,\n            Ground {},\n        ));\n    }\n\n    scene.world.add_system(PlayerController {\n        speed: 1000.0,\n        jump_force: 3000.0,\n    });\n\n    physics::add_default_physics_systems(\u0026mut scene.world);\n\n    let physics_info = scene\n        .world\n        .entities_and_components\n        .get_resource_mut::\u003cRapierPhysicsInfo\u003e();\n\n    physics_info\n        .expect(\"Failed to get PhysicsInfo resource\")\n        .set_gravity([0.0, -9.81 * 4.0].into());\n\n    lumenpyx_eventloop.run(\u0026mut scene.world, |world| {\n        world.run();\n\n        render(\u0026mut world.entities_and_components);\n    });\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabc-engine%2Fabc-game-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabc-engine%2Fabc-game-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabc-engine%2Fabc-game-engine/lists"}