| Crates.io | gaymwtf-core |
| lib.rs | gaymwtf-core |
| version | 0.2.1 |
| created_at | 2025-06-20 10:36:09.231486+00 |
| updated_at | 2025-06-30 05:25:15.388665+00 |
| description | A modular 2D game engine and framework built with Rust and Macroquad. |
| homepage | |
| repository | https://github.com/BenimFurka/gaymwtf-core |
| max_upload_size | |
| id | 1719431 |
| size | 100,795 |
A modular 2D game engine and framework built with Rust and Macroquad.
Add this to your Cargo.toml:
[dependencies]
gaymwtf-core = "0.2.1"
macroquad = "0.4.14"
Or run:
cargo add gaymwtf-core macroquad
Basic example of setting up a game world:
use gaymwtf_core::*;
use macroquad::prelude::*;
#[macroquad::main("My Game")]
async fn main() {
// Initialize registries
let tile_registry = TileRegistry::new();
let object_registry = ObjectRegistry::new();
let biome_registry = BiomeRegistry::new();
// Create a new world
let mut world = World::new("MyGameWorld", tile_registry, object_registry, biome_registry);
let mut camera = Camera2D::from_display_rect(Rect::new(0.0, 0.0, 800.0, 600.0));
camera.zoom.y = -camera.zoom.y;
// Game loop
loop {
// Update game state
world.update(camera.target, vec2(screen_width(), screen_height()));
// Render
clear_background(BLACK);
set_camera(&camera);
world.draw(camera.target, vec2(screen_width(), screen_height()));
next_frame().await;
}
}
The repository includes an example that serves as a working example of how to use the game engine. This test project demonstrates:
To run the example project:
cargo run --example world
Also the repository includes an other example that serves as a working example of how to use the game engine for UI. This example project demonstrates:
To run the example project:
cargo run --example ui
src/core/: Core game systems (world, entities, tiles, biomes)
world/: World managementchunk/: Chunk systemobject/: Object system and implementationstile/: Tile system and implementationsbiome/: Biome system and implementationsui/: UI system and implementationssave/: Vec2Savesrc/engine/: Rendering and other engine-specific codesrc/utils/: Utility functions and helpersThis project is licensed under the LGPL v3 License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request or open an Issue.