FileWatcher library watches files while you play

Spurred by an article a while back in Game Developer Magazine, I decided to write a little cross platform library for detecting changes in files. The library works in both Windows and Linux (tested in ubuntu 8.10, but should work in anything with inotify) with support soon coming to OSX. The library is great for automatically updating game resources during development. Most real game engines have this these days, and now everyone else can too!

The library comes with two samples. OgreDemo.cpp shows a simple example of reloading textures on the fly using the Ogre3D engine. SimpleDemo.cpp just watches a directory and outputs the file names when a file changes.

Some example code:

// Create the object
FW::FileWatcher* fileWatcher = new FW::FileWatcher();
 
// add a directory watch
FW::WatchID watchid = fileWatcher->addWatch("..\\media", new UpdateListener());
 
...
 
// somewhere in your update loop call update
fileWatcher->update();
 
// where UpdateListener is defined as such
class UpdateListener : public FW::FileWatchListener
{
public:
    UpdateListener() {}
    void handleFileAction(FW::WatchID watchid, const String& dir,
                                    const String& filename,
                                    FW::FileWatcher::Action action)
    {
        std::cout << "File (" << dir + \\ + filename << ") has event "
                        << action << std::endl;
    }
};

Download version 2009.02.17

Read More

XBox 360 Development with XNA

Not that its news, but XNA along with a membership to the XNA Creators Club allows developers to create games in a unified system for both Windows and XBox 360. Although XNA uses C#, which I personally had reservations against, it is actually quite easy to develop on and even fun to use. XNA has now abated these reservations about C# and has persuaded me to try to port my project to the 360.

With sound, networking, a solid widely used gamepad interface, and excellent graphics capabilities the XNA platform seems ideal for small games development. The only reservations still present are against the relative immaturity of the community (as opposed to Ogre‘s which is superb) and the lack of distribution mechanisms. The distribution problem is slated to be resolved with a rating system within the developer community, but this just comes back to the other problem.

There is, still, a significant amount of community generated content for learning and using XNA, but I worry about the platform if it does not attract a higher concentration of mature developers. We shall see.

Read More

Late-Binding Data for Ogre

The Feb ’05 edition of Game Developer Magazine had an article titled “Late-Binding Data” and described an extremely useful mechanism for automatically reloading data into a game engine dynamically when the data has been changed.  It detects when a file has been updated and repopulates the data throughout the system.  So, an image/model can be exported from some other program and the results will be immediately visible in the game. No reloading!

This sounds like a huge time saver in the long run, but right now its turning into a significant time sink.  I figure if this functionality would be useful in my personal project, it would likely be valuable to others as well, so I’m going to try to integrate it into Ogre.  Should also prove a useful exercise in using Ogre as well.

Read More

Game Developer’s Conference 2007, recap

So, I attended the Game Developer’s Conference 2007 in San Fransisco. Was a rather good time. Hanging out with tons of people who love making games, playing games, and drinking. It hadn’t occurred to me that game developers would be notorious binge drinkers, but it really makes since after some thinking. After all the sessions ended, if everyone didn’t go to an after-party to get smashed on free booze, we just wandered around the expo center and pillaged the free beer from the studios/vendors.  A good time was had by all.

I shook the hand of the man who invented Tetris, saw Shigeru Miyamoto talk about Mario, and Eiji Aonuma talk about Zelda (both of these talks were nothing less than spectacular), and met the directors/developers of many studios who make some of my favorite games.  Most of the vendors/studios were giving out tons of swag; picked up numerous t-shirts, mugs, stickers, etc.  One of the things I got was a free copy of Madden 2007, which I will rant about later.

After talking to many recruiters and other developers I’m feeling much more marketable now.  Not necessarily in comparison to them, but in comparison to what they are looking for.  It really puts the industry in to a slightly more friendly and tractable perspective.

In short, the conference was an absolute blast. Will definitely have to make it a habit.

Read More