Skip to content

foxvoid-studio/fantasy_craft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fantasy Craft

The lightweight, data-oriented Rust game engine built for the Web.

Fantasy Craft Banner

License: MPL 2.0

Rust Macroquad Hecs Parry2d WebAssembly

Fantasy Craft is a 2D/2.5D game engine designed for developers who love Rust but hate bloat.

Unlike heavy general-purpose engines, Fantasy Craft focuses on a "code-first" approach. It combines the immediate-mode rendering simplicity of Macroquad with a high-performance Entity Component System (Hecs) and robust physics (Parry2d).

It is the official engine of the Foxvoid Ecosystem, meaning it comes with built-in hooks for instant cloud deployment, save states, and leaderboards.


🌟 Key Features

  • 🦀 100% Rust: Type-safe, memory-safe, and blazingly fast.
  • 🕸️ WASM First: Optimized to produce tiny binaries (~200kb) that load instantly in any browser.
  • 🧱 Data-Oriented Architecture: Built on top of hecs, a lightweight and fast ECS (Entity Component System).
  • 💥 Physics Ready: Integrated parry2d for precise collision detection and spatial queries.
  • ☁️ Foxvoid Cloud Ready: Native integration with Foxvoid Platform for:
    • Cloud Storage (Saves/Configs)
    • Leaderboards
    • Auto-updater via the Foxvoid Launcher.

📦 Installation

Add this to your Cargo.toml:

[dependencies]
fantasy-craft = "0.1.0"

🚀 Quick Start

Here is how to create a simple window in less than 20 lines of code.

use macroquad::prelude::*;
use fantasy_craft::prelude::*;

fn window_conf() -> Conf {
   Conf {
      window_title: "Fantasy Craft".to_owned(),
      window_width: 1920,
      window_height: 1080,
      ..Default::default()
   }
}

#[macroquad::main(window_conf)]
async fn main() {
   let mut app = App::new(window_conf());

   app.with_splash_screen_enabled(true);

   app.run().await
}

🏗️ Architecture

Fantasy Craft stands on the shoulders of giants. We believe in composing the best crates in the ecosystem rather than reinventing the wheel.

Layer Technology Description
Rendering macroquad Cross-platform windowing and immediate mode graphics.
ECS hecs A lightweight, archetypal ECS for managing game state.
Physics parry2d Geometric queries and collision detection.
Networking reqwest (WASM) HTTP client for talking to the Foxvoid Backend.

📄 License

Fantasy Craft is licensed under the Mozilla Public License 2.0 (MPL-2.0).

What does this mean for you?

  • ✅ Commercial Use: You can use this engine to build and sell closed-source games. You keep 100% of your game code rights.

  • 🔄 Modifications: If you modify the source code of the engine itself, you must share those modifications back to the community.

See LICENSE for more details.

Part of the Foxvoid Studio ecosystem.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages