In Windows (like every operating system), when you’re writing an application or game there are certain things that your application is responsible for handling: some of them are easy, some of them take a little bit more effort. On his excellent blog, Microsoft’s Raymond Chen calls these responsibilities “Taxes”, and there are good reasons why you should pay them. Windows taxes include things like:

  • Respond to Windows messages correctly
  • Respect user action (don’t silently cancel a Sleep request)
  • Non-standard installs (don’t assume C:\Windows!)
  • Run fine as a Standard User
  • Respect the user’s settings

Raymond talks about more complex taxes too (internationalisation, heirarchical file systems), but I’m sticking to what I’m comfortable with!

Unfortunately, amongst all applications, games appear to be the worst at being good Windows citizens, there are far too many games out there (not just freeware ones either) that don’t pay any of the above taxes, and (to sustain the metaphor) some start trying ‘tax-fraud’ schemes like:

  • Trying to disable Alt-Tab
  • Refusing to be minimised (automatically restoring themselves after 1 sec)
  • Preventing the system from shutting down

I might make this another series because there’s plenty to talk about, and most of it’s not even that difficult these days: you just have to be aware of the situation, and what the correct behaviour is. (I must admit I never gave thought to multi-monitor situations before I got my second monitor).

For now though, I will limit myself to a list of ten ‘golden rules’ which I believe all games should obey, at a minimum (not all of them are Windows taxes – some of them are just treating your users properly). In fact I will expand on some of these in later posts too, because they’re worth talking about.

Top ten Golden rules for Games: being a good Windows application

  1. 1. Fullscreen games: always allow an option to run in a Window.
  2. 2. Provide gamma and volume controls, and separate music from sound.
  3. 3. Always allow your game to be paused, saved and quit. At any time.
  4. 4. Provide a way to skip anything non-interactive: from cutscenes to credits.
  5. 5. Respect multi-monitor: If you were dragged to monitor 2, next time open on monitor 2.
  6. 6. Respect the filesystem: don’t open files in Read/Write mode if you only want to read from them.
  7. 7. Respect security: A game does not need an Administrator account to play!
  8. 8. Respect UI settings: if the user has selected ‘Use Large Fonts’ in Windows, use larger fonts in your game!
  9. 9. Respect sessions: if the user logs off/hibernates/shuts down, handle it gracefully. Don’t try to block the action, and don’t lose their progress.
  10. 10. Adapt to a changing system: if you last opened on 1680×1050, but the system now says the monitor can’t support that, open in a res it can support.

I’ll talk about how to implement some of these (and why they’re so important) in future posts.

No Comment.

Add Your Comment