Windows Woes
September 11th, 2008
Warning: This is a tech-heavy post, mostly about coding and setting up source projects. You’ve been warned.
I spent most of the last two days trying to port my prototype over to my Windows machine. I’ve been using my MacBook as my primary development machine since my Windows box has been acting strange since the move.
First I had to get Subversion installed on Windows, which was quite easy. I was able to sync down my repo and see all my files there. Isn’t source control amazing?!
This is where things got tricky. I downloaded the Playfirst SDK for Windows and set about installing it. I’m sure everything would have gone smoothly if I’d installed it exactly as it came, but my directory structure is set up to keep the parts of the SDK that are platform-independent separate, while all the game logic that is platform agnostic sits only in one place. Sounds simple enough, but it complicates things.
The first problem I ran into was that I downloaded Visual Studio C++ Express 2008. After a few hours of mucking about with the solution file and reading through forum posts I discovered that Playground only builds under Visual Studio 2005. Crap. So then I spent 2 hours this morning uninstalling all the crap that VSE 2008 installed on my machine. I’m running dangerously close to 0 HDD space on that machine, so I needed every MB back that it took from me.
Once I finally had 2008 gone, I dug around and found VSE C++ 2005. I downloaded that and got it installed. Now I was able to go back in and reconfigure the solution file to point to all the strange directory paths that I have and point the project to the appropriate libraries. That’s when I discovered that it needs the Windows Platform SDK, which doesn’t come with VS Express. Turns out Microsoft doesn’t want to make it easy for you to write C++ code, as they’d rather you wrote everything in C#. Anyway, I downloaded that and then spent 30 minutes finding stuff to delete off my HDD so that I’d have room to install it. Phew.
Finally I got the game compiling. I discovered that XCode is much more forgiving when it comes to compiler warnings and errors. For instance, I had ended up with an array of size 0 in my code. XCode was happy to let that compile, but VS was having none of it. I also discovered a bug in how I was using the STL List iterator in my code. The Mac OS was fine with what I was doing (which was something very bad), but Windows crashed and burned.
At any rate, I finally got it all compiling and running in under 2 days. Not too shabby! Now I can play the prototype on both computers! Whee…
Owen





