Bitcoin Forum
December 12, 2024, 06:31:17 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Dice Site - How to?  (Read 1934 times)
smeagol (OP)
Legendary
*
Offline Offline

Activity: 1008
Merit: 1005



View Profile
October 20, 2013, 05:46:44 PM
 #1

How do people make dice sites?

Is it just something like this:

<?php
$client_choice = (user input)
$number = rand(0,1000);
if $number == $client_choice {
send bitcoins!;
}
else {
keep bitcoins for yourself!;
}
?>
imrer
Full Member
***
Offline Offline

Activity: 154
Merit: 100


View Profile
October 20, 2013, 09:08:15 PM
 #2

I'll have a casino game wheel of fortune for sale. PM me in 4 days, if you are interested.

Start your own casino site: » CoinDice | CoinWheel «
devthedev
Legendary
*
Offline Offline

Activity: 1050
Merit: 1004



View Profile
November 03, 2013, 06:03:03 PM
 #3

smeagol, usually they're provably fair. rand( is not provably fair.

smeagol (OP)
Legendary
*
Offline Offline

Activity: 1008
Merit: 1005



View Profile
November 03, 2013, 08:06:15 PM
 #4

smeagol, usually they're provably fair. rand( is not provably fair.

How?
trcjr
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
November 03, 2013, 10:13:39 PM
 #5

If srand is seeded with a known value then the random numbers it generates will be reproducible. After the random number is generated the seed to srand is published.
smeagol (OP)
Legendary
*
Offline Offline

Activity: 1008
Merit: 1005



View Profile
November 08, 2013, 10:25:28 PM
 #6

How do you make a script which automatically either doubles or keeps a senders money?

I think that is easier to do.
EventualCoinMillionaire
Member
**
Offline Offline

Activity: 83
Merit: 10


View Profile
January 31, 2014, 06:48:09 PM
 #7

I would definitely like to hear more about this.

BTC 1juX6F2mgRCMS6meMmH8yjtDXD16GwVfm
DOGE DFznCPX2usMnxzVto2hmcMckhPGyXWVXrZ
RDD RcCqrHqmVh1jF197psMBiYPGdtnoQwREVQ
roslinpl
Legendary
*
Offline Offline

Activity: 2212
Merit: 1199


View Profile WWW
January 31, 2014, 06:58:53 PM
 #8

True, if you want to make a good proffable game you need to
use kryptography Smiley

Ins
Full Member
***
Offline Offline

Activity: 196
Merit: 100


View Profile
January 31, 2014, 07:36:20 PM
 #9

For example, I can explain how system works at satoshidice.com
There are secret key for every day of year. If you play today - you see only sha256 hash of secret key.
Secret key is random generated value of a-Z0-9.
Most of dice websites using hmac_sha512 function.
As you know, each transaction have it's transaction id (sha256 hash).
Depending on tx id lucky number is generated.
Satoshidice use's hmac sha 512 function like hmac_sha512(txid:nonce, secret_key_plain);
On day after, you can see plain secret key and verify your yesterday bet Wink
Read http://php.net/manual/en/function.hash-hmac.php, if you use PHP
MakeBelieve
Hero Member
*****
Offline Offline

Activity: 602
Merit: 500


View Profile
January 31, 2014, 07:42:35 PM
 #10

Is it simple to make the dice game provably fair it doesn't make sense to me at the moment.

On a mission to make Bitcointalk.org Marketplace a safer place to Buy/Sell/Trade
RoooooR
Legendary
*
Offline Offline

Activity: 1008
Merit: 1000


GigTricks.io | A CRYPTO ECOSYSTEM FOR ON-DEMAND EC


View Profile
February 01, 2014, 10:04:52 PM
 #11

How do people make dice sites?

Is it just something like this:

<?php
$client_choice = (user input)
$number = rand(0,1000);
if $number == $client_choice {
send bitcoins!;
}
else {
keep bitcoins for yourself!;
}
?>


The payout part for the dice game(just-dice etc..)

Code:
(1/(chance/100)*((100-house_edge)/100))






            █ █ █ █ █
         ██           ██
       ██     █ █ █ █   ██
     ██    ██        ██
   ██   ██               
  ██   ██     ████████                  ██████████
            ███          ██   █████████     ██      ██████  ██   ███████  ██    ███   ███████
 ██   ██    ███              ██      ███    ██      ██          ███       ██   ███  ██
 ██   ██    ███  ██████  ██  ██      ███    ██      ██      ██  ███       ██  ███   ██
            ███      ██  ██  ██      ███    ██      ██      ██  ███       ██████     ███████
 ██   ██    ███      ██  ██  ██      ███    ██      ██      ██  ███       ██  ██           ██
             ██      ██  ██  ██      ███    ██      ██      ██  ███       ██   ███         ██
 ██   ██      ███████    ██   █████████     ██      ██      ██   ███████  ██    ███  ███████
  ██   ██                           ███
   ██    ██          ██            ███
     ██    ██ █ █ █ █   ██
       ██             ██
          █ █ █ █ █ █
























Telegram     Facebook     Twitter     Medium
-------------------------------------------------------------------
.WEBSITE. |█| .WHITEPAPER.












......BOUNTY......
-----------------------------------
..ANN THREAD..
smeagol (OP)
Legendary
*
Offline Offline

Activity: 1008
Merit: 1005



View Profile
February 02, 2014, 10:45:34 PM
 #12

It's easy to make the game, the hard part is implementing bitcoin.
Ins
Full Member
***
Offline Offline

Activity: 196
Merit: 100


View Profile
February 03, 2014, 01:50:22 PM
 #13

It is not hard.
It depends on your selection: Libraries OR Bitcoind JSONRPC
if you want to use some libraries and work without bitcoind - it would be enough harder.
It will be easier if you will use JSON RPC it is easy to create address, check transactions, send money Smiley
jontstaz
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
February 03, 2014, 11:03:27 PM
 #14

It is not hard.
It depends on your selection: Libraries OR Bitcoind JSONRPC
if you want to use some libraries and work without bitcoind - it would be enough harder.
It will be easier if you will use JSON RPC it is easy to create address, check transactions, send money Smiley

Exactly this. If you want you can even use the Block chain RPC API.
smeagol (OP)
Legendary
*
Offline Offline

Activity: 1008
Merit: 1005



View Profile
February 04, 2014, 02:31:31 AM
 #15

It is not hard.
It depends on your selection: Libraries OR Bitcoind JSONRPC
if you want to use some libraries and work without bitcoind - it would be enough harder.
It will be easier if you will use JSON RPC it is easy to create address, check transactions, send money Smiley

Exactly this. If you want you can even use the Block chain RPC API.

It's just that I don't want to hit the cap on the API and get blocked
jontstaz
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
February 05, 2014, 03:35:28 AM
 #16

It is not hard.
It depends on your selection: Libraries OR Bitcoind JSONRPC
if you want to use some libraries and work without bitcoind - it would be enough harder.
It will be easier if you will use JSON RPC it is easy to create address, check transactions, send money Smiley

Exactly this. If you want you can even use the Block chain RPC API.

It's just that I don't want to hit the cap on the API and get blocked

I wasn't aware of a cap. What is the cap out of interest?
smeagol (OP)
Legendary
*
Offline Offline

Activity: 1008
Merit: 1005



View Profile
February 05, 2014, 02:55:53 PM
 #17

I wasn't aware of a cap. What is the cap out of interest?

Requests in 8 Hours: 3 (Soft Limit = 28800, Hard Limit = 28900)
Requests in 5 minutes: 3 (Soft Limit = 700, Hard Limit = 725)

(That is from their site)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!