Digital dice program with realistic physics engine, complete with realistic sounds and dice collisions

>digital dice program with realistic physics engine, complete with realistic sounds and dice collisions

Other urls found in this thread:

youtube.com/watch?v=rQtlTiYtKa0
twitter.com/SFWRedditGifs

Just as fucking stupid as Dice Towers.

>online chat with diceroll commands
>can only do one dice roll per line

>Tabletop Simulator with VR gear that lets you see to just the table but also the other players
>with optional extensions for Facerig and voice modulation

Rolled 19 (1d20)

What's dumb is that even without any experience in programming, you can learn to code a basic dice program in less than a day.

Hell, Veeky Forums's got one.

And it works better than those "physics" based ones.

>doesn't allow you to roll different kinds of dice in the same line
Into the trash.

Easy as that.

That's entirely untrue. Dice towers are good for identifying spackers.

>shake my phone
>sound effect sounds like there are that many dice in a dice cup (sounds like it's coming from my phone)
>sound carries as I stop shaking and flick my phone

All I want

Why is Ribbon so sexual?

Ribbon is for cute, not for lewds.

>Video+Voice online game
>Everyone use facerig

basic doesn't mean good.
using open source libraries and most "common" ways of rolling aren't really anything near random.

Why not both?

>most "common" ways of rolling aren't really anything near random.

They are by far and large "sufficiently" random for the purposes of a roleplaying game. We're not doing encryption work here.

This.

Even if it is just a modulo of the system time in milliseconds that's perfectly fine for an RPG. No one at the table will be able to accurately predict the results and any abnormalities in the distribution won't be large enough to really be noticed at the number of trials you perform in a campagin's play

Using the modulo gives a bad distribution in the general case. In the general case to do a range you want something like:

int getRandomInRange(int a, int b) {
for (;;) {
int x = getRandom();
if (x >= a) if (x

t. person who thinks Gnomoria is better than Dwarf Fortress

>having a function that could potentially run for ever
how about no

here, you earned it

How does a computer pick at random though?
Whats the code that allows it to think in a random manner?

google it, there's a lot of different ways. Can be explained much better than here in this thread.

holy shit user

This is actually the correct way to do things though.

The most basic, not to mention common, form of RNG is some series of mathematical operations performed on the integer expression of the system time. It's sufficiently 'random' such that a human won't be able to predict the result, not least because system time increments very quickly, but some formulas have a better spread of results than others.

A three-second short answer is that one way a computer generates a random number is taking a value like the current millisecond and putting it through an algorithm like squaring it and then taking the four middle digits to produce a number that's effectively unpredictable. It's not truly random, but it's close enough.

Some generate numbers through detecting physical changes in specific hardware nodes, others have considerably more complex algorithms, but it all boils down to taking some seed number and putting it through an equation blender.

>die models pull crazy bullshit that can only be attributed to quantum mechanics and all of your rolls remain shit
Jesus, this pisses me off more than it should.

>good enough
>not having your intellectual spirit risen by the challenge

>with optional extensions for Facerig and voice modulation
>qt oppaifu avatar sitting opposite of you
>opens her mouth
>talks about shit that happened at work that day in the deepest and most demonic voice imaginable

Sure. To avoid modulo we use an algorithm that has practically unbound execution time.

Let's assume 64 bit random numbers with flat distribution.

Now: roll 1d6.

2^64 potential values from RNG.
6 of them will terminate the loop.

Assume 1 billion iterations / second.

Assuming perfectly uniform distribution,
96076792 seconds until you arrive to a valid number.

= 1601279 minutes
= 26687 hours
= 1111 days
= 3 years

I'm also completely ignoring the issue of depleting entropy completely and making anyone capable of guessing the next PRNG output is one of 6 potential values.

Do you still insist it is the correct way, instead of division to avoid modulo?

youtube.com/watch?v=rQtlTiYtKa0

Thank you for explaining why he was so clusterfuckingly wrong in such a precise manner. You are a gentleman and a scholar

Without even going into the algorithm (which the smarter user explained), you kept reinitializing x within the loop.
This is a week 2 of CS101 kinda mistake, you silly goose. Please take more time to think next time you try coding.

...you realize that is intentional and definitely not the flaw right?

if he assigned x a value outside of the loop, the loop would be redundant.

you realize he said initialize x and not assign a value to it, right?

>A USB mouse or keyboard that also functions as a flash drive with the ability to actually copy and then paste between entirely different systems

yep.

its perfectly valid/functional code, with exception to the runtime issue, and distribution

I'm not saying it is wrong, it's just bad practice and a terrible style.

>terrible style
debatable

as a general rule, i always declare a variable in the smallest scope possible to reduce memory footprint and the likelihood of shadowing/conflicts.

in any case, its definitely not a week 2 cs101 mistake

Usually most people are concerned more with the time footprint sine computers have shittons of memory. But hey, you do you.

I just want an AI dungeon master so I can run games for myself without being a weirdo and making a tulpa.

T. Forever DM

>time footprint
I already mentioned the time issues of that algorithm, never said it was good on that front.

What is the Nintendo Switch?

"Random" numbers are actually completely deterministic, just based on inputs that are close to random and hard to observe or modify.

For example, whenever you press a button on your keyboard, your computer takes the time in nanoseconds, throws away all but the last few digits, and feeds the result into another algorithm, then puts the result of that into a list of random numbers that gets drawn from when a program wants a random number.

Technically you can use some hardware sources as inputs (e.g. noise) for a non-deterministic rng.

I'd probably burst out laughing every time they talked until I got used to it.

I'll endorse it if it let's me drag-select any number of dice (imagine how you select in an rts) to roll them. Typing into a dice roller sucks.