Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The Roguelike Toolkit (RLTK), implemented for Rust.

License

NotificationsYou must be signed in to change notification settings

amethyst/bracket-lib

Repository files navigation

Note that you may need to runcargo update to pull some dependency updates. If you are coming from Hands-on Rust, the code is maintainedhere

You can read a tutorial series on writing a Roguelike with this library at:https://bfnightly.bracketproductions.com/rustbook/

Bracket-lib is the primary support library for my book,Hands-on Rust. Please consider checking out my book.

Early work has begun on writing a manual. You can find it in themanual folder, orread it online.

BREAKING CHANGE ALERT: Thecrossterm feature is nowcross_term if you are usingbracket-terminal directly. It's stillcrossterm forbracket-lib andrltk.

IMPORTANT: If you are running thewebgpu backend, you need to addresolver = 2 to yourCargo.toml file. WGPU requires it for platform selection.

What happened to RLTK?

Thisis RLTK, renamed because it is increasingly finding usage outside of just Roguelikes. It's also been divided into a number of crates, to make it easy to pick-and-choose the features you need.

  • rltk crate wrapsbracket-lib and re-exports in therltk:: andrltk::prelude namespace. This preserves compatibility with all existing RLTK projects.
  • bracket-algorithm-traits exposes the traits required for the various algorithm systems in other crates.
  • bracket-color is my RGB/HSV color management system.
  • bracket-geometry exposes various geometric primitives and helpers. Supports other crates.
  • bracket-noise is a port ofAuburn's FastNoise to Rust.
  • bracket-pathfinding provides a high-performance A* (A-Star) pathing system, as well as Dijkstra maps.
  • bracket-random is a dice-oriented random number generator, including parsing of RPG-style dice strings such as3d6+12.

Usingbracket-lib

In yourCargo.toml file, include:

[dependencies]bracket-lib ="~0.8"

Feature Flags

There are a few feature flags designed to aide integration with other systems:

  • specs tells variousbracket-lib sub-systems to export important primitives as having Specs'Component type applied.
  • serde tells variousbracket-lib sub-systems to support usingSerde for serialization/de-serialization.

Performance:

  • threaded enables multi-threading on some sub-systems.

Terminal mode:

By default,bracket-lib runs in OpenGL mode (or WebGL if it detects that you are compiling forwasm32-unknown-unknown). If you want to use other rendering back-ends,disable default features and applyone of the following feature flags:

  • webgpu to use thewgpu system as a back-end, supporting Vulkan, Metal and WebGPU.
  • crossterm to use the excellentCrossterm terminal library.
  • curses to usepancurses forncurses orpdcurses support depending upon your platform.

Sample Projects

About

The Roguelike Toolkit (RLTK), implemented for Rust.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors47

Languages


[8]ページ先頭

©2009-2025 Movatter.jp