Simple random number generator?


Userlevel 7
Badge +14

Would there be a quick and dirty way to create a random number widget/addin which could be used for things like simulating a coin flip or rolling a dice? 

Right now, I’m using an external URL to Google Dice but would prefer something which didn’t require learners to jump out of their class boards.

Thanks!

Kiron


42 replies

Userlevel 7
Badge +14

The closest I’ve been able to come with my (VERY STALE) development background was to open the Developer Tools panel in Chrome, and paste this into the console “alert('You rolled a ' + (Math.floor( Math.random() * 6 ) +1));

This works, but it is a kludgy solution. My preferred option would be a simple button in the bottom bar which would pop up the alert when you click on it.

I’m guessing this would take a Miro developer all of half an hour to develop & test it so hopefully this inspires one of them :joy:

 

 

Userlevel 7
Badge +14

I found the following code which uses a third-party site to do this. I dropped it into an iframe widget and it works but is still a bit kludgy:

<iframe src="https://www.random.org/widgets/integers/iframe.php?title=Roll+The+Dice&amp;buttontxt=Roll&amp;width=160&amp;height=200&amp;border=on&amp;bgcolor=%23FFFFFF&amp;txtcolor=%23777777&amp;altbgcolor=%23CCCCFF&amp;alttxtcolor=%23000000&amp;defaultmin=1&amp;defaultmax=6&amp;fixed=on" frameborder="0" width="160" height="200" scrolling="no" longdesc="https://www.random.org/integers/">
The numbers generated by this widget come from RANDOM.ORG's true random number generator.
</iframe>

Userlevel 7
Badge +18

Hi Kiron,

it works - thanks for sharing.

Whats nice is that the rest of my board gets greyed out and this tool gets into the focus.

Michael

Userlevel 7
Badge +14

Thanks Michael! 

It is still a bit of an ugly solution as you can’t customize the look of the iFrame box and I’ve been unable to get the external widget to use different text labels or colors. 

Perhaps @Boris Borodyansky will find a half-hour of spare time on his hands to whip up a quick bottom bar app for us :joy:

Kiron

Userlevel 4
Badge +8

I’ll see what I can do… :stuck_out_tongue_winking_eye:

Userlevel 7
Badge +14

Awesome @Boris Borodyansky - it would be great to have a native widget vs. the kludge of an iFrame based 3rd party site.

Kiron

I also need the dice roller desperately! Trying to find something, but nothing works but the one Kiron suggested. The problem of this “dice” is that only the person who rolls it can see the result. Working with children I can´t always trust the numbers they say they get :sweat_smile: ! So, @Boris Borodyansky I will also be terribly grateful for your kind support! 

Alexandra

Userlevel 7
Badge +14

@Aleksandra Dmitrieva -

A solution (third-party) was provided here: https://community.miro.com/wish-list-32/randomizer-dice-coin-percent-etc-283

Kiron

Userlevel 3

Hello everyone!

Our development team has created just such a plugin.

The plugin is a dice that you can click on to get a random number. You can use this plugin to play some games or randomly select a person or whatever you want.

You can see how it works in this post: https://twitter.com/domagic4people/status/1301814827501924352 

If you want this plugin, you can write me a personal message or reply in this topic :slight_smile:

 

@Alexander Kuznetsov I would love to know more about this plugin! I'm working on a project in school learning game design

Hello everyone!

Our development team has created just such a plugin.

The plugin is a dice that you can click on to get a random number. You can use this plugin to play some games or randomly select a person or whatever you want.

You can see how it works in this post: https://twitter.com/domagic4people/status/1301814827501924352 

If you want this plugin, you can write me a personal message or reply in this topic :slight_smile:

 


how to get this plugin?

Hi @Alexander Kuznetsov 

Very interested to use the random number plugin

We are developing a board to host a multi-day workshop and have a collaborative exploration/synthesis frame where we need a bounded random number generator.

I watched the demo video on the twitter link.  When will the “dice” go live?

Many thanks

Leo

Userlevel 3

Hi @Leo Caves !

The plugin is already available. I will send a link to install it in personal messages.

Hi @Alexander Kuznetsov

Many thanks Diceman!

We’ll feedback on our experiences...

Hi @Alexander Kuznetsov

This is really a great news! I was just looking for a solution for having a dice inside my board… :-) 

Can you please send me the plugin?

Thanks a lot in advance!

Chiara

 

Good morning, @Alexander Kuznetsov

I’m so excited to try the dice, would you be so kind to send me the plugin!?  

Thank you so so so much!!!

KD

Userlevel 3

@Karen Danielson Sure!

Hi Alexander, 

would be very interested in the plugin as well. birthday for my son…

thx verx much

Achim

Hello Alexander,
Great work! I’m also interested, if you can send me the link. We would like to use for a role-playing game.
Thanks!

Hi Alexander, same to me - I would love to give it a try!

Userlevel 4
Badge +7

I’d like to try it, too. Thanks!

Hi Alexander, What a nice plugin :) !! I would love to try with my colleagues in the workshop. Thanks !! 

Hello Alexander, I would like to try it out for my research session too, thank you very much. 

@Alexander Kuznetsov Could you please send me the plugin

 

Hello @Alexander Kuznetsov , could you please me the plugin? Cheers, Christoph

Reply