cafe_core

Crates.iocafe_core
lib.rscafe_core
version0.1.2
sourcesrc
created_at2023-09-03 14:46:09.723725
updated_at2023-09-05 04:09:58.838009
descriptionGame frameworks made on top of SDL2 and OpenGL
homepage
repositoryhttps://codeberg.org/cafe/cafe
max_upload_size
id962280
size1,980,785
Canoi Gomes (canoi12)

documentation

README

Cafe

Cafe is game engine/framework, build on top of independent modules:

  • Tea for render
  • Mocha for audio
  • Coffee for scripting (Rust port is a WIP)
  • Latte for filesystem and package (Rust port is a WIP)

The other modules i don't started even in C, so i'll start from scratch in Rust:

  • Milk for UI
  • Cybercafe editor

Example code:

extern crate cafe;

use cafe::{Game, CafeBuilder, Render};
use cafe::render::render2D::Render2D;

pub struct MyGame {}

impl Game for MyGame {
    type Render = Render2D;

    fn new() -> Self {
        MyGame {}
    }

    fn setup(&mut self, _settings: &mut GameSettings) {}
    fn run(&mut self, _dt: f32, render: &mut Self::Render) -> bool {
        render.begin();
        render.clear();
        render.end();
        true
    }
}

fn main() {
    let cafe = CafeBuilder::new("Hello Game", 640, 380)
        .resizable(true)
        .build::<MyGame>()
        .unwrap();
    cafe.run();
}

Commit count: 0

cargo fmt