Solved

Programming a dice roller

Posted on 2001-08-22
6
455 Views
Last Modified: 2012-08-13
Hello,

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.
0
Comment
Question by:Calith
6 Comments
 
LVL 48

Accepted Solution

by:
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 www.borland.com under Community, Musuem.  Visual Basic you will have to give Microsoft money.  There are free Java compilers out there..
0
 
LVL 22

Expert Comment

by:CJ_S
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.

Regards,
CJ
0
 
LVL 11

Expert Comment

by:griessh
ID: 6417519
Calith

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.

======
Werner
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

Author Comment

by:Calith
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
0
 
LVL 11

Expert Comment

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

======
Werner
0
 

Author Comment

by:Calith
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.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
wordcount challenge 11 121
Installed softare without GUID 6 73
PHP question(s) about order of output 9 62
Export Table to CSV - Access to CSV - using python 18 136
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This is an explanation of a simple data model to help parse a JSON feed
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 …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

785 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