Jump to content
Objectivism Online Forum

Your thoughts on my dice application?

Rate this topic


Prometheus98876

Recommended Posts

I am currently working on a dice rolling application (currently code-named Dice Box, an) as A)A good way to learn a little more about VB.NET and B)Because it is something I am interested in using and C)I have had some good feedback from people who think it is a somewhat useful idea/program. It will be Windows freeware, although I might do a Linux build in Qt one day.

The program is intended basically as one that rolls dice, d6s. d8's, whatever dice you want any number of them. You can even roll a 23d56 using the custom dice feature if you REALLY want to. A more complete feature set is below.

So far I am in the Alpha stage of devlopment, in that it does not currently contain all the features that I have so far planned for it, and some features do not work quite as planned or as well as planned, although I have very few actual known bugs in the program to date.

And all of the work has taken me very little actual time so far as one might expect, except the time I had to take to learn how to implement some of the stufff. Which is good as I have alot of other stuff to do at the moment anyway. This is one of the reasons I love VB so much :P

Anyway, Ive wandered off topic a little. The point of this thread is to find out whether anyone has any features they might like to suggest I include in the program.

Features so far planned/implemented:

The ability to roll xd2, xd3, xd4, xd6, xd8, xd10, xd12, xd20, xd30, xd100 or xdy, where x and y are user-defined values.

The ability to set modifiers to the dice rolls.

The ability to display averages of rolls.

The ability to drop individual die results under a certain threshold.

The ability to display individual die results.

The ability to take the best individual die results.

The ability to launch Windows Calc from the Toolstrip.

The ability to launch Wordpad from the Toolstrip.

The ability to clear the form using the Clear Toolstrip button or the Clear button.

The ability to save a table of your results.

The ability to cut values from the form and to copy them back again.

The ability to launch a Run dialog.

The ability to print a table of results.

And a few other features I am considering, but am not at all sure about at this stage....

If anyone has any other ideas/comments etc, please pass them on.

Link to comment
Share on other sites

What kind of random number generator are you using?

Well, the code I am using to generate the random numbers goes something like this:

Randomize()

randomnumber = CInt(Int((DiceType * Rnd()) + 1))

This is the advice the Help Index gave me on the subject, and it seems to work well enough.

Link to comment
Share on other sites

What kind of random number generator are you using?

That's funny, that was going to be my question.

Well, the code I am using to generate the random numbers goes something like this:

Randomize()

randomnumber = CInt(Int((DiceType * Rnd()) + 1))

This is the advice the Help Index gave me on the subject, and it seems to work well enough.

One warning: if you are planning to get statistical-grade results, and your features suggest you are, forget about Rnd (and pretty much any other standard VB functions). They're terrible.

Link to comment
Share on other sites

You could add more statistical options rather than just calculating the average (such as the median, mode, variance, standard deviation etc). Also, allow it to be called from the commandline and return the output in a sensible manner so that it can be piped to other programs in a unix-like environment. For instance, "rolldice -dicetype d10 -rolls 5" should output "3 4 5 7 10" etc, but you should have other command line arguments that control the output, eg "rolldice -dicetype d10 -rolls 5 -output mean" should just return the mean of the rolls rather than (or as well as, depending on your implementation) the individual rolls. A dice-rolling program like this seems more suitable for being used as a command line utility rather than a GUI type thing.

Edited by Hal
Link to comment
Share on other sites

For the random number generator, The Art of Computer Programming, Seminumerical Algorithms (Vol. 2) has a huge section dedicated to random numbers. Just a warning though, the learning curve in Knuth's books is pretty steep and it involves a lot of math. But that entire series is pretty much the programmer's bible so it is useful for much more than just random number generators.

Link to comment
Share on other sites

Well, I have decided to simplifty this program somewhat, in response to a few comments from gamers I have been talking to, my small team of Alpha Testers and my theories as to what it would be practical putting into such an application after a little research into the alternatives.

I have also decided to implement the statistical features in a seperate program of a similar nature designed to allow for all detailed reporting of such things. The intended audeince of [this version] of Dice Box (the current working title) do not I believe really want all the stastical features, and I see little point in offering them as at the same time the final version of this is on offer (for free on my website, as it is partially intended as a functional promotion for the Roleplaying Assistant program that will include it) the similar stastical program will also be on offer. Although I may at a later date incorporate these into one if I get enough people actually requesting this, but probably in Qt or something.

As for improving the random number generation process, well I will certaintly be looking into how I can do so, as it does a decent job of it as it is, but after more rigourous testing, I do think it could do better still so I will work on improving it.

Link to comment
Share on other sites

  • 3 weeks later...

I have finally gotten round to working on this again after taking a little break from some of my programming tasks lately, and after fixing some minor bugs, implementing a few things that somehow escaped me before (such as basic error handling) I have finally gotten round to improving the random number generator.

I still dont know if the current version of this is up to stastical tests, but it is certainly somewhat better as far as I can tell. I have adopted some simple code I found so that it uses System.DateTime, cursor position, RAM Usage and CPU Usage to make a seed. This should be random enough for this application at least.

Link to comment
Share on other sites

I have adopted some simple code I found so that it uses System.DateTime, cursor position, RAM Usage and CPU Usage to make a seed. This should be random enough for this application at least.
At the risk of saying something that might be obvious to some: are you reversing the digits of these numbers before using them (i.e. least significant becomes most significant)?
Link to comment
Share on other sites

  • 3 weeks later...
If you want some really random numbers, pull them via web service from: http://www.random.org/stats/

Oh thanks, I might actually look into this. I could change things a little so that the user has the option to do as you suggest while online, or the other way if they prefer that for some reason.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...