The game is still small, but there’s enough code there that adding anything certainly feels more like work than fun, which I suppose a hobby project should be.
I was briefly chatting to Alex May (of Dyson fame) and asked him his opinion. It didn’t take much, but he convinced me to port it from C++ to C#.
So it’s taken a little while, but the code is now functionally at the stage it was before (and then some) but written in C# and using the XNA Framework instead of a home-cobbled mix of SDL and OpenGL. Alex reassures me that it’s quite an achievement, but I can’t help but feel disappointed that the game looks identical.
Maybe that’s the real achievement. I ported to XNA and not only lived to tell the tale, but my game managed to stay retro. It’s not that I have artistic integrity, but if I did, it would have been left intact!
About C#, overall I’m finding the language very nice (although I miss Java’s checked exceptions, even if they do have their flaws), and putting things together is rather quick. It almost feels wrong. This isn’t coding… is it? Can it be so easy?
Maybe, but I had to swallow the pill of vendor lock-in. That said, I would like to get the game up on their “Community Games” service.
I put in some effort to ensure that the game looks right on Xbox 360 as well as PC, and in whatever display mode the console is currently in. The last thing I want is for people to play my 4:3 game on their 4:3 TV set and find that it’s rendered at 1280×720 letter-boxed.
Today I did some work on loading rooms from text files instead of just setting them up in code. A “room descriptor” file currently only contains a few lines of information: The name of the tile set to load, the name of the tile layer to load and the position to spawn the player at.
Because I was code-weary and searching for cheap laughs to bolster my spirits, I checked out what would happen if I were to spawn 3 players at different positions. It didn’t turn out to be as entertaining as I’d have liked.
I started to lay the groundwork for creating and moving bullets, so hopefully that’ll appear in an update fairly soon.