Sunday, December 27, 2009

Creating an installer for my XNA game + Prerequisites


Recently, I was looking into the possibilities I had for packaging my game (read more here). The first option I tried was the so called ClickOnce installer that is integrated in Visual Studio 2008. It turned out to be a bad choice for my particular needs; I don't need a java webstart clone, just a regular MSI installer package.

So I began my search for an install creator on the internet. Very soon, I stumbled upon Advanced Installer, which looked decent at first sight. It uses a reasonable licensing model; You have to pay for advanced features, but the basic use is free. I don't need advanced features, so I gave it a shot. And it turned out to be pretty good.

A particullary nice feature of this install creator is the nice prerequisites management screen. I defined the system requirements for my game there:
  • Windows version: XP or later
  • .NET Framework 3.5
  • DirectX 9.0c
  • XNA Framework 3.1
  • 1024 x 768 minimal screen resolution

The installer will check automatically if all prerequisites are present, and shows a warning if they don't. This is great, but not perfect (see next section). The result is a nice Setup.msi ready to spread around. I still need to test the install on a lot of different configurations though, but I'm quite confident that it will work.

System requirements

Some more on the system requirements: I think they are very reasonable in general, but two problems arise:
  • .NET Framework 3.5. I know for a fact that not every user has this installed, although it comes with windows updates if I recall. Yet, it is a large download and a requirement I can't drop.
  • XNA Framework 3.1: It's required to run games created with XNA gamestudio. I'm pretty sure no living soul has this installed, but it's a very tiny download.
I have not yet found a way to make the installer download these dependencies automatically. Including them in the package is not an option either. So most likely, the final download page for my game will include two old-fashioned download links. Sad but true.

This makes it obvious why most casual games are created in flash. All a player has to do is navigate to the webpage, wait 5 seconds for the game to load and play. And probably 99,99% of all people has flash installed.Too bad I'm a C# programmer, not an actionscripter...

Another platform I could have used is Microsoft Silverlight. Silverlight has the advantages of flash, and allows me to use C#. I seriously considered using Silverlight when I started this project... But the DirectX features you get with XNA are just... They make you feel like you're actually developing a game (with decent GPU support), instead of trying to turn a business application or browser plugin into something that looks like a game :-).

So that's the way it will be. Anyway, considering the amount of promotion/spam we'll throw at it, I don't expect that it will be too hard to find 100 "test subjects" willing to try it out. Let's just hope these system requirements are not too annoying. Anyway, I'd love to get some feedback on this one...
  • Do you have Microsoft .NET Framework 3.5 installed? (you can check this in "add or remove programs")
  • Is it too much to ask from a potential player to install the XNA Framework, or even the .NET framework in some cases?
  • Finally, if you are a software developer: Any experiences with 'advanced installer'? Any other install creators I should check out?

Tuesday, December 22, 2009

Work In Progress: Side-scrolling game

It's about time to present my latest hobby project here. I'm developing a small 2D side-scrolling game, which will be used in a university experiment. The people who take the experiment (which will be 'recruited' all over the internet) have to play the game, and provide input data for the experiment by means of in-game measures and a survey. This data will be processed and presented in a university paper.

I can not disclose anything about the actual subject of the experiment. But for me, it boils down to this: I have pretty much carte blanche for the whole game concept, which made me quite happy but nervous at the same time. Failure is not an option...

I made the following design choices for the game:
  • Casual game, similar to many flash games
  • About 10 to 15 minutes of gameplay time (which is long enough for the experiment)
  • Side scrolling 2D platform game
  • Fit for all ages: no blood and gore this time...
  • Easy controls
  • Two levels: Tutorial level + Real level
  • No complicated story line
  • Free sound effects (plenty of good ones on the web)
  • Royalty-free music from the free domain (which saves me weeks of composing-time!)
  • Fullscreen (resolution fixed at 1024 x 768)
## Technical talk starts here ##

I use the folowing technology for the development of the game:
  • Microsoft Visual Studio 2008 (With the Resharper plugin - there's simply no life without it!)
  • XNA Gamestudio 3.1
  • Farseer physics engine
  • Mercury particle engine
 The time I can dedicate to this project is very limited. There's not much time for second thoughts. I try to pick  an approach that works and go with it. Despite that, I try my best to keep  my code organized. It's a constant tradeoff between code quality and time, but so far I'm still satisfied with most of the design. The constant refactoring really pays off: adding new objects to the game domain takes almost no time, since all the behaviour is utterly generified. The use of the physics library also helps a great deal with this. I'm also somewhat proud that most of the code is clean domain code, not cluttered by engine details. Theoretically, I could copy the domain code, and reuse it in a completely different environment.

## End of technical talk #

The lesson learned so far: I could look at this limitations and time constraints as serious fun wasters, but I don't. Rather, I see them as a challenge. Complicated problems long for creative solutions, and that's what I like most...

As for progress: I'd give the game a 35% completion  rating. But this is a loose estimate. I'm picking up some speed in the last week since the game has to be finished in about 2 months.

I can't provide any screenshots yet... But I will, soon enough :-)

After the experiment is over, I will keep the "game engine" as a "pet project" to play around with, and/or reuse it in another game. In a later stage, I might even open source it...

Friday, December 4, 2009

Acknowledging bad sleeping habits (step 1)

This is a very atypical post for my blog. Nothing about games or other computer stuff, but something more personal. But I have a reason to write it: it forces me to acknowledge a really annoying issue that came up lately.

Today, on a free day, I woke up 4 hours later than I had planned. That's right. Not half an hour. Not 1 hour, FOUR hours. And it's not the first time this happens either. But it's never been so bad like today: I have bad sleeping habits. And I want to do something about it!

Don't get me wrong; I like sleeping. I have no trouble whatsoever with catching sleep, and I don't wake up screaming in the middle of the night. But I'm addicted to the snooze button. Most of the mornings, I don't even wake up the slightest bit, I just keep on snoozing my cell phone alarm, while my stereo system is playing in the background.

Sometimes, like today, I hit the "off" button instead of the snooze button. I found myself waking up in the middle of the afternoon, with no clue what had happened, absolutely no energy and with a terrible headache. And a very bad mood to go with that. Not the start of the day I had imagined; I wanted to wake up hours earlier, have a nice 'brunch' and get things done today...

When I absolutely have to get out of bed, e.g. for work, things are a little bit easier. When there's more pressure to get out of bed I eventually bite the bullet and get it done. But even that is getting trickier and trickier every day. I might have a too-strong evolutionary connection to some hibernating animal; when the weather is decent, I feel a remarkably stronger urge to get up and do something. But with this cold, dark and rainy weather, things get difficult...

Anyway, I could just let this pass and don't bother. But I choose not to. I will fight the demon of  "10 more minutes and then I'll really get up". Look him in the eye and slay him.

So what exactly will I do about that? Not sure yet - First, I will consult the mighty wisdom of the god of knowledge (the internet) through its gatekeeper (google). Then I will return with a cunning plan that might involve anything from adjusting my habits a little to deploying that crazy alarm clock with wheels. I will report my findings here and keep everyone updated on my progress.

Wish me luck and share your snooze-stories here. It will make me feel better ;)

Sunday, June 28, 2009

What I hate about RTS games

I like Real Time Strategy games. You know, the kind of games in which the player has to build an empire, manage resources and order units into battle. Some games I have played in this genre include Age Of Empires, the Anno series, Warzone 2100 and Transport Tycoon (OpenTTD). All of which are great games in my opinion. But there's something I really hate about all of those games.

In the beginning, everything is nice and easy. But after playing for some time, things are going downward. Shortage of resources, army units going in the wrong direction; chaos. As the amount of clicks per minute increases, I get more agitated and frustrated.
Am I the only player that totally forgets about resource management when I start attacking? The only player that forgets to research that very important new technology because I got my head al up in defending my main base? Or, referring to Transport Tycoon, the only player who can't manage 200 busses/trucks, 100 trains and 150 planes? Is that just me being a really bad strategist?

No, it isn't!
In real life, I would have an army commander, a city architect, a financial advisor and the like at my disposal. But no such luck in most RTS games. In a matter of seconds, I have to switch from building a 1x1 square of cobblestone road to directing an army of thousands into battle, and back. In the meantime, I have to monitor my resources and respond to all kinds of in-game messages.

It's all just too much! It means getting the ultimate fun out of an RTS game is only possible for folks who get a kick out of extreme multitasking and micromanagement. And that's just not me. Bringing in another player to assist me won't help either: most RTS games have no option for full cooperative play with resource sharing, which dramatically cuts the possibility of players sharing the workload (OpenTTD being the exception) .


Time for a solution. RTS games need new ways of task distribution and delegation. Where's the eagle eye view? A tycoon leading a business empire worth billions, or a general leading an army of thousands, should at least have an option to delegate the building of 1x1 road squares and similar tasks.
It would be a delight to see some RTS games that do better. Any recommendations?

Friday, June 26, 2009

I'm back!

Welcome to my new blog! The simple nature of a blog makes it a good way for me to spread some thoughts into the world, without investing too much time. Although most posts are related to IT and digital media, this is not a technical blog for IT people only. I'll really try my very best to keep most posts conceptual, rather than technical.

I would be very happy if this blog could:
  • Interest and inspire people
  • Get me some feedback on some of my ideas and thoughts
While not really 'personal' in the way that I tell private stuff that I should really not tell, this is still a personal blog. Which gives me some freedom. I do not force myself to follow every last trend, because I strongly believe that things that are out of the headlines can still be interesting. Freedom is the breeding ground for creativity - And I consider creativity a very, very important skill. No idea killers here!

Since I write about things that are not specific to Belgium (my home country), I would cut off 99% of my potential audience by writing in Dutch. That's why I switched to writing in English. A language which I've not yet mastered, so feel free to correct my grammar/spelling. :)

Any constructive feedback and comments are very welcome. You can also write comments in dutch.