Monday, September 22, 2008

Zug zug.

It's been a little while. =/

First, last week. Last week most of the Sun people we work with went down to AGDC, a game developers conference in Austin, Texas to showcase Project Darkstar. Since everyone was gone and wouldn't be on the Sun campus, there was no point in us driving to Sun every day. So, we stayed back at home at the WPI campus.

During that time I worked with Project Snowman; in particular, the server portion of it. We've decided that Project Snowman would be a great starting place for our tutorials because it would allow us to focus almost entirely on the server end (the way it should be) and not have to deal with creating a client from scratch. Which also means .... *drumroll* .... no jME! Yay!

Let's call last week Week 4 (being the fourth week of our 7-week term). At the end of Week 3 I had been testing out the Project Snowman server/client on various machines to see how it ran. What I found is that the server portion of the project did NOT work on the Windows platform. So that became my main task for Week 4: Figure out why it wasn't working, and fix it.

I'm happy to say that after a little bit of deliberation, I found out what the problem was. The Ant build script was setting a value in a .properties file used by the darkstar kernel. It sets a value of some variable in this file equal to an absolute file path. Now this is where is gets weird. On Linux (and Mac, I assume) this path name gets read in fine. But on Windows this doesn't happen quite the same way. What I suspect is happening is that there is a small bug in Darkstar itself - when it reads in the file path (which, if you recall, is absolute) it appends that path to the current directory (which it shouldn't do) and then uses that path to look for required libraries. For example, if the current directory was C:\Program Files\ and the path in the .properties file is C:\Windows\, then the final path it tries to locate is C:\Program Files\C:\Windows\. It gets better. If the path that gets read in has any backslashes ( \ ), which is the standard file separator in Windows, it will try and find escape characters such \n (newline) or \t (tab). So now say my .properties file contains a path called C:\thefolder, then the final path looks like this: C:\Program Files\C: hefolder. Really messed up. The current fix is somewhat of a hack, but you can manually edit the Ant build file (which sets the properties file) to input the correct RELATIVE path, using FORWARD slashes, which are still usually interpreted correctly, even on Windows.

Other than that, I've also been looking at getting rid of the Netbeans dependancy for the Snowman Project. From what I've been able to see so far, when Netbeans opens a project file, it creates a couple small files that contain some file paths pointing to directories within the Netbeans install folders. These paths are absolute, and specific to the OS. That being said, there might not be a true "fix" to this problem other than simply writing a new Ant build script that doesn't rely on files that Netbeans creates (which is what it does currently). That is one of my current tasks, but that will come a bit later. And by a bit I mean like, a few days.

Finally, now that my partners and I have spent the last week doing a lot of prep work for this week (mainly doing some research on Project Snowman internals and writing a crapload of documents for our report) we can actually start working on the tutorials. FINALLY. To start, this week we are really focused on creating the first set of so-called "intro" tutorials that don't use the Snowman project quite yet; instead they cover the basics and essentially lead into the Snowman tutorials to come.

So things are looking pretty decent, I would say. These last few weeks are most likely going to be a lot of hard work, but I can't say I didn't really expect that to happen anyways. Until next time...


No comments: