Creating a table in CypherPoker

Patrick Bay Blocked Unblock Follow Following Jun 26, 2017

Now that you have CypherPoker and Ethereum up and running, it’s time to start a game!

There are two steps that you’ll need to follow but don’t worry if you forget one or the other as CypherPoker will remind you via a dialog.

Step 1: Connect to the peer-to-peer network.

Because CypherPoker keeps its interactions with the Ethereum blockchain to a minimum, most of the game happens over an independent peer-to-peer network. There are plans to implement a variety of peer-to-peer protocols but for now there’s only one option: RTMFP.

The connectivity widget can be found in the bottom panel from the main interface.

The widget has 3 options: RTMFP on Internet, RTMFP on WAN/WLAN, and Local Multi-Instance. You’ll want to select RTMFP on Internet (RTMFP on WAN/WLAN will connect to other CypherPoker clients on your local network/wireless network/mobile tether — not the internet, and Local Multi-Instance will only connect to other clients on your own machine/device).

Slide the switch to the right to the ON position.

You will now be asked if you want to allow Peer Assisted Networking. If you deny this request, peer-to-peer communication will be disallowed and you won’t be able to play.

You’ll immediately see that there’s at least 1 Connected Peer — you — and you’ll see your peer ID (your unique identifier), in the text field below. When your opponent performs these same steps you will see the number of Connected Peers increment.

You should also make sure that Ethereum is enabled — see the previous post for how this is done. Be sure to set the password for the currently-selected Ethereum account by clicking the UPDATE ACCOUNT button.

Now that you’re fully connected, you’re ready to create a new table.

Close the bottom panel by clicking on the tab button at the top. This will bring you back to the main interface.

Step 2. Create the table.

Click on Create New Table:

This will open the table creation interface:

Select a smart contract address from the Use smart contract pulldown. At present CypherPoker doesn’t check if the selected smart contract is in use so if you’re having trouble with one simply select another (this will be updated soon).

Then enter a valid value in the Buy-in amount (per player) field, a smaller amount in the Big blind amount field, and an even smaller amount in the Small blind amount field. Keep in mind that your opponent must have enough Ether in their account to join the table unless you’re creating a For-fun game in which case you can enter any amounts that you like. If you want to see the amount entered in another denomination you can do this by selecting it in the currency denomination pulldown (the default is Ether).

The Blinds timer can also be updated or disabled altogether if you prefer.

Finally, you can make a table private by including your opponent’s peer ID, as generated when they connect to the peer-to-peer network, in the required players’ list by entering their address in the text field and clicking the ADD REQUIRED PLAYER button beneath it; you’ll see the address added to the list at the right.

(The table password option isn’t yet implemented when joining a table but it’s almost ready as another way to make tables private)

When you’re done, click CREATE TABLE which will take you back to the main screen. You should now see the newly-created table in the list in the left.

Step 3. Join the game.

By clicking on the table the details will be shown to the right.

Now simply click on the JOIN TABLE button to queue up for the game. Your opponent will similarly need to select the table and click JOIN TABLE. When both of you have joined the game will automatically begin.

This is a good time to mention that the interface you see here will probably not stay exactly as shown. The table information button in the list, for example, is not very clear about what it displays — you need to click on it in order to expand the information. This is a good candidate for revision.

It’s also been mentioned that the user interface components shown are useful for mobile but unnecessarily large and clunky on the desktop. I agree and will be implementing a way to switch UI components in a future version — Starling Feathers should make this a fairly easy task.

In addition to these tasks, I think it’d be useful to be able to provide your opponents with links (URLs) which will include direct table connection information, allowing them to bypass most of these steps.

Finally, as I mentioned in a previous post I’m working toward making the setup of an Ethereum client such as Geth unnecessary. While this involves a trade-off in terms of security (someone else will be hosting your wallet and performing blockchain operations on your behalf), it might be desirable to do so for convenience. Everything described up until this point has assumed that you want to be in full control of the gaming environment and while that will always be an option it shouldn’t be the only one!

Please join me next time when I go over progress made on the mobile client (the last outstanding runtime), and describe how the remote or hosted Ethereum client service will work. If you think you might like to try your hand at being a CypherPoker remote wallet host and blockchain service provider, this post will be for you!