<p>You're going to need a fairly intense system to support something like that. You won't be able to send Bitcoins securely in your game, so you will need a server handling requests to send. Check out the <a href="https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list" rel="nofollow">Bitcoind api</a> commands and the various libraries you can use to access Bitcoind. Node.js has an <a href="https://npmjs.org/package/bitcoin" rel="nofollow">interesting and simple library</a>.</p>

<p>The main trouble you are going to have is people who are trying to game your system. You will need to verify (somehow) that a player did actually beat your game. What is stopping me from sending thousands of requests, stating that I won? People will figure out the server you send the requests to quickly.</p>

CC BY-SA 3.0
2014-02-03T18:46:37.373Z
Thanks for that. I will likely use that Node.js library. I will try to get something setup locally as a learning experience, as that is what I'm really after, to learn how to integrate bitcoin into different projects. Again, thanks!
user2259122
CC BY-SA 3.0
2014-02-03T02:14:41.960Z
2014-02-03T02:14:41.960Z
John T
<p>Okay so I just finished up a ping pong HTML5 game I've been working on as practice, and I was thinking of integrating Bitcoin into the game so when a user wins vs. the CPU, they get a small amount of bitcoin sent to their account, or to an account created for them.</p>

<p>Can anyone point me to a resource to get this done?</p>

<p>I think I can do this with BitcoinJS but it is not available for Windows.</p>

<p>Not sure what I'm doing, so any help would be great!</p>

<bitcoinjs>
Created an HTML5 Game, best way to integrate Bitcoin?
user2259122
# Created an HTML5 Game, best way to integrate Bitcoin?

(Asked by: username_0 on 2014-02-02)

Okay so I just finished up a ping pong HTML5 game I've been working on as practice, and I was thinking of integrating Bitcoin into the game so when a user wins vs. the CPU, they get a small amount of bitcoin sent to their account, or to an account created for them.

Can anyone point me to a resource to get this done?

I think I can do this with BitcoinJS but it is not available for Windows.

Not sure what I'm doing, so any help would be great!

**Tags:** bitcoinjs


---

## 1 answers

### Answer by username_1 on 2014-02-03. Score: 1

You're going to need a fairly intense system to support something like that. You won't be able to send Bitcoins securely in your game, so you will need a server handling requests to send. Check out the [Bitcoind api](https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list) commands and the various libraries you can use to access Bitcoind. Node.js has an [interesting and simple library](https://npmjs.org/package/bitcoin).

The main trouble you are going to have is people who are trying to game your system. You will need to verify (somehow) that a player did actually beat your game. What is stopping me from sending thousands of requests, stating that I won? People will figure out the server you send the requests to quickly.

> **Comments:**
> **username_0**: Thanks for that. I will likely use that Node.js library. I will try to get something setup locally as a learning experience, as that is what I'm really after, to learn how to integrate bitcoin into different projects. Again, thanks!  

---

