Wonderland a twitter

July 28, 2010

Continuing with the theme of increased internet integration as outlined in my last blog post, I’m pleased to announce the addition of a Twitter Viewer module to the Wonderland Module Warehouse.

It uses Twitter4J–a Java library for the Twitter API, and relies on the existing Twitter search operators. It requires no authentication, and can be installed and used by any user logged in to Wonderland. The user is able to enter a search query and the resulting tweets are added to the virtual world in two ways: firstly in a list widget displayed in the heads up display; and secondly as animated bubbles floating up from a 3D model of a pigeon.

Here’s a brief video of the Twitter Viewer in use.

As mentioned in the video, the query is performed every 30 seconds and will continue executing even if no user is logged in to the world. All the results of the query are presented in the list widget next time a user logs in. The list widget (actually a table widget) will hold a maximum of 99 tweets, after which it discards old tweets.

The module is now in the Module Warehouse and the source code in the Positive Spaces SVN repository. If you take a look at the source, you’ll see that this module includes three features of Wonderland:

  • Animation of tweets, using the Trident animation framework
  • Connection from the Wonderland server to an external service provider, in this case Twitter, via the use of the Darkstar service layer
  • A periodic task to execute a query, retrieve the results and forward to clients.

In my last blog posting, the instructions for checking out the source code were cropped. Here they are in full: inside a terminal window, execute each of the following command as one line (when prompted, use ‘anonymous’ as the username and a blank password):

% cd ~/src/trunk
% svn checkout http://gforge.grid.ece.ntua.gr/svn/spacespublic/trunk/
UEssex/wonderland-modules +spaces-modules

This will create a directory called +spaces-modules that is a sibling to the wonderlandand wonderland-modules directories.


Get every new post delivered to your Inbox.

Join 56 other followers

%d bloggers like this: