Skip to Content
 

Computerized Dealing of Cards and Rolling of Dice

5 replies [Last post]
Tom Kyle
Offline
Joined: 03/14/2011

Does anyone know of some open-source software that displays the dealing of a standard 52 card deck that can be modified a bit to handle some special changes and/or software that displays the rolling of dice, both in a fair and random order as would be the case in reality?

loonoly
loonoly's picture
Offline
Joined: 02/12/2011
Code or program?

Are you looking for code snippets to add to a program or are you looking for something self-contained?

If self-contained, how are you planning on integrating it into your own product?

The idea of fair and random is a problematic one. Computers generate pseudo-random numbers and shouldn't be trusted for true randomness. Check-out random.org for more information:

http://www.random.org

If you are building a web app or any application that relies on an internet connection, there is a simple methodology to generating numbers using random.org.

Try something like this:

http://www.random.org/integers/?num=48&min=1&max=6&col=4&base=10&format=...

where:
num= the number of results you want - 48 rolls here
min= the lowest value you want in a result (typically 1) - 1
max= the highest value of a result (6 for a 6 sided die) - d6
col= columns of display - in 4 columns
base= number base (use 10 for this unless you are looking for hex, octal or some other results) - decimal
format= plain to display it in general text for easy parsing in a program - plain text
rnd= new for new results - new results

However, there are some usage restrictions, so read the site carefully.

magic_user
magic_user's picture
Offline
Joined: 07/28/2008
Card and Dice examples

Not open source, but public domain should work. I'm not saying these are good examples, but they'll get you started. Visit my website at http://unfinishedgames.dynalias.net/. Look at PokerSquares for cards and InstantCounterstrike for dice. For a variation on dice, try CatanDice. Download the (Java) source and take a look.

Jim

Dralius
Dralius's picture
Offline
Joined: 07/26/2008
Thoth

I believe that Thoth will do what your looking for.

http://digilander.libero.it/zak965/thoth/

Tom Kyle
Offline
Joined: 03/14/2011
Cards and Dice

Thanks for your response. Sounds like you know your stuff. I'm at work now so can't go long, but will be back to discuss later after I've checked out your suggestions. I am not a programmer so I don't know what I don't know in that regard. We are in the early stages of putting the game together but will be looking for help before long. Will keep in touch.

CloudBuster
Offline
Joined: 04/14/2009
If you're not a programmer....

...you could try a program called Game Maker from www.yoyogames.com

The free version should allow you to get your feet wet and help you decide if you want to continue. The support from the forums is really good. All the games on the site were created with Game Maker. They're free to play. Some are great. Some less so...but you can probably tell the wheat from the chaff by looking at comments and the number of times people have played the games.

I was able to create a Space Invaders clone using my boss' head as the aliens. It took be about 3 months of work (not solid...just as I felt like doing it), but I had to learn a bunch of other stuff...Paint.NET (for manipulating the .jpg's I used...I can't draw and .jpg's are terrible things to use as sprites but they're usable if you clean them up properly). Wavosaur (for sound...I needed to splice some sounds together and this intuitive, free program did the job perfectly.)

Game Maker uses a Drag and Drop interface, so no programming knowledge is required. However, there will probably be a decent learning curve before you get the hang of things. The tutorials on the site are pretty good and if you really want to get into it, you can get a book called "The Game Maker's Apprentice" which will give you instructions for making 9 games. After Chapter 4 I had enough knowledge to build my game.

OH! I see you said "we" are in the early stages of putting the game together...does that mean you DO have a programmer?

Are you trying to incorporate the computer generated results into a board game? This IS a board game forum after all :) <--I'm not squawking at you...just wondering why you came here for computer/programming questions. As you can see, most everyone is helpful and I'm sure the forum members can help you out with design/mechanics questions regardless of the medium in which you choose to present your game.

-CB-

Syndicate content


forum | by Dr. Radut