RaphaelWrapper demo and sample code

As promised, I published a small online demo application that uses RaphaelWrapper (if you do not know what I’m talking about, read this other post).

Click here to see the demo

The code of the demo is open source and you can find it on github at this address, you can use it as a brief sample code for the library while I put up something more detailed.

Advertisements

RaphaelWrapper has gone Open Source

Today I decided to publish the source of my Sproutcore-Raphael integration framework – called RaphaelWrapper – so that others can exploit it and hopefully help me extend it. I posted it on github, you can find it here: https://github.com/demerzel3/RaphaelWrapper.

RaphaelWrapper basically gives access to Raphael functions through a Sproutcore-friendly view called CanvasView. I’m using this framework as the basis for my bigger project Calliope, but since it is a completely independent component of the application I thought it could have been useful to make it public.

In the next days I will publish an usage example, and hopefully a little online demo as well.

Introducing Calliope

Recently I felt the need to share more of my “private projects”, so that someone else passing by can read about them and maybe find them interesting. My hope is that by making more things public I can get more motivated to continue on and not let those projects die.

For those reasons, I’m introducing to you my latest project: Calliope.

Calliope is a word game similar to Scrabble, but with a twist. It is played by two or more players, with every player having 7 lettered tiles on a rack; points are scored by placing them on a board to form existing words. The twist that I added to the game is that during your turn you can use all the letters already on the board, that is: you can grab them and move them around at your wish to form new words (I grabbed the idea from a popular – in Italy – card game called Macchiavelli); you however only receive points for the words in which you put at least one of your rack’s letters.

In the same period I “invented” Calliope by merging Scrabble and Macchiavelli I was discovering the existence of new web frameworks and technologies that I would have liked to experiment with. Since at that time I hadn’t a “private project” going on I decided to start one on Calliope itself, and to implement a digital version of the game based on web technologies.

Here is a sneak peak of the result at current stage of development:

Update: more screenshots here!

It is essentially a multiplayer real-time game, in which two or more players can interact with the board in turn. As you can see there’s the rack on the bottom of the page, and there’s a chat on the right with which one can communicate with the other players. Here is how it is constructed:

  • the client side – portraid in the picture – is made on top of Sproutcore, a javascript framework aimed to build desktop-like applications, great stuff;
  • the graphic part (essentially, the board) has been built using Raphael, which gives a nice and smooth javascript interface to SVG programming – I integrated it with Sproutcore myself;
  • the back of the house/server side is built on top of symfony 2, a blazing fast any-purpose php framework.

At the beginning of the project I had no idea of how Sproutcore, Raphael or symfony 2 worked; it has been – and will be – an opportunity for me to learn them. By the way, I also experimented on two other things: RESTful web services (to prepare for the topic I also read this book by Richardson and Ruby) and git, which I never tried before.

At current stage of development, the game is playable but not really stable, and there are still a number of open things to be done. However, I am hoping to put a demo online as soon as possible, to show you more of the project.

This was only an introduction, stay tuned for more! 🙂

Update: this post has become the first of a series of posts about Calliope, you can find the index here.