Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Future features #14

Open
2 of 11 tasks
frankieali opened this issue Mar 6, 2022 · 7 comments
Open
2 of 11 tasks

Future features #14

frankieali opened this issue Mar 6, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@frankieali
Copy link
Contributor

frankieali commented Mar 6, 2022

Idea list for future features

  • die animation effects such as fade out, dissolve, burn away, explode, glow, and pulse
  • additional event callbacks such as beforeRoll, afterRollComplete, beforeResult
  • seeing how instance buffers might be leveraged within BabylonJS
  • dynamically load PBR material or standard material. PBR materials are about 3x - 5x heavier so would want to make this an opt-in feature
  • make lighting an importable scene. Set up your lighting in Blender and bring it into the dice roller
  • make various material textures optional such as bump map and specular map
  • when dice explode, set the explode point to be over the die instead of a new toss in from the edge (as an optional param)
  • add configurable performance options
  • camera focal point and motion blur effects (aka post-processing effects)
  • additional dice such as d2, d14 and d30 used in other systems
  • detect collisions and trigger sound effects, possible onCollision callback event
@frankieali frankieali added the enhancement New feature or request label Mar 6, 2022
@fromi
Copy link

fromi commented Jun 16, 2022

Hi @frankieali,
I founded Game Park (https://game-park.com/) to offer online board games adaptations.
I would love to use this library, however the result of any dice throw is provided by the server (to prevent any cheating of course). I think that's not compatible with the library actually, but I would love to see a feature to animate dices with a predictable result!
Bravo for the great work anyway 👍

@frankieali
Copy link
Contributor Author

Hi @fromi. You are not the first to request this. Also here #29. Currently, I just start the dice rolling and let the physics resolve themselves. I don't even know how I would approach this problem. I don't believe AmmoJS, used for physics, is a deterministic engine. This link offers me a clue though https://www.reddit.com/r/gamedev/comments/bq6c5d/deterministic_physics_dice_rolls_in_a_non/

@fromi
Copy link

fromi commented Jun 16, 2022

Yes, I already studied that: http://a.teall.info/dice/
And I came to the conclusion it would be quite a challenge to produce a deterministic output, given the extensive use of random values at every bouncing. The solution you are pointing at was also my conclusion, but I cannot spend the time on it unfortunately :/

@frankieali
Copy link
Contributor Author

Ok, I took a deep dive into this yesterday. It's not impossible. I added it as an enhancement #47. It'll take some time though.

Overall, I think this is a very valuable feature to have and a core requirement for many people who would want to use this library. It'll also open up options for dice parsers. I've always liked the features offered by RPG Dice Roller.

@marvink
Copy link

marvink commented Jul 23, 2022

The sound effects would be awesome and adds a lot to the flavour.

@MaritFischer
Copy link

Would love a way to interact with the dice, for example click on a dice and 'lock' that dice, then re-roll all other dice except for the locked once. So some sort of onClick event listener.

@frankieali
Copy link
Contributor Author

@MaritFischer Clicking on dice involves importing all the ray tracing capabilities of the 3D library. I chose to leave these features out of the package in order to keep the package size small. It's a lot of overhead. The dice all become static at the end of a roll. Dice can be removed and added individually. I would suggest presenting a UI component that allows the user to lock dice. Then you know what to re-roll.

I may come back around to adding raytracing click events in the future. It seems including more features is outweighing package size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants