A basic example showcasing a simple HTML5 + WebSockets interacting with a Loom DappChain, using Phaser and Loom.js. Source is on Github Websocket Demo

Game instructions

Use the mouse cursor to click on the black canvas area to create colored tiles, each new player will have a different color on the canvas which is shared amongst all players

Development

1.) Download the example project (Tiles Chain)

git clone https://github.com/loomnetwork/tiles-chain

2.) Start the DappChain

cd tiles-chain
mkdir tmpgopath
export GOPATH=`pwd`/tmpgopath

cd dappchain
wget https://private.delegatecall.com/loom/osx/stable/loom
chmod +x loom

# Compile
export GOPATH=$GOPATH:`pwd`
make deps
make

# Configure
cd build
../loom init
cp ../genesis.example.json genesis.json

# Run
../loom run

3.) Start the web server

cd tiles-chain/webclient

# Install
yarn

# Compile protobuf
yarn run proto

# Start the demo
yarn start

5.) Running

The Tiles-Chain web interface will be available on http://localhost:9000