Skip to content

fuiz/game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fuiz Game Engine

A Rust-based game engine for creating and managing live quiz games with real-time synchronization, multiple question types, team support, and comprehensive leaderboards.

Fuiz Logo

License: AGPL v3 Rust Edition

Features

  • Multiple Question Types - Multiple choice, type answer, and drag-and-drop ordering
  • Team-Based Games - Optional team formation with configurable sizes and random assignment
  • Smart Name Generation - Automatic pet names or Roman-style names for players
  • Media Rich Questions - Image support through integrated Corkboard system
  • Content Safety - Built-in profanity filtering and content moderation
  • Flexible Scoring - Customizable point systems and leaderboard management
  • Input Validation - Comprehensive validation of all game configurations and player inputs
  • WASM Compatible - Runs in browsers and on servers

Question Types

Type Description Features
Multiple Choice Traditional A/B/C/D questions Configurable options, media support
Type Answer Free-text input questions Fuzzy matching, case-insensitive
Order Drag-and-drop ordering tasks Sequence arrangement, partial scoring

Getting Started

Prerequisites

  • Rust 1.88+ (Edition 2024)
  • Cargo package manager

Installation

git clone https://gitlab.com/fuiz/game.git
cd game
cargo build --release

Using as a Library

This is a library crate for building quiz game applications. To use it in your project:

[dependencies]
fuiz = { git = "https://gitlab.com/fuiz/game.git" }

Library Usage

Basic Quiz Game

use fuiz::{Game, game::Options, fuiz::config::Fuiz, watcher::Id};

// Create a simple quiz configuration
let config = Fuiz {
    title: "Math Quiz".to_string(),
    slides: vec![
        // Add your questions here
    ],
};

let options = Options::default();
let host_id = Id::new();
let game = Game::new(config, options, host_id);

Team-based Game

use fuiz::game::{Options, TeamOptions, NameStyle};

let options = Options {
    teams: Some(TeamOptions {
        size: 3,
        assign_random: false,
    }),
    random_names: Some(NameStyle::Petname(2)),
    ..Default::default()
};

Game Configuration

The Fuiz struct contains the quiz configuration:

pub struct Fuiz {
    title: String,
    pub slides: Vec<SlideConfig>,
}

Questions are defined using the SlideConfig enum:

pub enum SlideConfig {
    MultipleChoice(multiple_choice::SlideConfig),
    TypeAnswer(type_answer::SlideConfig),
    Order(order::SlideConfig),
}

Game behavior is configured with the Options struct:

pub struct Options {
    random_names: Option<NameStyle>,
    show_answers: bool,
    no_leaderboard: bool,
    teams: Option<TeamOptions>,
}

Hosted Service

While you can self-host this engine, a live version is available:

License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.

About

Fuiz is developed and maintained by Beyond Expiry, a dedicated non-profit, as part of the effort to create open-source educational tools.

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages