Look out! He’s armed!

28 11 2008

It’s been a busy few weeks, but I’ve managed to make some small progress since last time.

I intend the game to be primarily a straight platform shoot-em-up with minimal plot or back story, so the first thing I added after player movement was some basic bullet handling. There’s currently only one type of gun and one type of bullet, but there’s potential for more.

After that I worked a little on sound playback. The sounds are (like everything else!) just place holders, but I’m sure a few will make it into the final game. The effects are generated by DrPetter’s wonderful sfxr. It’s a great little program. I could play with the parameters for hours, or just keep pressing “Randomize” to see what happens!

I’ve been nagging at myself for a while to try and brainstorm some ideas for player graphics. After several failed drawings of spacemen, aliens and that sort of thing, Hazel suggested a hamster.

So there he is! I’m not 100% happy with the walk cycle yet — there’s something going on with his feet that’s not quite right — but overall he’s not so bad. His idle, jump and fall animations aren’t done yet, but they won’t be too hard to do compared to the walk cycle.

hamsterstandbig

Probably next on the agenda is some work on level graphics and maps. I’m a bit sick of the little room that’s there at the moment, so it will be nice to enlarge it and get some more platforms in there. The gaudy colours look terrible when encoded as a low quality movie, so I really should work on some decent tiles. Then it may even look like a real game!





I ported to XNA and lived to tell the tale

8 11 2008

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.





Slopes and jumping

3 10 2008

I did a little work on slope collision a couple of days ago:

Then I worked on walking and jumping:

It’s a little hard to tell from the video, but holding the jump button for longer results in a higher jump. This is done by applying a lower amount of gravity for first part of the jump, or until the player releases the jump button.





Early days

2 10 2008

One of the projects I’m working on is a platform game. I thought I might record movies of the game’s progress, so here’s the first one:

This video shows basic air motion and square tile collision.

The game is written using SDL and OpenGL, but this may change in the future if I want to port it to other platforms. I find SDL and OpenGL to be a nice combination for getting things up and running relatively quickly.