Archive for November, 2009

New software: gljakal’s WAYD

Sunday, November 29th, 2009
What are you doing?

gljakal’s WAYD is the new software that helps you keep track of the time you spend in front of your computer. It does so in two ways:

  1. the first is by keeping track of what programs you use
  2. The second is by downright asking you! Every set amount of time, a full-screen window will pop up asking: “What are you doing?” You can then type in your answer or choose one of the latest answers you gave it.

WAYD screenshot

When you are ready to review your workdays, WAYD’s log viewer can show you your answers or the programs you were using in the specified time period. The log can also be exported to CSV files that you can open with Microsoft Excel® or OpenOffice Calc.

I think that WAYD can be really useful to professionals and freelancers that need to keep an eye on their time. For example, it can be especially useful when you need to determine how much time you worked for a customer last month or last week.
It also requires no discipline or effort on your part: instead of compiling a daily review of your work and storing it in some excel file somewhere in your documents folder, you are forced to report what you are working on every set amount of time (by default it’s every 30 minutes).

So, what are you waiting for? Head over to the download page to start tracking your time!

On the technical side…

Instead of the usual combination of c#/.net framework, I used C++ and the Qt Framework to develop WAYD. I also used Qt Creator as a development environment.

I chose Qt because it has two very important features: first, it’s a multiplatform toolkit, meaning that I could easily port WAYD to MAC and Linux. Second, I can package the Qt library files directly with my application, so users don’t have to install them separately. This wasn’t the case with Clock (that required the VB6 library files) or ToDo (that required users to download and install the .net framework v1.1). One added benefit is that writing WAYD in C++ instead of C# lowered its memory footprint consistently.

I have to say that working with Qt and Qt Creator was a very pleasant experience.
The Qt framework has classes for almost everything, from window management (obviously) to database to date/time formatting.
Qt Creator is a well-thought and easy to use IDE. I’m used to Visual Studio and I had no difficulty at all with it.

Tales of a level editor

Saturday, November 14th, 2009

While having lua scripts as level files is very flexible and “hackable”, it’s really difficult to “see” the level just by looking at a series of instructions.

At first, I used Inkscape, the open source vector drawing program, to create my levels.
It seemed like a perfectly good idea: Just like my game engine, Inkscape uses shapes to define the drawing. Also, since SVG files are basically XML files, any XML loader can be used to read the content of the drawing and extrapolate a game level script.

The real benefit was, however, that I didn’t need to write a level editor, but just a simple program that converts .svg files in lua scripts. I estimated that writing a converter instead of a level editor would save me a lot of time.

I estimated wrong 🙂

The problems I had with this approach were many, but here are the best ones:

  1. I found it really difficult to come up with a series of consistent rules for setting shape properties. I started putting different object types in different layers, so the unmovable shapes would be in a layer named “unmovable”, the movable ones would be in the “movable” layer, the powerups in another one, the traps in yet another layer.
  2. It’s almost impossible to align everything correctly in Inkscape
  3. Inkscape doesn’t save the shape rotation in the SVG file, but only the transformation matrix.

In the end, frustrated by my poor choice, I decided to finally write a level editor.
It took me just a couple of evenings to create a decent c# application that does exactly what I want:

Level editor screenshot

One of the best features is the ability to import the bitmap files I create as mockups and transform them in levels:

level data mockup

(click the picture for a 5x enlarged version)

I have to say that c#/.net 3.5 is a wonderful combination for creating applications quickly!

Lesson learned: Sometimes it is better to create (and eat) your own dogfood 🙂