#rogue-like #opengl #game-engine #mouse-input #keyboard-input #console #wasm

doryen-rs

Pure rust OpenGL accelerated roguelike console API with native/wasm support

8 stable releases

1.3.0 Oct 9, 2022
1.2.3 Jan 7, 2020
1.2.1 Dec 8, 2019
1.2.0 Nov 22, 2019
0.1.0 Aug 3, 2018

#391 in Game dev

Download history 2/week @ 2023-12-18 46/week @ 2024-02-12 14/week @ 2024-02-19 35/week @ 2024-02-26 14/week @ 2024-03-04 23/week @ 2024-03-11 15/week @ 2024-03-18 193/week @ 2024-04-01

234 downloads per month
Used in 3 crates

MIT license

4MB
2K SLoC

doryen-rs

Build Status Documentation License: MIT

Ascii roguelike library in rust with native and wasm support. Uses the uni-gl and uni-app crates from the unrust game engine.

features

+ [x] GLSL renderer
+ [x] RGBA, RGB and greyscale fonts
+ [x] mouse input
+ [x] keyboard input
+ [x] subcell resolution
+ [x] PNG image blitting
+ [x] unicode support
+ [x] screenshots

demos

Visual demo
Basic real-time walking @
Performance test
Fonts demo
Unicode demo
Console blitting demo
Image blitting demo
Subcell resolution demo
Transparent console demo
Text input demo

usage

  • add dependency to Cargo.toml :
[dependencies]
doryen-rs="*"

Check the examples and documentation for more information.

compilation

  • native compilation
cargo run --example basic
  • web compilation Install wasm32 target :
rustup target install wasm32-unknown-unknown

Install wasm-pack and npm

Change the path variable in examples/Cargo.toml to select an example.

Compile the demo with

wasm-pack build examples

This creates a wasm package in examples/pkg

Run the demo with

cd www
npm install
npm run start

Open your browser at http://localhost:8080/

license

This code is released under the MIT license.

contributions

You can contribute to this library through pull requests. If you do so, please update the CHANGELOG.md and CREDITS.md files. If you provide a new feature, consider adding an example as a tutorial/showcase.

Dependencies

~10–24MB
~173K SLoC