Tuesday, December 28, 2010

An overdue update and a present from Google

Things have been a bit busy for me recently. I started my winter quarter at RIT just a few weeks ago and feeling the pain of coursework already.

I'm taking a parallel programming class which should be interesting. One issue I have with the class is that it teaches a specific parallel library for Java written by an RIT Professor. Don't get me wrong, I'm sure it is a great library, but at the same time I feel the class is a bit biased as it appears that the library isn't very well maintained. When the homepage of the library says that it recommends an older version of java then the current standards. There may be a reason that is justified, but I don't know. Hopefully I will be able to take some of the techniques from the class and apply them to other libraries and languages.

Another class I have been taking is a 2D Game design class. The class seems to be a pretty open class where the purpose of the class it to work in teams and create a single level prototype game. The class has a few assignments where we need to implement simple tasks in DirectX 10 which we are finding it a bit more difficult then expected. I have been spoiled with python, so relearning C++ is always fun; Especially when using the Windows and DirectX api, lots of pointers and reference passing. So this is taking a lot of my time having. To complicate things, I don't have a single DirectX 10 computer, all mine use DirectX 9c. At least our game lab is very comfortable and has a very friendly schedule of open hours. Expect to hear some updates about our game, codename Project Parasite, in the near future.

Outside of classes, I am still working in the Innovation Center. My primary role at the center is working on a social site which is used to keep track of Projects, People, Groups, and Ideas and how they are linked. It is slowly expanding, but hopefully it will continue to grow in a more defined and specific use. In its current state, it is a collection space for all things. My hope is it will become less of a static site and will hopefully become a very useful tool. One of my long term goals is to apply some Graph Theory to be able to automatically draw conclusions about projects and their related networks. This is a ways as the site is still young. Some of my other roles are to provide assistance with various tasks in the center from helping run events and help setup and maintain public computers, a/v equipment, and other resources.

Foss at RIT is still moving along. We have placed a bunch of our fossers with some sponsored projects. I haven't been able to work on anything specific for FOSS @ RIT, but I am there everyday working on things for the Innovation Center as well as Foss. Sometime when I get back to the school, the Foss website will need some attention.

Outside of schoolwork, the Christmas/New Year break has been going well. The break started off with a pleasant surprise, a nice box delivered to my door. The return address was only an address, so I had no idea what it was. When opening the shipping box there was a box inside with a great technical diagram on the surface, some sort of hamster wheel assembly rocket engine. That was screaming geek, and sure enough inside the box was my own CR-48, Google's ChromeOS Netbook computer. It's a beautiful machine. So far I have been testing away, submitting a bunch of bug reports and feature requests as well as playing with the underlying OS; I wish all product manufacturers had a Dev/Jailbreak mode switch. The OS is very stripped down, took me a while to find out which text editor was on the system (qemacs) before I grabbed busybox. At least they gave us the ability to crack open the hood, so I am happy.

So that has been a great start to the break. We had a great Christmas and now looking forward to a great New Year.

Thursday, November 11, 2010

HFOSS Class Final Presentations

Tonight was the final presentations for the course. We should be expecting some final documentation updates as well as some activity releases in the new few days!

Lemonade Group in their fancy matching shirts

Project Links

Presentation Notes

Tuesday, November 9, 2010

Class: 10/09/10

Today was a quick update and then a work period. Not too much to report. Final presentations are Thursday.

Thursday, November 4, 2010

Class: 11/04/10

Last class (11/02) was primarily a work period. Students went to the innovation center and worked on their projects. Got a few people getting their git access working.

This class had some small update and activity discussions. We put up a git activity log on schoolserver.rit.edu/gitstats.

Tomorrow there will be our Home Stretch Hackathon!

Everyone is free to join us in the Innovation Center between 7:00pm to 7:00am. We will have everyone working on various projects. Come to receive and give help to others.

The HFOSS class are expected to a least show up if they can to support their projects.

IRC Notes:

Thursday, October 28, 2010

Fortune Engine and Fortune Hunter

This post is a bit out of date, but I Finally got the FortuneEngine it's own repository last weekend. The Fortune Hunter repository has grown a lot over the summer due to the vast amount of art and art testing. I figured it was not very friendly to have the engine coupled with that repository if someone wanted to use the engine. It now has its own repository located on fedora hosted. It will still use the same track as fortune hunter.

Now the Fortune Engine has been included in the Fortune Hunter repository as a submodule to keep the engine in the game repository.

I have also made a tarball 1.0 release of the engine as well and tagged it in the repository. My next steps are to upload a copy to pypi and then look into what features I should work on next.

Class 10/28/10

Today in class we had some project updates from the students and announced an upcoming Hack Fest event.

Wednesday, October 27, 2010

Class 10/26/10

The students has a Quiz this class. And after that they were given the rest of the class period to test some of the Open Hatch Missions.

I don't think they were productive as I personally would have liked due to the lab we are in is running windows machines and the missions are targeted towards linux based systems. The machines had the tools needed, but no one knew how to use the tools. I really should try to learn how to run patches in windows sometime. The tar mission is pretty easy in linux and windows, you can use a terminal or use the gui tools available. In mac this was problematic as the open hatch mission system was saying the tar file uploaded by the user was invalid (this is because of the hidden files mac was adding to the directory before it was bundled into the tar).

The patching was problematic for our windows user as no one could figure out the patch program the lab machines had installed.

Thursday, October 21, 2010

Tuesday, October 19, 2010

Thursday, October 14, 2010

HFOSS Pythonistas meeting

Today the class attended the local Pythonistas meeting.

Some sparse notes attached. Students should post their presentations in their blogs. Check out the planet http://foss.rit.edu/planet/hfoss.

IRC Notes

Thursday, October 7, 2010

Class: 10/07/10

Community Arch Assignment

Working in groups of two or three, you are going to look at an OS community/project and deduce how that community is organized. You may also use some of these techniques to assess pre-existing OS projects you wish to contribute to for your term project.

Notes have been collected on irc.

Coming Soon: Project Status Presentations (Present next Thursday)
  • Division of Labor
  • Milestones and Goals
  • Can the project strive for Release
  • Code Discussion (Python Geek Time: discuss problems, questions, or show off some code)

Tuesday, October 5, 2010

Class: 10/05/10

Community Arch Assignment

Working in groups of two or three, you are going to look at an OS community/project and deduce how that community is organized. You may also use some of these techniques to assess pre-existing OS projects you wish to contribute to for your term project.

Notes have been collected on irc.

Next class we will continue with the remaining presentations.

Thursday, September 30, 2010

Class Project List

I have updated our project page on the sugarlabs wiki as well as compiled a list of the class and their blogs, projects, and wiki user pages.

Tuesday, September 28, 2010

Class 09/28/10

Today we spent most of the day working with Sugar On A Stick and then had a lecture about learning and teaching.

Some students have also taken the time to update their wiki pages, blogs, and issues with joining upstream projects. An example is the Translator blot is abandon-ware, getting access to the fedora hosted trac will be useful for the team.

Irc Log:
Meeting ended Tue Sep 28 15:50:54 2010 UTC.

Thursday, September 23, 2010

Class: 09/23/10


This course will introduce students to the Free and Open Source Software (FOSS) and Open Content movements, the open source development process, the ways in which OS IP is integrating with the profit sector, the design of educational materials for K-12 students and their teachers, and to the open questions of the efficacy of technology in the classroom.
Students will learn FOSS process and Tools with class projects that support the One Laptop Per Child community by creating educational content and software for free distribution to students and teachers around the world. The OLPC project is driven by a world-wide community.
For this course students will be expected to attend and make final presentations to the RIT and Rochester FOSS communities via the monthly Pythonistas meetings, which you will attend in-lieu of a classroom day 2-3 times in the quarter as calendars of both the class and the Pythonistas allow. Students will also become members of the Sugar and OLPC international communities. Local FOSS community members may join us in class sessions as well. Treat them as you would another instructor, but they’re also your peers in moving this innovative project forward.
Source: The Course Syllabus

For more, see the RIT page on Teaching Open Source


We have set up a Planet for the course where all our students are required and encouraged to post their experiences and work in the open community.


Our project list has been posted, so here it is.

IRC Meeting

Our class uses #rit-innovation on freenode.

We will try to keep some notes in irc, it should hopefully improve in future logs.

Meeting ended Thu Sep 23 15:51:43 2010 UTC.

HFOSS Planet

Well I just started our own planet for the Humanitarian Free and Open Source Software Class (HFOSS). All students are required to create and manage a blog during the duration (and hopefully following) the class. Their blogs should talk about their projects, homeworks, and experiences in the open source community.

Please feel free to check it out at http://foss.rit.edu/planet/hfoss/ (Recursion for anyone reading this on the planet? :p )

Thursday, September 16, 2010

A new year begins at RIT

At RIT, we have started a new year. This year our OLPC Class is focusing on working on past projects and requested projects from the community.

We have already introduced the class to IRC and have given out some xo's.

The class with their new xo's.


Potential Projects

Monday, August 9, 2010

Busy Days

We are approaching the end of this summer block, trying to wrap things up. I have been jumping around a few projects lately, Fortune Hunter, my School Server, and a csi website.

Local Hackfest

We had a hackfest in Center for Student Innovation on the 4th of August. Buffalo Chicken Pizza, groove bot blasting music, and lots of coders and a few projects; It was a great time.

Fortune hunter team spent the day adding some touches to the animation engine. By the end of the hackfest I was able to merge the art team's branch into the main. Having 415 edits, only one merge conflict is quite impressive. Some minor engine changes followed in the next couple of days to return backwards compatibility with Lemonade (which is now being updated to the new animation system).

Taylor and Eric were working on the CSI web app adding the ability to link up nodes as well as a few other nice tweaks. Jon Schull and I were also helping out in the early hours of the hackfest, planning some of the features as well as going through the code with Taylor and Eric.

Civx had the whole crew plus some like Luke Macken coding away. One of the tasks for Nate was adding javascript scraping.

Upcoming Research Symposium

Well we have all been really busy preparing for our Research Papers, Posters, and Presentations for RIT's Undergraduate Research Symposium that is being held on August 13th.

The two fortune hunter groups have decided to have one poster and one presentation that will each cover both topics.


We have been doing a lot of things on our infrastructure side. We got our three sugarlabs servers up and they just need some configuration and we will be hosting a sugar activities mirror.

I have also been busy working on our own hosted system. We have our own trac and git repositories hosed on schoolserver. We even have a club here at RIT testing out the system. So hopefully this will be the start of a very valuable resource.

We have also given Dave Silverman the task of building a new logo for FOSS @ RIT. Well Dave delivered, so here is our new logo:
FOSS @ RIT logo

Some other things I have been working on is a gitorious config script to allow easy modification of our git repos on schoolserver. My long term goal of this is to write/modify a trac plugin to allow git management from trac.

Gource Visualization

I have also been compiling a gource visualization that has all of our projects in one feed. This required me to write a script that can combine the git logs of a few git repos into one log.

Watch on YouTube

Wednesday, July 28, 2010

Apache + Trac + WSGI

Well today I can say I have learned more about apache's mod_wsgi, mod_perl, and mod_cgi then I was expecting. The trac system I set up was was extremely slow. This is because I set it up using apache's cgi system. Trac was running using cgi which apparently is the slowest way to run a trac instance. I was searching around for the better solution and found that using mod_wsgi is the best solution. Trac had some decent documentation that helped out with the process.

Another way to boost the speed of this trac was to only use https when sending login data. This was a challenge with the current setup of the apache server. Thankfully I found some great examples attached to a trac ticket that helped out with the process.

Other then that, I have also spiced up server's homepage. Added a some images to the home page and added a services section to show off what it is doing for us. I also set up a ZNC IRC Bouncer on the server for any of us wanted to always be on irc that don't have a server of their own.

Tuesday, July 27, 2010

Foss Infrastructure

Today I worked on foss infrastructure.

Now we have a basic project hosting system on our school server. The setup is basically a Trac system with Gitosis and GitWeb.

Now we can host trac projects and Git Repositories.

Monday, July 26, 2010

CSI 2.0 and Foss Infrastructure

Well today I spent a majority of my day working on getting the py2web framework on a public box so that others may continue the work Trose started. The major issue was the web2py framework doesn't like to allow admin access over non secure connections. This was problematic because the framework wasn't working out of the box with ssl support. The framework seems to be designed that it needs to run behind apache once it is read to go to a production server. I still didn't get it completely working, but the hack I did will have to do for now.

Other then that, I have also been working on some of our Infrastructure. Some of this involved setting up a trac instance and a git hosting server. We hope to soon have our own git and bug tracker in house. This will support projects and hopefully encourage people to start their own projects in the Center for Student Innovation.

Friday, July 23, 2010


So, yesterday we got access to the new facility server room for the first time and were able to install the three blades Sugar Labs had given us. Here at RIT, we are planning on running a mirror of activities.sugarlabs.org (ASLO). So with that said, we are one step closer to having that set up. We got the blades on the rack and set up. They are able to talk to each other using their own private network and soon we will get them live on the RIT network.

This is great as we have been holding on to these blades for quite a while now, waiting for room to open up for them. So this means once we get them registered with RIT's network, we should be able to setup the sugar mirror soon!

Wednesday, July 21, 2010

Fortune Hunter Dungeon Advancing

I finally started implementing the ability to go to the next dungeon (ticket 44).

I didn't close the ticket because there seems to be some bug in the code on level two that gets you stuck in a room on level two.

Otherwise, I have been doing a lot of little things. Hopefully I'll get this figured out soon.

Tuesday, July 20, 2010

Lemonade Stand Release

Announcing Release Lemonade 2.0, XO Release 4. The source code freeze for this release: 2.0: Release Activity xo 4.

This also marks the close of the fortuneengine branch as it has been merged into master.

Lemonade Stand Counting Game

The Lemonade Stand project is almost back to/surpass its original state on the fortuneengine branch. I just got done implementing the lemonade counting mini game as well as added back the background image.

    Relevant commits (newest on top)
  • e8bef1eAdded profit calculation instead of income calculation
  • 8abf746 Added escape key to quit game
  • 180d070 Fixes bug with counting game
  • e546764 Minor tweaks
  • c33b71b Added font size flag for the xo
  • 9089014 Run on the xo?
  • 1958b37 Added width/height args
  • aa6077c Updated files
  • a883763 Removed old files
  • 58a2707 Implemented counting game

Thursday, July 15, 2010

Fortune Engine profiler and other projects

Yesterday I resolved the profiling ticket (ticket 31). This adds a basic profiling system to the game that can be run through the game console

This introduced a bug that I fixed today (changeset).

Kevin and I also started working on our paper for the symposium at the end of the semester.

Aside from Fortune Hunter and the Engine, I have also started working on porting Nate's Lemonade Stand game over to the engine.

Python backwards compatibility drives me nuts. The xo 1.0 runs python 2.5 or older where the newer ones use python 2.6. In the game engine I was using the keyword "as" in the exception handler where in python 2.5 the keyword is ",". So I had to make a commit to convert all my code so that it doesn't use the newer "as" keyword (changeset).

Pygame has a similar issue... I had to remove using pygame.Color and just use the tuple format for the rgb color values in our game (changeset 1 and 2)

Other then that, I have also been helping Taylor on a project for the CSI. This project is like making a facebook/social networking site driven around projects and events.

Tuesday, July 13, 2010

Lemonade finds bug in Fortune Engine

Today I spent a lot of time working on the lemonade stand activity. The activity is almost back to its original state but in the game engine. All that is left is the change counting mini-game at the end of each day. After that it is just improving the gui.

While working on lemonade, I found a bug in the game engine. This bug caused the game to appear to freeze when the game console was summoned in non-animation mode (ticket 38). The ticket has not been closed yet due to the fact the problem remains when you close the console until the next event sets the screen dirty.

Monday, July 12, 2010

Game Engine and Lemonade Stand

Today I started out by fixing a bug in the game engine that caused the timer to give an inaccurate number of millisecond passed when not in animation mode (Ticket #36). I also added some more commenting to the game engine (changeset).

After that I started recoding lemonade stand so that it will eventually run using the game engine. In its current state ( and the other commit I did today) it is able to run the basic process day loop. This includes buying items (or being forced to buy as many as you can if you try to buy to much making the game more interesting), decaying the inventory, process a weather change, and a random inventory event. Next I need to to implement the simulation portion where people go and buy the items and go into a mini game.

From there I get to start working on the main gui and some of the mini games.

Friday, July 9, 2010

OLPC Hackfest Summery

July 8, we had our hackfest at the OLPC headquarters. Foss at RIT had sent three of their coding teams and one of our storytellers to this event. The primary focus of this hackfest was the Open Video Chat activity with Fortune Hunter and CIVX as secondary topics.

Once we got settled in the board room, we found that our foss.rit.edu server was down. The server is hosted in RIT’s Computer Science House server room. Apparently they had a computer overheat and went into panic mode shutting down some of the servers and networking hardware to reduce heat due to this heatwave we are having. This was an inconvient time as our hackfest goals, irc bot, and dev enviornment of CIVX was hosted on this box. Luckily my personal server at rit was online and had a copy of our Drupal database for the goals, and had an irc bot ready to go. As for CIVX, distributed revision control through git was a life saver.

Open Video Chat

Open Video Chat’s goals at the hackfest was to get a telepathy-farsight implementation of the chat system working. We didn’t get any fully working code out of the hackfest, however we did get a much better understanding of the telepathy-farsight stack thanks to Daf’s physical presence at the hackfest. His insights of telepathy were very helpful and will be very valuable in the next coming week. Fran has been working at understanding the dbus and telepathy stack for the past week which this hackfest seems to have been exactly what he needed to understand how all of the components need to work together. We were playing with telepathy and empathy to programically start a video call between two computers.

This is important because this shows we are gaining an understanding on how the parts of telepathy work together. We were still using empathy to accept the video connection, but that is a start. We have decided we need to step back a bit and rebuild our stack. We are thinking of starting off by using some network/telepathy tube negoation from existing example activities like chat. By doing this we will build our stack with small peaces of the networking stack at time.

We also spend a portion of the time working Sjoerd Simons in the telepathy irc channel working around known bugs that have not made it into the main repositories. One aspect of sugar that I’m worried about is they are using older versions of fedora that have reached the end of their support life cycle, so some of these bug fixes may not be included in some of their current versions.

Mathmatical Adventure: Fortune Hunter

The art team of MAFH spent their time deciding how they want to build their animation system. It seams that they have decided on building some supporting classes that will make animation easier in pygame. These classes will hopefully be easily supported in the game engine. I am not too sure of the current status as I am working mostly on the engine.

The engine got a little bit attention druing the hakfest at the end. I broke apart the inspection system into a new class that is not specific to the engine. This could potentially be helpful to someone else in the future. I also added the ability to set the frame rate cap and animation mode in the constructor of the main engine.


The CIVX team spent most of their time working on their people widget. It has now been added to the front end of the dev enviornment and will hopefully be pushed to the main server. There was also some scraper work by the team, but due to the server being down their work was crippled.

CIVX has been wanting to add more servers at alternate locations for some time. Due to this issue with CSH, it looks the the primary server may be moved into a facualty server room at RIT where the network is in “production” instead of CSH’s “learning” enviornment.

Tuesday, July 6, 2010

Boston OVC Hackfest

Well tomorrow we are heading up to Boston for our Open Video Chat Hackfest at OLPC Headquarters on the 8th.

If you can make it to the hackfest, great if not, you can join us on our IRC Channel on freenode.net, #rit-innovation.

Hope to see you there. For more information, please see our Open Video Chat Hackfest info page or mailing list.

Fortune Engine Loop Overhaul

After doing some tests with the new threaded system, I came to the conclusion that the overhead of the thread system in python is pushing it, especially on the xo laptop. The system wasn't even using threads correctly as it was using global locks over the event and display loops. This was to prevent the display from being changed during a draw cycle. Without the locks you would get some interesting phantom elements on screen between frames. This wouldn't be so bad except the drawing takes a noticeable amount of time.

To fix this, I decided to go back to a modified version of the event driven loop (ticket 36). It is similar to the original engine in the fact the drawing is taken care of in the event loop. The major difference is that the event loop no longer blocks for events. Instead events are drawn only when the even queue sends a NOEVENT signal and only if the dirty flag is set or the game is set to animation mode. This new animation mode forces it to draw every time it gets the NOEVENT signal.

This fixes a few problems with the old system. The old system would require a timer for animation. When the timer fired to wake up the blocking event call, it would be fired to every event callback registered. This also caused a problem if your animation timer was too fast, it would fill the event queue adding animation events faster then they could be eaten up which would slow the system down.

It also takes the idea of the threading system into account. I was using global locks to prevent the system from clashing, now that it waits for the queue to be empty, it then completes a draw cycle and hands control over to the event loop again.

Wednesday, June 30, 2010

Drawing API's and Frame rate

Today I worked on the ticket to update the draw api (ticket 34). This update now passes the clock delta that the pygame clock.tick method gives us. What is great is today I even used the sed command to apply the new argument to the draw methods in the code. I am glad that I have finally be able to use sed and I hope to be using it more often in the future.

I also quickly added a frame rate display to the game engine (changeset 268cc24...). To activate/deactivate the frame rate display, simply open the game console (ctr+w) and type in the command fps.

Apart from a bunch of other things going on, I changed my gnome look a bit following a few suggestions from one of fran's blog posts. Basically it takes some of the neat features of ubuntu's remix and leaves some of its drawbacks behind. That with gnome-do is a great combination.

Tuesday, June 29, 2010

Fortune Updates and Headaches

Today was a fairly productive day. We got a few tickets tackled, had a couple great discussions, and found a few major problems with the Fortune Engine.

First task of the day was to update the Game Engine's timer api (ticket 30) to simplify it as well as make it more consistent with the rest of the engine. Before this api change, the developer would need to set a timer (between zero and eight) and set the time between fires. After that they would have to listen for a pygame.USEREVENT + id in the event loop and then handle the event as they wanted. The problem with this is they have nine timers that they have to keep track of, making sure they don't reuse a timer between different elements of their code. The new api now takes in a function and a time delay. When the timer fires, it calls the function directly. When the user wants to remove the function, they simply pass in the callback function they wish to remove. The developer no longer needs to worry about what timer they are using, as long as they don't need more then the nine given to them.

In the process of testing the new timer system, I found the cause of the long standing Search Exiting Early bug (ticket 16). This was a bug that when the player was trying to search a room for hidden items using the amulet search method, it seemed to abort early with no reason. Well the cause of this bug was the pyconsole set the repeat character option that was interfering with the game timers when it sent repeat events. I don't like having the console changing the behavior of pygame. While it is useful for the backspace key, it is less then idea to have the console changing global behavior. So my change was to simply remove that from the pyconsole.

While changing the pyconsole I found that the new threading system was causing problems with console input, so I had to make a commit changing pyconsole so that it's process method acts more like the rest of my input handling.

One major problem with the game engine we found was when user's code crashes in one of their callbacks, the game engine would crash causing the window to freeze due to the draw or event loop getting the exception. The problem is, if one of the loops crash, the game should exit all threads and close. The solution was to catch the exception, print its stack trace and then call the stop_event_loop function (ticket 33). This is only one of the major problems we found. Another problem that I haven't solved yet is when their code goes into an infinite loop that doesn't return control to the game engine. This could be solved with a watchdog thread that will kill the loop if it hangs, but that gets messy. Another solution could be to spawn user callbacks in their own threads, but the overhead and thread maintenance would be another headache on its own. At the moment I haven't decided on a solution or whether I shouldn't worry about it at all.

I have also added a few tickets today for a later date. Some of them include adding a profiling system that can be turned on in engine for debugging and optimizing tools it could provide (ticket 31). We also need to modify the draw API so that it can give access to the time elapsed argument to the animation system (ticket 34). The art team and the engine team had a nice long talk about the best way to get animation into the game and we found that giving them all a time difference seemed to be the preferable method. Luckily the pygame click.tick method not only controls our frame rate, but adds the ability to give us the time elapsed since the last frame. A third ticket we made was to incorporate a dirty draw technique to increase our frame rate by reducing the amount of processing we need to do on each draw (ticket 35).

Well with that said I leave you this, Threading is a wonderful thing, but creates a lot of headaches and problems.

Monday, June 28, 2010

Fortune Engine helps Debug Infinite Loop

The fortune engine helped debug an infinite loop with relative ease today. There was a bug in our code that caused the game to come to a halt. The bug was in one of our drawing callbacks that didn't return back to the game engine.

What is great about the design of the game engine is there are (as of today) two threads, a drawing thread and an event loop thread. This bug showed a problem with the design of the engine, you can't run the debug console when the user code in drawing or event thread fails to return control to the game engine loop. I will have to make a fix for this later.

So how did the engine help debug the loop? Well once you can determine that it was with the drawing and not the event loop it cuts out half of the things you need to debug. This was easy to do as the engine now uses a lock to ensure either a drawing or updating state gets to finish before switching threads. So by simply adding two print statements I was able to find it was crashing in the drawing thread as it didn't return the lock.

The next step was to figure out which draw callback was causing problems. This was as simple as adding one print statement.

diff --git a/MAFH2/fortuneengine/GameEngine.py b/MAFH2/fortuneengine/GameEngine.
index 477bd07..610de30 100644
--- a/MAFH2/fortuneengine/GameEngine.py
+++ b/MAFH2/fortuneengine/GameEngine.py
@@ -129,6 +129,7 @@ class GameEngine(object):
                 for fnc in self.__draw_lst:
+                    print "DRAWING", fnc

This one statement brought the scope of the problem down to a single function.

DRAWING <bound method TermBox.draw of <TermBox.TermBox object at 0x99cdfec>>
DRAWING <bound method Dungeon.draw of <Dungeon.Dungeon object at 0x99bf0ec>>
DRAWING <bound method Map.draw of <Map.Map object at 0x99d884c>>
DRAWING <bound method BattleEngine.draw of <BattleEngine.BattleEngine object at 0x99d8f8c>>
DRAWING <bound method BattleMenuHolder.draw of <BattleMenu.BattleMenuHolder object at 0x99d88cc>>
DRAWING <bound method BattleMenu.draw of <BattleMenu.BattleMenu object at 0x99dc4ac>>
DRAWING <bound method MagicMenuHolder.draw of <MagicMenu.MagicMenuHolder object at 0x99dcc6c>>
DRAWING <bound method MagicMenu.draw of <MagicMenu.MagicMenu object at 0x99dcd6c>>
zsh: killed ./MafhActivity.py

This output showed the last function the game engine was able to call in the drawing thread was the draw method of the MagicMenu class. From this point, we knew the function that was causing the issue and from there it was pretty clear to look for any loops.

Week 4 and on a roll

Today starts the new week. We are onto a good roll so far. Some good news, David Silverman was kind enough to get a new logo for Fortune Hunter (ticket 13).

Fortune Hunter Logo

I decided to do a quick task of splitting the console code out of the main engine into its own class (ticket 28). The motivation behind this was to make the engine code slightly cleaner by removing the console specific files. The new file is heavily dependent on the Game Engine, so you could argue that it is not the best idea to move it out, but it does look cleaner.

Another task I tacked today was the decoupling of the animation loop from the event loop (ticket 22). This is great, but at the moment it seems to have caused more problems then it has solved. There is an interesting bug that if the event loop is being fired as it is in a draw loop, you can get some interesting frames. So to fix that I had to implement a thread lock on the draw and event loop (ticket 29). One could argue that defeats the purpose of threading, which it does. So at the moment the threads just get by the waiting for an event to be fired, removing the need to fire a timer for animation.

On a side note created a ticket for one of our Pixel Ninja's to make us a Foss Logo for rit (ticket 4 on fossrit).

Friday, June 25, 2010

Foss-AT-RIT Update

This week has been a bit crazy, not as much on the coding front as the management side of things. I have been updating our mailing list making sure that everyone in the foss project is at least on our fossrit mailing list.

I have also been reorganizing the Foss.rit.edu website. Some changes include adding customized user pages, a user list, and cleaned up some feeds and categories from the news aggregator. I have also be reorganizing the menus. Some changes include a new About Us menu and page. In this new menu I moved our History page as well as made a Trac, Mailing List, and an IRC page.

I have also been cleaning up some internal settings and modules to hopefully help the site out a bit. One useful feature I added is the ability to add a title and description to peoples blogs. So now bloggers can make a useful description to the blog to explain their project. I posted an email to our mailing list to let everyone know.

There still needs to be some work on the foss site, so I crated a ticket: Update foss.rit.edu pages.

Wednesday, June 23, 2010


Well today I decided to purchase Jlewopensource.com. So now my blog is hosed on blog.jlewopensource.com.

When I get around to it I will put my people.rit.edu profile on this site.

Tuesday, June 22, 2010

NTID Tech Symposium

Well for the past two days we have been showing off Open Video Chat and Fortune Hunter at the NTID Technical Symposium. Today Professor Stephen Jacobs, Remy DeCausemaker, and I gave a presentation entitled OLPC (One Laptop Per Child)/Sugar Video Chat Enhancements for Deaf Communication and Education. This presentation talked about the One Laptop per Child program and our Open Video Chat activity. We had one of our XO's running the activity from the presentation hall and the other from our kiosk in the other side of the building.

In the conclusion of our presentation, we had quite a number of people interested in the sugar operating system. Luckily I had installed sugar on a few live usb sticks that we were able to give out to those interested.

It has so far been a hectic week with this conference. I haven't been able to get too much coding done as I usually do. I am still working on the developer console (ticket #5) for the game engine. Now the console supports setting values to any statement that is a valid python expression by passing the string into an eval statement.

Next I have to be able to delete attributes as well as being able to list and call functions.

Another fun note: OVC made it up on boingboing.net (source seems to be from our innovation.rit.edu blog).

Thursday, June 17, 2010

Busy, but some progress

Ok so the past few days have been full of busy distractions. We have been preparing some materials for the NTID Tech Symposium, playing around with creating sugar usb sticks, stopping by posse, lunch presentations with the other summer research fellows, getting and setting up our own mini computer lab in the foss box, and much more. There are a lot of great things going on in the innovation center and I am glad to be apart of it!

So update with the fortune hunter game engine.

I have been working on a feature to allow a dev console to be added to the game (ticket #5). Recently I was able to successfully use the dev console to edit integer and string data. I have been having some problems with this because of the way python is designed. Luckily python still has some leftover global scope functions like hasattr and setattr which were of great use to this ability. The game engine now keeps track of the last element and token when finding the requested object which can be passed to setattr giving us access to modify the object.

The next step will to support the ability to create more complex structures then int and strings.

Screenshot of dev console setting an enemy's health

Tuesday, June 15, 2010

Game Engine Pep8 Compliance


Well today was told about the pep8 python standard which is a little bit more picky then I am when coding. So today I spent a few cycles making sure my game engine is compliant to this standard. I even found a nice vim plugin that allows me to check my code from right inside my editor.

I may need to also run pep8 on the pyconsole.py file to be able to say my game engine is completely compliant, but that will come later if I have some spare cycles.

Console Set Variables

So it looks like having my console modify variables is very hard if even possible with how python passes variables. It seems like python won't allow the game engine class directly edit variables that it doesn't know the path directly. So taking user input and searching for the variable seems to not work. I will have to do some more research and hopefully I will be able to figure something out.

Monday, June 14, 2010

Fortune Engine Dev Console Inspection

Well as we are all still busy working on our tasks. I have been busy writing a debug tool into the game engine. This is a dev console that in its current state, it can view variables and modules in the game. This will be helpful when debugging the game, no longer will I have to add in print statements and restart the game. I can simply open the console and inspect the element.

Today I added the ability to inspect attributes and follow them to new elements (change set) using the dot notation.

Inspecting the battle module

Inspecting the battle module's room variable.

Next I plan on supporting dictionary element lookup so that the developer can check the state of an element inside a dictionary or list. After that, adding a way to modify the state could be useful, but could potentially be dangerous to the games internal state. So that might require some more researching and thinking.

Wednesday, June 9, 2010

Fortune Hunter is back in development

Well Monday marked the end of our fortune hunter break. We have been working hard to get back into action. Three of our original members, Dave Silverman, Keven Hocky, and I, will be actively involved in some way with the project. We have also picked up a new member, JT Mengel.

The Teams

There will be two teams working on fortune hunter this quarter.

Our art team, Dave and JT, will be working on researching and developing graphic standards/techniques for limited platforms like the xo. Their goal will be to come up with some graphic standards that will help rendering performance on the xo laptop. Their research will use fortune hunter as an example implementation.

The game engine team, Keven and I, will be working on creating and optimize a game engine that will be used for the game. This engine will allow easier debugging and cleaner code from the developer's point of view. It will have features like a dev console for debugging and hopefully a snapshot system.

Progress So Far

We have started to improve the game engine from the standpoint of the developer. Today I started off by splitting the game engine away from the main code to keep it clean and organized (t8). This will allow me to package the engine later on as a standalone that other developers will be able use in the future.

After that, I have been busy adding a Developer Console to the game engine (t5). My hope is this developer console will be very useful in debugging the game by allowing access to the game engine internals as well as access to registered components to the game engine.

I thankfully found a console script for pygame that I could just add to the engine. My next step will be to get this console to be more useful by writing methods that will allow inspection and modification of game state.

Infrastructure Update

Fortune Hunter now has a trac on fedorahosted that can be found here: https://fedorahosted.org/fortune_hunter. This track is now hosing our git, a doc wiki, and ticket system. I will still maintain our other git repo, but our developers will work out of fedorahosted.

On another front, foss.rit.edu is now getting some attention, we got some people now blogging on it. Always great to see more people working on the site.

Thursday, May 27, 2010

Media Wiki Visualization Update

I haven't had too much time to work on the visulization, but I have added a notable feature. Now when the visualization loads up it requests a list of all the pages on the wiki. This allows the user to have a better idea on how many pages there are and how few linkages exist.

I think another major feature I need to add is a way to keep track of categories for every page. That will allow it to look a bit more linked as some wikis rely on the category system as part of its navigation scheme.

I have uploaded another video with this all page list feature.

Friday, May 14, 2010

MediaWiki Visualization

This is a preview of a work-in-progress visualization script that uses the MediaWiki api to visualize users and page edits. This is an example on rit's Ritpedia.

The visualization is currently using ubigraph to draw the visualization and a custom python program to generate the data for the graph.

Pages are represented by blue squares and users who edit them are represented by the red diamonds. As pages are edited by a user, they are added to the graph. It also creates nodes for any page that the edited paged linked to.

The second mode disables the users and just shows the pages and how they are linked. Note that this is still a very new wiki.

This visualization can run in almost real-time (pulls updates at a configurable interval).

MediaWiki Visualization Preview

Tuesday, May 11, 2010

Started Performance Testing

Well today we have started performance testing which is exciting. We will have our xo's set up over in the NTID building asking students who use American Sign Language to test out our activity and provide feedback on the video quality, as well as some features that they would like to see in future releases of Open Video Chat.

Also uploaded the copy we are testing to activities.sugarlabs.org.

Monday, May 10, 2010

Pythonic Pipeline

Well today my big accomplishment was to convert the pipeline from a configuration string into python objects. This commit finished up ticket 49.

Other then that in ovc land, I have been trying to figure out a nice work around with our rtp bug which seems to be an upstream bug which was recently fixed. Now we need to wait for it to be released and mainstream. Until then, we have been playing with trying to find a work around. It looks like we can hardcode the header into the code, which I would like to avoid. This means at the moment I'm trying to find a nice way to get the caps and pass them through our existing telepathy connection.

Some other news, this week we will be doing some use testing with our target audience, people who are able to communicate with American Sign Language. This will be great to get some feedback about our video quality and hopefully some suggestions that could improve usability.

Aside from working on Open Video Chat, I have been doing some updates to foss.rit.edu. We now have better multimedia support with photo and video albums as well as a module that can support audio files correctly.

Tuesday, May 4, 2010

Getting ready for a release

Well things are getting there.  Today I closed up a few tickets and bugs.  We got a new svg logo for our activity (t47) and I wrote a temporary fix for one of our annoying bugs where the video sink would stop playing the video feed (t52).
Now that we have a new logo, we will be able to release the activity.  I am still holding out for a solution to our rtp bug.  While trying to work that bug out, I have been tackling a few smaller issues that we will have work out anyways.

Monday, May 3, 2010

RTP with Theora

It appears that the problem we have been having with theora and rtp is a known bug. After talking on irc, someone has pointed us to a bug report that seems to be the issue we are having. The good news is that it was marked as fixed. The bad news is that it was fixed just three days ago, so there are no builds we can just grab. We may have to build part of the gstreamer pipeline from source just to test and verify that this is indeed the bug.

Well that is my little update. We have been adding tickets, documentation, and starting to build a plan for the remaining few weeks as well as how we want to start back up during the summer quarter.

Saturday, May 1, 2010

Photo Dump: OVC and MAFH at Imagine

Here is a little photo dump from our exhibits at Imagine.

Of course, any chance we can get to fix an xo.

Walter Bender @ RIT

Walter Bender, Executive Director of Sugar Labs, gave a presentation for RIT's GCCIS Dean's Lecture Series explaining the reasoning behind the Sugar Operating System and a few advanced features of the OLPC.

The OVC and Fortune Hunter Team.

We got a mention in Mr. Bender's Sugar Digest 2010-05-03.

Wednesday, April 28, 2010

Fixed one issue with too many participants

Well today I tackled another known problem. When a third user would join the existing chat, the two other participants would crash. This would happen because the pipeline would be in a running state when the code attempts to change the pipeline. This was causing a mutex error in the gstreamer pipeline.

The first solution I thought of was to just set the max_participants property in sugar. Well to my surprise, it doesn't actually enforce a max_participants, instead it is used more like a boolean inside sugar's code. It the variable is found to have a value of 1, then it disables sharing and any other value is ignored.

This was very annoying. After confirming that the max_participants was useless in the sugar channel on irc, I had to write my own system to prevent extra participants (ticket 45). This solution allows the third person to join the text chat only, no video. A potential future implementation will allow other participants to choose who they want to talk with from a list of connected users.

Monday, April 26, 2010

Theora + Gstreamer + RTP = Annoyed

Well I am a bit annoyed at the moment. I have been trying all day to get rtp working in gst pipeline with theora. I have been able to get rtp and h264 working together, but no luck when it is using theora. I have been asking around on the gstreamer IRC channel on freenode with no real responses. My only renaming guess is it may have something to do with the caps filter on the receiving pipeline or there is a bug.

I have been testing this outside of my code just using gst-launch. A shell script using h264 can be found in the git repo.

This is a blocker in my opinion to release on activities.sugarlabs.org as having it work some of the times with the solution to retry the connection until it works is unacceptable. Hopefully I can get this figured out soon.

Other news, we have been getting ready for Imagine this weekend.

Thursday, April 22, 2010

Still working on rtp and gstreamer

This week we have be working on a bunch of little things here and there. We are playing with some frame rates seeing how the xo handles them. We currently have it running at 15 frames a second pretty well. We can push it to 20 frames a second, but our preview frame takes a hit dropping below a frame a second. This is because the preview is using ximagesink which is not hardware accelerated.

We are currently working on getting RTP to work so that we can sync our header packets. We have been asking in the gstreamer irc chat room without much of a response. If we get this working, we will be able to merge both pipelines into one pipeline and therefore one xvimagesink because there will be no race conditions for the header packet. With that we may be able to push 25 frames a second which would be a real accomplishment.

Tomorrow I am planing on packaging our activity. I really hope to have the RTP working by then, but that might need to wait for future release.

On another note, os build 120 was released the other day and fixed our screen tearing and xvimagesink issues with our code. This means slightly better frame rates and image quality. Kudos to everybody making this patch available!

Tuesday, April 20, 2010

Started Remote Testing

At our hackfest the other day, we were trying to test Open Video Chat across state lines. With some minor luck, we were able to see video from D.C. Unfortunately, we were not able to get our video to them. Today I we gave it another try, and I found one of the problems we were having. Our code was querying eth0 for its associated ip address. This means our code was not working when someone was using another device to connect to the net, like a USB Ethernet adapter. I was able to commit a fix that would search the device list for the first one it can get an ip address for.

This is not completely ideal as it should just be able to use telepathy without having to deal with ip addresses. In the codes current stage, it still will have problems with being behind a nat as its external ip address would be different then its associated address.

We have one more critical bug to work out, then later this week I expect to release a beta copy on activities.sugarlabs.org. So keep an eye out!

Monday, April 19, 2010

Boston Barcamp and Hackfest



We went to OLPC Headquarters for a hackfest.

At the hackfest we were able to get a few major goal completed including a framerate of around 14 to 15 frames a second.

Here is a picture of Remy and Luke chatting! (just before we got it up to 14-15 frames a second)

Checkout out this post by our story tellers: FOSS@RIT goes to OLPC HQ.

We also have another short video of OLPC Headquarters.

Remy DeCausemaker had an interview with the head of HR.


The ovc team went to Barcamp Boston and presented about OVC and other Foss initiatives at RIT. I feel our talk was decent. It felt much shorter then thirty minutes. We will be posting a video of our talk as well as a few other talks we managed to record. That will be posted later in the week.

Thursday, April 15, 2010

OVC is going to Boston

OVC To Barcamp Boston

Ok So we are going to Boston, it will be fun! We couldn't resist making a little teaser video.

On a more serious note, today we got a suggestion from the community on a set of cap filters for our pipeline to improve performance. It has helped. So today I am also tried to get it to show the outgoing feed as well as the incoming feed so the user can see how they are in frame. I added a tee into the pipeline which caused some issues. Now we know that we need to use a queue following the tee. For some reason, the xo is still refusing to run the pipeline in the activity where it works fine from command line. I will hopefully tackle that problem tomorrow.

Hope you enjoyed our teaser, next post will be in Boston!

Wednesday, April 14, 2010

XO Codec Testing

Well yesterday we were playing with the xo, seeing how they benchmark existing video chat clients and other video codecs we had access too. Using empathy's video chat system we found that the xo's were unable to connect to non-xo's. We were able to connect xo to xo pretty well. The only problem is it took a while for it to make the connection and once it was connected, the frame rate was about a frame ever two or three seconds at best.

We were looking into using other codecs, yet the xo's only seem to have access to two of them in a typical install, Theora and Smoke/jpeg. While playing with the gstreamer pipeline, we decided we should try writing our own filter to cut down the frame size by cutting out the color scale on yuv before sending it into Theora. All the current greyscale options require converting colorspace which seems too processor intensive for the xo's. So by writing our own filter that runs in native yuv, we should be able to compress the image further without the multiple colorspace conversions. Our filter would also shrink the resolution quickly as it would be designed specifically for the xo camera's 640 by 480 resolution. The resizing method in gstreamer seems to be too generic and therefore slower then we would like.

We are also still having problems with using Farsight.

Friday, April 9, 2010

Week 4 Review

Hey, sorry for the delay in blog posts this week... It has been a bit busy. Unfortunately not as productive as I would like. Our barcamp took a quite a few cycles out of our dev time, but it was worth it. We have also visited interlock twice this week. The second meeting was much more beneficial. We got into a couple of conversations with a few people there about our project and got some good ideas. I think I will have Fran take a look at writing a gstreamer plugin to cut the video size by half efficiently instead of the all purpose one built into the current pipeline. That might reduce the bandwidth and size without killing our processing cycles on the xo. Otherwise, we didn't get as much dev work as I had hoped.

We have also been spending time getting ready for a Boston Barcamp and a Gnome Python Hackfest which will be fun.

Our ASL is coming along. We are still having class twice a week and this week, we also visited the No Voice Zone at RIT. The No Voice Zone is a weekly event where hearing and non-hearing people get together and try to bridge the social barrier and teach/learn some American Sign Language.

I have also been trying to get telepathy and farsight working together... in its current state, the script isn't very reliable. I can get it working part of the time randomly. So I think this weekend, I will trying to find some decent documentation and hopefully re-write the script.

Tuesday, April 6, 2010

Example Script Update

Well, we recently found an example script that allows us to do video chat the correct way with telepathy-farsight. Today we have been doing a little experimenting with it. While the results are promising on non-xo's. It is still not running as reliable as we would like. Our goal tomorrow is to figure out why it keeps having problems and to start adding its functionality to our activity.

I have committed one change that allows video to run both ways.

This will be vary valuable in our Open Video Chat activity once we can work out the problems. After that, it is just optimizing the code for the xo.

Monday, April 5, 2010

Foss.rit.edu updates and test code

Today I did some work with our Foss.rit.edu landing page. I updated the news aggregator so that it now supports images and added some new feed sources. After that I added an empire page that will hold our links on the net. It will be uses as a central link list of all things foss at rit. Some links include our accounts we host media and places we syndicate our stories.
I also added a blog feature to allow our members to have their own blogs. Forums and comments have been enabled as well. The goal is to increase activity and participation in foss events at RIT. Next step will be to open up the registration system on the website.

We also started playing with some test code we found last week. We setup the server with two test accounts for the master/slave setup the script uses. We got the audio somewhat working, a bit noisy but it is working both ways. The video is a bit temperamental, it seems to work sometime but other times it gives us problems. The example script can be found in our git repo.

Also look forward to possibly a hack fest! More information coming soon.

Sunday, April 4, 2010

Week 4 Review: Video Hack

Video Hack

  • We got video to work using a nasty hack that gstreamer provides.
  • This hack was a temporary solution to allow us to test the encoding and decoding of the video.
  • After updating our xo's, we were able to test it with xvimagesink. This sink gets about double the frame rate of ximagesink which will be helpful.
  • It is currently using the theora codec, which the xo systems seem to have trouble with. Future optimization will be needed.

Cleaner Video

  • We have been looking into streaming video the correct way. We plan to use farsight and telepathy to complete this task.
  • The example code we have from the original video chat activity is unusable. It used binary copies of telepathy, gstreamer, and farsight which makes it hard to understand and ugly.
  • We found some sample Code that is understandable. We just need to get it working and then try to port it into our code.

Story Telling


  • On Saturday, we attended barcamp and gave a small talk about our project and other things that RIT does in the foss community.

Friday, April 2, 2010

Episode 4, Interlock, and xvimagesink

Well today we brought over a couple of the 5Linx video phones to Interlock, gave them a few new toys to play with. Earlier I re-flashed our xo's with os build 117 which gives us access to the shiner xvimagesink. This new xvimagesink in the gstreamer pipeline allows for a better frame rate as changing the color system is not needed. While at Interlock, Fran gave the new sink a try, and it doubled our frame rate. This is huge as we are using a nasty hack which is killing our frame rate as it is.

Today I also found a promising code sample that could be useful as it shows how to use telepathy and farsight without the nasty binary hack in the original video chat code. So that may be very useful.

On a great note, our Episode 4 is up!

Tuesday, March 30, 2010

Video Hack update

Ok, today I added a little patch to the hack, now it works... most of the time.

This hack needs some work. We need to play with the gstreamer settings a bit. In it's current state, it runs around 85% cpu and the frame rate is at best 1 frame a second. Next task is to implement the system using farsight and telepahty.

Remy also showed us some of the civx system. It is an interesting piece of software, and a great idea!

Monday, March 29, 2010

A day of Research and a Hack

Well today was mostly a day of chatting and research. We were actually getting some decent feedback from the IRC channels which is great! While testing out different gstreammer pipeline strings, we decided to add our hack string to the activity. So now our activity is using a udp sink to send and receive the video. This is not a good solution, but it is an interesting hack for now until we get a chance to do it the correct/preferred day.

Another great note, Episode 3 was finally posted!

Saturday, March 27, 2010

Week 3 Review: Chat system

Fix Webcam on 1.5

  • autovideosink seems to be broke
  • Currently using xvideosink

Modularize the code

  • Split up the code into classes that allows easier editing


Even More Hardware

  • 5 Linx Donated 12 of their video phones (10 old and 2 of the new model)
  • Their hardware supposedly runs linux, so some cool hacking might be possible in the near future
  • We are planning on bringing a couple of them to Innerlock Rochester and see what they can do with them

Basic Chat

  • We now have a working chat system
  • Basic join/leave messages, basic chat
  • Need to implement names with the messages, but otherwise things are working well.

Community Help

  • When asking for the community for help, we got a few RTFM's. The manual they were pointing us to had "to be documented" pages in the video section.
  • trose, had a conversation that may be helpful (we will see next week).


  • We recoded episode 3, but as of this moment it is still not online. I'll post a link as soon as I see it

Social Networking

  • Trose also started a facebook fan page for open video chat.

Wednesday, March 24, 2010

Working Chat System

Well today, Trose and I sat down and wrote a prototype front end for our chat system. It still needs some work, but is completely functional. I was helping him edit the existing GUI code I wrote the other day at the same time I was learning some more GIT skills. We are now going to test our code by using a dev_test branch to pass our code on our xo's. Once it is stable, it is copied over to master. We will be copying the commits over to master to keep the history intact. we will need to play wit this a little bit more in the future. If anyone has any git suggestions to follow this kind of development, let me know.

Tomorrow, I hope to get some work on the video system. We plan on heading to InnerlocRoc again, maybe we will be able to get something working.

Tuesday, March 23, 2010

Start of Chat System, Documentation

Well today we wrote up a basic design document and posted it to our git repository.

We also got a basic implementation of our chat system. It still needs some work, but the proof of concept is there in the protocol. The next part will be to get the GUI to display sent messages better then an alert message. Later on, it will be interesting to see if we can get it to work using existing protocols.

Today, 5links donated ten of their old and two of their new model video phones. We were able to power them up and awe over the new hardware to play with.