Skip to content

weshardee/kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kit

** WARNING: VERY EARLY WIP **

Kit is a very raw 3D game engine. I made it to learn game engine coding, and someday I'd like it to be a reasonable foundation for game jam projects.

Kit will support 2D as well as 3D, but if you're looking for a 2D focused engine, I recommend checking out ggez instead, as that seems really solid and is way further along in development.

TODO

Missing features abound. Use at your own risk (I wouldn't even describe this as usable at this point). Things that I'm currently planning to add:

  • gamepad support
  • full keyboard input support
  • mouse input support
  • audio
  • documentation might be nice /s
  • sensible (or extensible? configurable?) limits for draw commands (they're highly arbitrary right now)
  • complete vector math library (maybe I'll switch to glam later? my hand-rolled version has many holes and inconsistencies at the moment)
  • investigate using wgpu-rs instead of sokol (wgpu-rs is likely a more Rust-centric approach)
  • 3D model loading
  • lighting (maybe)
  • line, circle, point primitives in drawing commands are always drawn over models and under sprites - should fix depth handling
  • hot-reloading of game for rapid iteration
  • example projects
  • multiple rendering layers (to overlay a gui, for example)
  • asset un-loading (for area transitions and such)
  • spritesheet loading from some easily-editable common format
  • touch input for mobile

Getting started

use kit::*;

const TITLE: &str = "My Amazing Game";

struct App {
  // game state can go here
}

impl KApp for App {
  fn new() -> Self { Self {} }

  fn init(&mut self, ctx: &mut Ctx) {
    // initialization logic goes here. For example,
    // you could load all the game's sprites/sounds/models 
    // into memory.
  }

  fn frame(&mut self, ctx: &mut Ctx) {
    // update logic goes here
  }
}

fn main() {
    run::<App>(KAppDesc {
        window_title: TITLE.to_string(),
        ..Default::default()
    });
}

Examples

Kit uses cargo examples, so run cargo run --example example_name to see an example in action.

About

An experimental 3d game engine for Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published