Skip to content

Dice throwing, using physics, and cheating to make the outcome predictable. Using Castle Game Engine

License

Notifications You must be signed in to change notification settings

castle-engine/castle-dice-throwing

Repository files navigation

Dice Throwing

Throw a 6-sided dice, using physics, watch how it rolls.

Despite using the physics simulation (so it looks nice and random), the result is predetermined from the start. (This is achieved by first running physics simulation invisibly and then rotating the actual displayed dice to match the known end rotation.)

Using Castle Game Engine.

Note that a debug build (with DEBUG symbol) shows additional UI to tweak physics parameters.

Screenshot

Play and Download

Play the web version without installation: https://castle-engine.io/web-demos/castle-dice-throwing/

Desktop versions (Windows, Linux): download release here: https://github.com/castle-engine/castle-dice-throwing/releases/latest

Copyright and License

Copyright: Michalis Kamburelis.

License: BSD-3-Clause license, see LICENSE for details.

Except the dice 3D models, which are created by various artists (see data/AUTHORS.md) and are licensed under CC Attribution.

Building

Compile by:

  • CGE editor. Just use menu items "Compile" or "Compile And Run".

  • Or use CGE command-line build tool. Run castle-engine compile in this directory.

  • Or use Lazarus. Open in Lazarus castle_dice_throwing_standalone.lpi file and compile / run from Lazarus. Make sure to first register CGE Lazarus packages.

  • Or use Delphi. Open in Delphi castle_dice_throwing_standalone.dproj file and compile / run from Delphi. See CGE and Delphi documentation for details.

About

Dice throwing, using physics, and cheating to make the outcome predictable. Using Castle Game Engine

Resources

License

Stars

Watchers

Forks

Packages

No packages published