Giter VIP home page Giter VIP logo

ikari's Introduction

Ikari

License: MIT

Ikari is a game engine project written in pure rust for learning about rust and game tech. It is developed to have decent visuals and good performance, ideally supporting frame rates of 144 or higher.

Most of the rendering features were implemented by following the awesome tutorials on learnopengl and learnwgpu.

Hopefully one day it will be used in a real game ๐Ÿ˜ƒ

Features:

  • Physically-Based Rendering materials (PBR)
  • Image-Based Lighting
  • Point and directional lights
  • Soft shadow edges with randomized Percentage Closer Filtering
  • Adjustable Bloom
  • Adjustable camera exposure
  • Skeletal animations
  • Auto-generated box collision meshes, including support for skinned characters
  • Rapier integration for physics
  • Oddio integration for audio
  • Iced integration for UI
  • Tracy profiler
    • on-demand profile data dumps
  • wgpu-profiler
  • Dynamic render scale
    • Can be used to do supersampling anti-aliasing
  • glTF asset import
    • Supports scene graph, meshes, materials, animations, and skinning
  • Linux, Windows & MacOS support
  • Web support via WASM/WebGPU
  • Wireframe mode
  • Unlit & transparent materials
  • Skyboxes and HDR environment maps
  • BCN texture compression
  • Scene graph
  • CPU-side frustum culling
  • Mipmapping
  • Reverse-Z for better depth accuracy / less z-fighting

Try it out

# native
cargo run --features="tracy" --bin example_game
# web
rustup target add wasm32-unknown-unknown
cargo build_web --release --bin example_game

See console logs for list of available controls

clikari

The ikari CLI has the following capabilities:

  • compress jpg/png textures into GPU-compressed BCN format with baked mips
  • pre-process skybox + HDR env maps to be loaded much more efficiently into the game at runtime (500ms vs 10ms)

For example:

cargo run --bin clikari -- --command process_skybox --background_path ikari/src/textures/milkyway/background.jpg --environment_hdr_path ikari/src/textures/milkyway/radiance.hdr --out_folder ikari/src/skyboxes/milkyway

Screenshots / Videos:

PBR glTF assets

screenshot_1

Point-lights + shadows

screenshot_2

Mesh skinning + animations

2022-06-28_18-00-26.mp4

Rapier physics

physics_test.mp4

Auto-generated character collision meshes

character_collisions_test.mp4

Iced UI + wgpu-profiler

screenshot_3

Profiling

You can profile ikari with tracy via profiling crate. To do that you have to:

  • Download tracy 0.9
  • Build ikari by adding --features="tracy" to the cargo command
  • Run ikari and tracy (in any order), when the game is loading tracy will start profiling

If something does not work it is possible that the crate profiling has been updated and is no longer aligned with the tracy version and a more recent one must be used.

Tracy linux install:

Based on instructions from here: wolfpld/tracy#484

  • Install glfw, freetype2
    • (e.g. aur packages glfw-x11, freetype2). maybe different on Ubuntu
  • Install libcapstone
  • Install tracy 0.9
  • Run tracy
    • ./Tracy_release
  • I made a desktop entry to make it easier to start from the system menus:
    • Not sure if it works in other distros, tested on Arch/KDE
    • Create file ~/.local/share/applications/tracy.desktop with contents:
      [Desktop Entry]
      Name=Tracy
      Exec=/home/david/Programming/tracy/profiler/build/unix/Tracy-release
      Type=Application
      

Running clippy for wasm target

# this will run clippy on the example game as well as ikari by dependency
RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --package example_game --target wasm32-unknown-unknown

ikari's People

Contributors

davidster avatar catcode79 avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.