Programming a dice roller

Posted on 2001-08-22
Last Modified: 2012-08-13

I want to create a program that will randomly roll dice for me.  I want to be able to use it to roll different sided dice, roll multiple times and multiple #'s of dice with bonuses added or subtracted.

What would be a good language to use to do this and what programs or software will I need to do so.

I don't really have any programming experience but am willing to learn.
Question by:Calith
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 49

Accepted Solution

dbrunton earned 200 total points
ID: 6416061
Probably any of the following languages would do it.

Pascal, C, Visual Basic and Java.

C and Java are similar enough so that if you know one you know a good part of the other. Can be awkward to learn.  Can't speak on Visual Basic.  Pascal is considered a language for leaning to program but is good enough to do the job.  Easy enough to learn.

You can download free C and Pascal compilers from under Community, Musuem.  Visual Basic you will have to give Microsoft money.  There are free Java compilers out there..
LVL 22

Expert Comment

ID: 6416596
Depends on what exactly you want to do. You have decided to create a dic rolling program. But that can imply a couple of things. That you only want a random number to be generated (and all languages have their way of doing that), or that you want a true graphics program in which you see the dice rolling and the numbers on it.

For the first: any language will do.
For the latter: you should look into an SDK like DirectX or OpenGL.

LVL 11

Expert Comment

ID: 6417519

I would suggest to start with a BASIC program. You shouldn't create a fancy Graphical User Interface, just print the results on the screen.
BASIC has the major advantage that you don't have to deal with compilers, data types etc. It's kind of instant results (and Visual Basic is a nice toy for that kind of programming).
If you want to learn a programming language, you shouldn't start with a project like this, you need a more basic understanding of a programming environment. Borland's Pascal is a wonderful tool, it doesn't get you into these ugly things like pointers :-) right away.

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI


Author Comment

ID: 6420279
Well, I managed to find a good roller program that does exactly what I wanted it to do, so now I don't need to do it myself.  thanks for the help though
LVL 11

Expert Comment

ID: 6420451
Jeez, then why didn't you delete th equestion instead ...


Author Comment

ID: 6420461
Cause I just found it a little while ago and dbrunton answered so promptly that I decided to give him the points.  He pointed me to the programs and they would have done what I wanted.  But when I finally found the same program I wanted to create I figured why kill myself trying to learn a language if the work is done for me already.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question