You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Sander Dijkhuis <ma...@sanderdijkhuis.nl> on 2013/04/22 08:54:41 UTC

CouchDB toolkit for turn-based games

Is anyone interested in using and contributing to a toolkit for creating turn-based games with CouchDB? Or anyone else working on this already?

As a hobby project I’m working on a web-based multiplayer werewolves game [1]. It works in the browser with CouchDB in the backend, and for mobile I’m working with TouchDB [2] and WebView. CouchDB is a nice fit because of the ubiquitous JavaScript, security features, data replication and the real-time changes feed. Each game is a separated into a set of docs to make sure a player cannot access another player’s secrets.

There’s a lot of boilerplate code involved and it seems that I’m reinventing the wheel, along with others who make games like Draw Something and Words With Friends. My current toolkit contains:
- design docs for summarised game lists, notifications, data security;
- object-oriented syntax for game rules, easy bot creation, game state management;
- an implementation of friend lists and group chat;
- AngularJS modules to create interfaces to games, authentication and profiles;
- node.js workers for user registration, on-demand replication and notifications;
- an iOS shell using TouchDB for sync and WebView to render the game;
- a Chrome App shell to easily access privileges like notifications and data sync;
- a ‘free trial’ limitation and payment handler using Google Wallet.
I hope to include:
- auth, friend lists and sharing through Facebook;
- notifications, payments that are native to iOS;
- an port of the iOS shell to Android.

If there’s interest, I can release the boilerplate code under APLv2. It would mostly look like a compilation of existing libraries, configured together to work smoothly. With some help, we could make this into a toolkit that should work for all kinds of board games, card games and RPGs. (It’s the multiplayer gaming’s new revolution [3]!) The goal would be making it easy for users to get started and to focus on game logic and playful interfaces.

Sander

[1] http://playlunacy.com/
[2] http://touchdb.org/
[3] http://www.wired.com/gamelife/2012/04/asynced-gaming/all/

Re: CouchDB toolkit for turn-based games

Posted by Sander Dijkhuis <ma...@sanderdijkhuis.nl>.
A short update to my earlier post about turn-based gaming on CouchDB: I didn’t get far with creating a re-usable library from my werewolves game. Instead, Lunacy’s original code is now on GitHub:

https://github.com/sander/lunacy/

It may be an example of how multiplayer games can be created using CouchDB, or a fun project to help hacking on. :-)

In case anyone is still interested in using this to create a general CouchDB game development kit, I’d be glad to share my ideas and unfinished code.

On Apr 22, 2013, at 8:54 , Sander Dijkhuis <ma...@sanderdijkhuis.nl> wrote:

> Is anyone interested in using and contributing to a toolkit for creating turn-based games with CouchDB? Or anyone else working on this already?
> 
> As a hobby project I’m working on a web-based multiplayer werewolves game [1]. It works in the browser with CouchDB in the backend, and for mobile I’m working with TouchDB [2] and WebView. CouchDB is a nice fit because of the ubiquitous JavaScript, security features, data replication and the real-time changes feed. Each game is a separated into a set of docs to make sure a player cannot access another player’s secrets.
> 
> There’s a lot of boilerplate code involved and it seems that I’m reinventing the wheel, along with others who make games like Draw Something and Words With Friends. My current toolkit contains:
> - design docs for summarised game lists, notifications, data security;
> - object-oriented syntax for game rules, easy bot creation, game state management;
> - an implementation of friend lists and group chat;
> - AngularJS modules to create interfaces to games, authentication and profiles;
> - node.js workers for user registration, on-demand replication and notifications;
> - an iOS shell using TouchDB for sync and WebView to render the game;
> - a Chrome App shell to easily access privileges like notifications and data sync;
> - a ‘free trial’ limitation and payment handler using Google Wallet.
> I hope to include:
> - auth, friend lists and sharing through Facebook;
> - notifications, payments that are native to iOS;
> - an port of the iOS shell to Android.
> 
> If there’s interest, I can release the boilerplate code under APLv2. It would mostly look like a compilation of existing libraries, configured together to work smoothly. With some help, we could make this into a toolkit that should work for all kinds of board games, card games and RPGs. (It’s the multiplayer gaming’s new revolution [3]!) The goal would be making it easy for users to get started and to focus on game logic and playful interfaces.
> 
> Sander
> 
> [1] http://playlunacy.com/
> [2] http://touchdb.org/
> [3] http://www.wired.com/gamelife/2012/04/asynced-gaming/all/


Re: CouchDB toolkit for turn-based games

Posted by Александр Опак <op...@gmail.com>.
Hello!
It's great idea!
Thanks for your work!


2013/4/22 Sander Dijkhuis <ma...@sanderdijkhuis.nl>

> Is anyone interested in using and contributing to a toolkit for creating
> turn-based games with CouchDB? Or anyone else working on this already?
>
> As a hobby project I’m working on a web-based multiplayer werewolves game
> [1]. It works in the browser with CouchDB in the backend, and for mobile
> I’m working with TouchDB [2] and WebView. CouchDB is a nice fit because of
> the ubiquitous JavaScript, security features, data replication and the
> real-time changes feed. Each game is a separated into a set of docs to make
> sure a player cannot access another player’s secrets.
>
> There’s a lot of boilerplate code involved and it seems that I’m
> reinventing the wheel, along with others who make games like Draw Something
> and Words With Friends. My current toolkit contains:
> - design docs for summarised game lists, notifications, data security;
> - object-oriented syntax for game rules, easy bot creation, game state
> management;
> - an implementation of friend lists and group chat;
> - AngularJS modules to create interfaces to games, authentication and
> profiles;
> - node.js workers for user registration, on-demand replication and
> notifications;
> - an iOS shell using TouchDB for sync and WebView to render the game;
> - a Chrome App shell to easily access privileges like notifications and
> data sync;
> - a ‘free trial’ limitation and payment handler using Google Wallet.
> I hope to include:
> - auth, friend lists and sharing through Facebook;
> - notifications, payments that are native to iOS;
> - an port of the iOS shell to Android.
>
> If there’s interest, I can release the boilerplate code under APLv2. It
> would mostly look like a compilation of existing libraries, configured
> together to work smoothly. With some help, we could make this into a
> toolkit that should work for all kinds of board games, card games and RPGs.
> (It’s the multiplayer gaming’s new revolution [3]!) The goal would be
> making it easy for users to get started and to focus on game logic and
> playful interfaces.
>
> Sander
>
> [1] http://playlunacy.com/
> [2] http://touchdb.org/
> [3] http://www.wired.com/gamelife/2012/04/asynced-gaming/all/

Re: CouchDB toolkit for turn-based games

Posted by Aurélien Bénel <au...@utt.fr>.
Hi Sander,

As a side project, we're also prototyping a multiplayer game.
It is not a turn-based one, however. Think of it as a multiplayer graphic adventure game.

One funny thing about this game is that game rules are data rather than programs. And it's amazing how you can code such a game server with CouchDB and just a few lines of code.

Here is a paper presenting how we use CouchDB for this:
    http://publications.icd.utt.fr/183ca2128f922e625b6ba73a960189a0/elmawas_H2PTM_2011.pdf
It's in french but there are a lot of pictures ;)

On GitHub, there is also a partial implementation of what is described in the paper (except the update handler for using game rules):
    https://github.com/benel/SOS21Server

At this time, we're trying to implement the game (lightweight) client with MelonJS.


Regards,

Aurélien




Re: CouchDB toolkit for turn-based games

Posted by Traun Leyden <tl...@signaturelabsinc.com>.
I am working on a turn-based chess game that uses Couch on the backend.
 It's a native iOS app built on top of CouchBase Lite (aka TouchDB).

It has an added twist where multiple players can form a team, and so while
the chess game alternates between moves of the White team and the Black
team, there can be multiple players on each team and it will alternate
moves between the players within the team.

I haven't pushed this to github yet, hopefully next week!  Will post
another update when I do.




On Sun, Apr 21, 2013 at 11:54 PM, Sander Dijkhuis <ma...@sanderdijkhuis.nl>wrote:

> Is anyone interested in using and contributing to a toolkit for creating
> turn-based games with CouchDB? Or anyone else working on this already?
>
> As a hobby project I’m working on a web-based multiplayer werewolves game
> [1]. It works in the browser with CouchDB in the backend, and for mobile
> I’m working with TouchDB [2] and WebView. CouchDB is a nice fit because of
> the ubiquitous JavaScript, security features, data replication and the
> real-time changes feed. Each game is a separated into a set of docs to make
> sure a player cannot access another player’s secrets.
>
> There’s a lot of boilerplate code involved and it seems that I’m
> reinventing the wheel, along with others who make games like Draw Something
> and Words With Friends. My current toolkit contains:
> - design docs for summarised game lists, notifications, data security;
> - object-oriented syntax for game rules, easy bot creation, game state
> management;
> - an implementation of friend lists and group chat;
> - AngularJS modules to create interfaces to games, authentication and
> profiles;
> - node.js workers for user registration, on-demand replication and
> notifications;
> - an iOS shell using TouchDB for sync and WebView to render the game;
> - a Chrome App shell to easily access privileges like notifications and
> data sync;
> - a ‘free trial’ limitation and payment handler using Google Wallet.
> I hope to include:
> - auth, friend lists and sharing through Facebook;
> - notifications, payments that are native to iOS;
> - an port of the iOS shell to Android.
>
> If there’s interest, I can release the boilerplate code under APLv2. It
> would mostly look like a compilation of existing libraries, configured
> together to work smoothly. With some help, we could make this into a
> toolkit that should work for all kinds of board games, card games and RPGs.
> (It’s the multiplayer gaming’s new revolution [3]!) The goal would be
> making it easy for users to get started and to focus on game logic and
> playful interfaces.
>
> Sander
>
> [1] http://playlunacy.com/
> [2] http://touchdb.org/
> [3] http://www.wired.com/gamelife/2012/04/asynced-gaming/all/