Bitcoin Forum
September 04, 2024, 10:19:57 PM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Dev question about accepting/sending payments for game  (Read 641 times)
toonevdb (OP)
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
August 14, 2012, 12:24:06 PM
 #1

Hello,

I'm planning on developing a small gambling game for bitcoin. I'm thinking of a wheel of fortune kinda game where the user has to select a multiplier and if the wheel stops at that multiplier the user has won his original bet times the multiplier.

Now I want to make the app as secure and easy to use as possible and would like to hear some advice if possible. I have 2 possible implementations in mind:

1. User provides his payout bitcoin address. Then gets a newly created address assigned and can deposit to that address. When deposit is confirmed, user can then bet multiple times until the deposited amount is spend. Each winning bet produces a payout to his bitcoin address. If the deposited amount isn't spend in 4 hours, the rest gets sent to the payout address.

2. User provides his bitcoin address and chosen bet amount. He then sends the amount from that address to app's bitcoin address. When the transaction has one confirmation, the browser updates the page and allows user to turn the wheel. (probably to slow and inconvenient because of wait, not sure..)

Any advice or opinions would be appreciated
Also do you think people would play the game?
John (John K.)
Global Troll-buster and
Legendary
*
Offline Offline

Activity: 1288
Merit: 1227


Away on an extended break


View Profile
August 14, 2012, 01:02:44 PM
 #2

Probably take a look at Satoshi Roulette: https://bitcointalk.org/index.php?topic=95816.0
zoinky
Hero Member
*****
Offline Offline

Activity: 811
Merit: 1000


Web Developer


View Profile
August 14, 2012, 03:25:40 PM
 #3

You are going to want to run your own bitcoind RPC server so you can get live feeds and statuses of accounts that are in the blockchain.  Or you can use a third part API, such as http://blockchain.info/api, if you don't have the resources to run one yourself.  But then you are relying on another system to provide information which I wouldn't suggest.  But to get started it might be a good idea to do it that way.  https://en.bitcoin.it/wiki/Running_Bitcoin is a good place to start reading about how to run a bitcoind RPC server.

As for handling payments, I would say on registration provide the user with a deposit address, and keep all the BTC they send to this address on there until they want to withdraw.  This will make people want to continue coming back to your site instead of automatically withdrawing the funds after 4 hours of inactivity.  Also when they withdraw allow them to provide a new withdraw address.  Some people don't like using the same address twice.

As for playing your game, I always would give it a try just to help the developer Smiley

Hope this helped!
Happy coding.
toonevdb (OP)
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
August 14, 2012, 10:53:13 PM
 #4

Thanks for the advice.
Satoshi roulette is cool. I considered this too but don't have the coin needed to payout when someone wins.
To start I would limit the wheel to one btc bets.

I was planning on running my own bitcoind service on a server.
The reason why I want to return the money after some time (and limit the deposit amount) is to avoid getting hacked. In the case I would get hacked the amount stolen would be far less I think. However the suggestion of providing an alternative withdraw address is something I would add to the app.

But I'm not sure a bitcoin wheel of fortune will be a great success. It isn't the most exciting game but does provide a quick gamble  Tongue
I would prefer to develop something a bit more exciting but something like a full-on poker game would be a bit too time consuming for a side project.
If I can't produce a better idea by the end of the month, I'll probably start this.
I'm eager to do something bitcoin  Grin
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!