GithubHelp home page GithubHelp logo

paulmaynard / doryen-extra Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ilyvion/doryen-extra

0.0 1.0 0.0 132 KB

Doryen-extra aims to be a loose re-implementation of the utility features from the popular roguelike library named libtcod

License: BSD 3-Clause "New" or "Revised" License

Rust 100.00%

doryen-extra's Introduction

Crates.io Docs.rs CI MacOS License Code coverage

Doryen-extra

Doryen-extra aims to be a loose re-implementation of the utility features from the popular roguelike library named libtcod, which is also known as the Doryen Library. The doryen-rs crate fulfills the re-implementation of the game engine part of the library, but is otherwise (at the time of writing) missing a lot of the features that were present in libtcod.

After finding myself frustrated with the various limitations and hassles that are involved when wrapping a C library in rust, which is what the tcod crate has done, I decided to just go all-in and re-code the library in Rust.

While I could've just copied and pasted the code as it was, and turned it into Rust with minimal modifications, I wanted to make it a proper Rust library, so it has been coded with retaining functionality in mind, but not with retaining form. By that, I mean that all the functionality you're used to from libtcod should be present, but how it's accessed or used may vary greatly from the original.

Features

doryen

While this library is called doryen-extra, I didn't actually want to force it to be tied to the doryen-rs library, so functionality that pertains to it is behind the feature doryen. If you want to use this library without bringing in doryen-rs as a dependency, just put

[dependencies]
doryen-extra = { version = "...", default-features = false }

in your Cargo.toml file, which removes the default doryen feature.

libtcod-compat

This feature restores (on a best-effort basis) the functionality of the original libtcod library, where it has been modified. At the time of writing, the only change that will happen is to the float generation of the ComplementaryMultiplyWithCarry RNG algorithm.

rng_support

With this feature enabled, the Random struct implements rand_core::RngCore and rand_core::SeedableRng, which lets it be used in any place that accepts the rand crate RNGs.

serialization

With this feature enabled, all types for which it makes sense to serialize will implement serde::ser::Serialize and serde::de::Deserialize. NOTE: More types may get implementations for this in the future.

Missing Features / Toolkits

The following toolkits from libtcod have not yet been converted, with possible reason given in parenthesis:

  • bsp toolkit: 2D Binary Space Partition
  • fov toolkit: Easily calculate the potential visible set of map cells from the player position
  • image toolkit: Some image manipulation utilities (undecided on whether to convert this one; other crates may already serve this purpose)
  • list toolkit: A fast, lightweight and generic container, that provides array, list and stack paradigms (use Vec instead)
  • namegen toolkit: Allows one to generate random names out of custom made syllable sets (parts requires parse toolkit)
  • parse toolkit: An easy way to parse complex text configuration files

doryen-extra's People

Contributors

ilyvion avatar paulmaynard avatar

Watchers

 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.