Giter VIP home page Giter VIP logo

tacadados's Introduction

Owlbear Rodeo Dice

Beautiful 3D dice extension for d20 based systems

Example

Installing

The extension can be installed from the store page.

How it Works

This project uses React for UI, Three.js for rendering and Rapier for physics.

The physics simulation is used to both generate the animation for the roll as well as the final roll values.

Wait is it really random if physics is used to determine the result? How do I know the dice rolls are fair?

Short answer yes, the dice are fair. Long answer here's a statistical analysis of the rolling methodology.

In order to sync rolls over the network efficiently we rely on the fact the Rapier is a deterministic physics engine. This means that across two different computers we'll get the same result given the same initial parameters.

So we only need to make sure that all the initial parameters are synced and then each client can run its own simulation and end up with the correct animation.

To try out the dice roller outside of Owlbear Rodeo you can head to https://dice.owlbear.rodeo/.

Building

This project uses Yarn as a package manager.

To install all the dependencies run:

yarn

To run in a development mode run:

yarn dev

To make a production build run:

yarn build

Project Structure

All source files can be found in the src folder.

If you'd like to create a new dice set with the existing dice styles edit the diceSets.ts file in the sets folder.

If you'd like to add a new dice style the 3D models for the dice are split across four folders: materials, meshes, colliders and previews.

The materials folder contains the PBR materials for each dice style.

The meshes folder contains the 3D geometry used for the dice.

The colliders folder contains the simplified collider geometry for the dice.

The previews folder contains 2D image previews for each dice.

All the code specific for the Owlbear Rodeo extension is in the plugin folder.

License

GNU GPLv3

Contributing

This project is provided as an example of how to use the Owlbear Rodeo SDK. As such it is unlikely that we will accept pull requests for new features.

Instead we encourage you to fork this repository and build the dice roller of your dreams.

Copyright (C) 2023 Owlbear Rodeo

tacadados's People

Contributors

mitchemmc avatar kratoscheky avatar nthouliss 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.