History

I hate menus

March 18, 2009
Development, History

Or to be a bit more specific, menu coding. The most agonizing part about working on Seal Hunter so far has been to get a decent menu system going, to the extent that I’ve actually been forced to (re)write the code for them a total of three times.

The first time around, I decided to simply go for Allegro’s built-in GUI system. As a feature of the graphics library itself, these were rather easy to implement and “everything just worked”. They looked terrible, but what the hey, that’s of no importance! However, as development progressed, the major issue with this approach was that they were a bit too obtrusive on the engine itself. Anytime a menu is displayed, it’ll run in a separate loop. To put this in laymen’s terms, overlaying menus on top of the game itself was very, very hard.

Very old menus

After realizing that little kink, I decided to try and rewrite the menu engine to work asynchronously from the rest of the game – in other words, being able to browse a menu without having what might be going on in the background freeze up. To put things lightly, this was way harder than I initially thought and in the I had a very unintuitive and rather sluggish version of the original GUI. I probably would’ve settled for this system in the end, but then a friend of mine discovered that these new menus somehow crashed the game for him while running on his system. I spent a fair amount of time trying to find the cause of the problem – probably two weeks, procrastination included – before giving up.

Old menus

This was the single-handedly most important lesson I’ve ever learned from as a coder, and I feel stupid today for not paying more attention to the this earlier in the course of development. Do not reinvent the wheel. I had a look around for a menu library and ended up with Guichan. Thank <insert name of deity> for it; Guichan was excellently designed and very easy to customize (read: I changed a few window colors) and it was much easier to extend than Allegro’s GUI. The few issues I had were quickly resolved thanks to the library developers and a few searches of their forum. Still, there was a lot to adapt from the remains of the old menu, and this was one of the more painful and excruciating processes I’ve been through with this project.

New menus

In today’s news, with most of the menus actually finished up, I can finally focus on the game itself again. Right now I’m working on some of the lobby<->server communication, which I actually enjoy in its perverse ways.

And stay tuned for a look at a new and quite major feature of Seal Hunter.

Fun to the Z

March 6, 2009
Development, History

Whilst Seal Hunter thankfully is a 2D game, there’s still a Z property of certain game objects in order to give the illusion of depth in the scene, and since it’s pretty darn useful to have when it comes to particle effects. This was in itself entirely trivial to implement in 2D back in the day (just offset the y coordinate by the distance the object is above the ground etc etc) – but the difficulty of adding it to the game isn’t what this is about, it’s moreso a proof of how extremely messed up I am.

Urine Engine

Like how this was the first method of testing bullets that came to my mind. Yay! It’s a… Oh dear. I’ll happily leave any interpretations of the above to the reader – for better or worse. (And yeah, I know the reflections are closer to shadows in this screenshot. That particular issue was fixed not a long time afterward, soon as I actually realized how the real world works.) Having a peek at the screenshot below, you’ll see the results of increasing the blood amount an itsy bitsy bit and increasing the initial Z velocity of gibs; a frickin’ volcano of blood and meat after killing a single seal. Yeah, I was bored, but it sure looked spectacular.

Blood Volcano

Besides allowing for the implementation of bouncing weapons such as the grenade launcher and the thrown hand grenades, the possibility to do the jump-onto-crawling-seal-and-crush-the-hell-out-of-it move was added in as well, but this time with a rather major change. In my version of the game, jumping is entirely player controlled, which basically means the jump action is bound to a key just like moving around on the field is. This was mostly due to being too lazy to sync up the automatic jump animation across a network, but it also added a bit of a challenge to finishing off a crawling creature (I might be a terrible player, but I think it’s bloody hard to actually land a jump perfectly). For the curious, you aren’t able to fire your weapon while mid-air either; the reason for this being that weapons with bouncing bullets (again, the hand grenades and the grenade launcher) got way too powerful.

Bouncing Mines

Speaking of bouncing bullets, and to finish this God forsaken post off, there was a rather amusing bug early on related to those that lead to us playing around with it for about half an hour. And yes, that screenshot is very old. Basically, whenever a bullet bounced off of the ice, its Z velocity direction will be negated (so that it will bounce back up after going downwards) with a loss of speed as well. This was accidentally also applied to the X velocity (the horizontal speed and direction of the bullet), which lead to bullets that got ‘stuck’ after a few bounces, becoming stationary on the ice and not disappearing until an unlucky enemy walked straight into them. Oh gee, mines! Hilarity ensued, and that’s all there is to it, pretty much. Was fun while it lasted. ;)

The First Prototype

February 19, 2009
Development, History

Thanks to a prolonged exposure of The Seal Hunter and a three month Internet outage, I finally got bored enough to actually open up Dev-C++ (a (very bad) C++ IDE, for those who don’t know already) to see if I actually would manage to make anything more graphical than a console application that asked the user for their age. As it were, the only library I had available to me was one called Allegro – so I made the only logical decision to create a simple pong clone. I’m glad you aren’t able to see the code in that one; it’s downright terrible. But then again, so is Seal Hunter’s. ;) Anyhow, soon as I felt a bit more comfortable I simply ripped the main ice climber graphic from The Seal Hunter, and actually managed to have him walk around on the ice without it looking all too terrible. (Well, there were no real animations, so it actually looked really terrible.)

Have a look at the two screenshots for a comparison that proves, mainly, how far things have progressed since this first prototype and how utterly utterly bad said prototype was.

The first SH prototype

The version today

…Yeahhh. The first screenshot is from the oldest version of SH I still have, and its executable weighs in at a stunning 64 KB – and even then, it took me 237 builds to get that far! Things were really quite experimental back then, and looking back, I had some really weird ideas in mind before deciding on the ‘simpler’ remake with multiplayer support. The more observant readers might notice that in the first picture there’s an actual crosshair that could be used to actually shoot in any which direction you wanted; including to the right of the actual player. Needless to say, this idea was dropped rather swiftly – to put it bluntly it kind of ruined the original concept, and very thoroughly at that. There’s no animations at all, and the blood is very crude looking. What is interesting to notice is that there was a limit to how far a bullet could travel in this version – after reaching that limit, it’d simply shred into the ice and cause a bit of snow and ice to spray from its point of impact.

As for the second second screenshot, I’ll just let that be a teaser for the time being. There’s still a rather long way to go before actually discussing the version I’ve got today. Oh, and in case you were wondering: there’s no set date when a possible beta phase will be reached, or when the game itself will actually be finished. As mentioned earlier, Real Life™ and procrastination goes a long way in slowing these things down.

Until next time, adios!

In the Beginning

February 16, 2009
Development, History

I figured giving a quick account of how this project came to be would be in order.

It all started one rather snowy day in the year of 2007. After having just finished a four hour web design class, a senior student walked into the room to showcase his latest findings in the field of gaming excellence: a rather compact game named The Seal Hunter, where the player entered the thick threads of a Norwegian fisherman seeking revenge on the seal creatures stealing his catch. With guns. Big guns. And blood! Tons of it.

The original The Seal Hunter

Needless to say, I was enthralled. This simple concept of killing seals, assuring that not a single brown-furred mammal managed to creep past you, made for a most pleasant gaming experience that could be thoroughly enjoyed in about five minutes, even though the muttered phrase “just one more go” usually extended those to about half an hour.

The only form of multiplayer offered by The Seal Hunter was a two player hotseat, which in itself was a plethora of amusement for two friends huddled in front of a keyboard. However, I wished for more; multiplayer over the Internet with others, for one, which ended up being the basic premise for my own version of Seal Hunter (in addition to the original concept of “blood and gore is fun”, I suppose). So I decided to try and make a quick prototype in C++, just to find out if I had enough know-how to make a full game out of it. After managing to construct a rather ridiculous test level where seals appeared randomly and with no animations whatsoever (aiming using the mouse was even possible at this point!) I had a word with the authors of the original game, asking whether or not I was allowed to develop a version of my own. This seems like a good moment to throw out a big “thank you” to them once again, because as it is they are a pair of really nice guys who were rather quick to let me brutally tear their game apart. Thankfully, they also allowed me to use their art assets, which saved the project from instantaneous doom as my efforts when it comes to game sprites usually results in flood-filled blobs. As I turned senior myself, I even managed to sign up Seal Hunter as my graduation project.

And a little bit more than a year later, this is where we are now. A lot of progress has been made (despite great deeds of procrastination) and I’m quite happy with where things are heading right now. Over the next few weeks I’ll try to gradually work my way up from the initial prototype to where development currently is, to give you an idea of how this journey has progressed.