Author

Topic: Game development <--> Currency APIs? (Read 1006 times)

legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
July 15, 2013, 09:58:13 PM
#8
There is always the http://bitcoindevkit.com It works with PHP and Bitcoin JSON or any JSON RPC bitcoin server like Blockchain.info there is a C++ version coming out in the future but for now you can link into the PHP CLI with your game Smiley
donator
Activity: 640
Merit: 500
July 15, 2013, 04:23:34 PM
#7
So I am thinking that the purchase will happen in-game ? therefore we need some sort of overlay with an iframe to allow for the invoice to be shown. One could use BIPS embedded Invoice each time a player wants to purchase "gold" https://bips.me/embedded simply generate this invoice with a custom variable containing the players "user id".



However this would require a system able to receive Instant Payment Notifications from BIPS as to update the in-game currency.

Another way would be to create a C# framework, I have chosen C# as this is one of my main languages. This C# framework could be created as an dll to be included with say BIPS as namespace, and included in games. This would give the possibility of simple running:

BIPS.CreateInvoice(100, 'USD', 'Gold', 'userid', function(err, res) {

  /**
    Example response (Bitcoin address, and amount)
   */

  ShowInvoice(res.address, res.amount);

});

private function ShowInvoice(string[] address, double amount)
{
    /**
    Display a nice payment window to the user using DirectX Hardware Overlay.
   */
}

member
Activity: 98
Merit: 10
Invest NASDAQ in Bitcoin
legendary
Activity: 4270
Merit: 4534
July 14, 2013, 01:01:00 PM
#5
Well, it might work as leaving it as BTC. I'm just concerned about security though. If someone hacks the in-game currency, they might wreak havoc in-game, but if someone manages to get into the BTC wallets, that'd be far more devastating.

Also, sorry about the wrong forum. If a mod would like to move this, that's fine. I was under the impression that the dev forum was strictly for BTC itself, and not other/related projects.

the actual bitcoin stays safe in offline wallets once you sweep them from users individual addresses.. so they are safe..but what the last person meant was rather then having the game DATABASE call the balance.. gold or rabbit credits.. how about just name them bitcoins or satoshi's depending on how much division you want.
newbie
Activity: 52
Merit: 0
July 14, 2013, 12:46:53 PM
#4
Well, it might work as leaving it as BTC. I'm just concerned about security though. If someone hacks the in-game currency, they might wreak havoc in-game, but if someone manages to get into the BTC wallets, that'd be far more devastating.

Also, sorry about the wrong forum. If a mod would like to move this, that's fine. I was under the impression that the dev forum was strictly for BTC itself, and not other/related projects.
hero member
Activity: 490
Merit: 500
July 13, 2013, 11:04:12 PM
#3
Sounds like a great idea, though I agree this should probably be in the development forum.

I have a question though: why bother with a separate in game currency?  Why not just use bitcoin as the currency of the game?
legendary
Activity: 4270
Merit: 4534
July 13, 2013, 10:54:33 PM
#2
depends if you want to link it to a bitcoin-qt, or blockchain.info wallet to control the fund inputs.

the laymans wording of what is required is
create a new bitcoin address when a user signs up to your service. log this public key on the members database and put the private key somewhere safe away from the game server.

have an api that checks the balance of the public keys and then adds value to the memebers balance in the game database.

blockchain.info has some great API's which can be used with their wallet to inform the game server that a payment has been made, aswell as sending commands to then sweep the funds to a more secure and private address away from possible hacks.

it may be best you seek advice in the developers sub forum. but this should also get you started
http://blockchain.info/api/blockchain_wallet_api
newbie
Activity: 52
Merit: 0
July 13, 2013, 10:31:53 PM
#1
I'm pretty new to BTC and other coinage being created. I want to create some games that use micropayments or perhaps some betting games.

I would like to know how to setup a payment system that applications (eg games), can interact with. Is there any kind of documented API that application developers can use?

Like for example if I wanted to take payments from players in a game, and credit their account with in-game currency that they can use for in-game purchases?
Jump to: