Bitcoin Forum
August 08, 2022, 08:30:54 AM *
News: Latest Bitcoin Core release: 23.0 [Torrent]
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 [10]
181  Bitcoin / Bitcoin Technical Support / Re: Accepting Bitcoins in an online game on: May 21, 2010, 04:06:09 PM
It sounds like getting it fully automated might be easier on you.  Bitcoin is fully capable of that, but I don't know how easy it will be for your situation.  Is Python good for you?  Where is the user's information normally stored?

For ATITD we store everything on the server, which is a C++ program that periodically (every 3 minutes) writes its state to a checkpoint file. The server can pretend to be a web browser - we should be able to run bitcoin as a daemon and use JSON-RPC to generate an address for each payment.

In detail, we would:
1. Have the user request to pay by Bitcoins, using the game client.
2. Have server contact the daemon and asks for a new address.
3. Store that address in the player's record as an unconfirmed payment.
4. Tell the player the address to send the Bitcoins to.
5. Periodically poll the daemon for any recent payments, and change any unconfirmed payments to confirmed.

Here are the problems that I see: (Still wrapping my head around some of this!)
1. Suppose the server crashes after we've generated the address, but before the checkpoint has completed writing (so, up to 3+3=6 minutes), a payment could show up but we'd have no way of knowing what character it was for.
2. A running daemon is one more thing that could fail.

Have I overcomplicated the process? It's too bad that there's no way to embed a message in a payment; if there was, the process would be:
1. User sends payment to the one address that we publish, and writes his character name in the message field. Easy for the user and no game UI required.
2. Periodically poll the daemon for any recent payments, crediting accounts based on the message field.

In this scenario, the daemon would still need to be running for the credit to show up in the user's account, but not for the user to make a payment. In no event would the payment get lost.

Now, practically speaking, the server crash scenario isn't a problem for ATITD, because we're a small game and Bitcoin payments will be a tiny fraction of all payments. But PayPal became popular because it was *so* easy for both merchants and users to understand the "send money to an email address" metaphor.

"Send money to this weird looking address" isn't that much harder to grasp. "Send money to a different address every time", or "send money to an address that I'll tell you in a minute but which will be unique for you" is a bigger leap though.

I don't understand the data structure of "a bitcoin" enough yet to suggest a solution.
182  Bitcoin / Bitcoin Technical Support / Accepting Bitcoins in an online game on: May 20, 2010, 07:12:30 PM
I'm accepting Bitcoins now for A Tale in the Desert.

I'm aware that the correct way to do it is to generate a new address for each payment, but I don't yet have the code to generate new addresses in the server. (If someone could point me to such code I'd appreciate it; I spent a few minutes poking around the source but haven't found it yet.)

But let's say that I do have the means to generate a new Bitcoin address on the fly. A player tells the game client that he wants to subscribe. I generate an address and tell him "Send 2000 BTC to <address>", and then when the Bitcoins show up I credit his month of playtime.

Once I have a list of all the "throwaway" addresses that I've created, how do I then go about watching all of them for incoming Bitcoins and forwarding them to my "real" account?

What would be ideal (in my situation anyway) is for there to be a message field as part of a transaction, and then I could just tell everyone to send to my main Bitcoin address and include their character name in the message. It looks like this is supported when sending to an IP address, but not when sending to a Bitcoin address. There must be a reason for this - anyone know what that is?


183  Economy / Marketplace / Re: We accept Bitcoins on: May 19, 2010, 10:33:33 PM
Hmm - is there any text field associated with an address based transaction? It does make accepting Bitcoins a bit more cumbersome. Would including such a text field as part of the protocol compromise anonymity somehow?

Hypothetically, a short text message could be encoded into transactions by charging, say, 2000-2000.999999 Bitcoins and encoding the text portion in the fractional part of the amount.

Or does that solve a problem that doesn't exist?

Is there already a protocol in place to say "make me a new address to send BTC to" ?
184  Economy / Marketplace / A Tale in the Desert now accepts Bitcoins on: May 19, 2010, 05:18:33 PM
I run the MMO A Tale in the Desert. We charge $13.95/month for the game, and pay about $0.74 in merchant and gateway fees.

We'll now accept Bitcoins as an alternate payment method. The price per month is 2000 BTC, which according to the exchange is a discount right now.

Visit and download the game client. Native Windows, Linux and OSX versions are available.
Install + Run the client, and create a trial character.
If you like the game, send 2000 BTC to: 17CJvRrNdqSPN3Zs2dWfNY6GoCiMRfNG2T to activate your account.
In the message field, include your character name and shard; I'll then credit you for a month of gameplay.
Right now this is done manually, so the lag could be anywhere from minutes to the next morning.

Pages: « 1 2 3 4 5 6 7 8 9 [10]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!