Code / February 4, 2014

Playing video in FPC

A short and simple post for today. Playing a video file in Freepascal, without using Lazarus. I honestly couldn’t find any examples on the internet of how to do this, so I made one. The DirectX9SDK has examples of how to use DirectShow/ActiveMovie to play back video files in C++, however, the common version of

Read More
Code / January 25, 2014

Sometimes it’s the driver

Consider this pseudocode: Is there a memory leak in the above code? This is just pseudocode, so I’m not trying to be tricky with syntax and I haven’t omitted any key steps in init or shutdown. The answer I should get is “no”. And yet, in reality, the answer is “maybe”. All the code does

Read More
Good coding guidelines / November 18, 2009

More Textures than Memory

Icefall uses literally dozens of textures… (and it will probably be ‘hundreds’ by the time the game is completed). Textures are used for everything, from the mouse cursor, menus, fonts, buttons, to the game world itself, spells/action icons, monsters, equipment… everything. Although my own main PC has 512MB of video (texture) RAM, not everyone does!

Read More
Game Golden Rules / November 12, 2009

Game Golden Rule #1: Support Windowed-mode

I thought I’d cover this rule first, because I listed it as number one and also because it’s probably one of the most controversial. Let’s begin: a simple Why/Why Not argument should suffice for this one: Why Allow Windowed-mode: It’s more convenient for your users. Some users multitask (gasp!), even while playing games. This is

Read More
Icefall / November 5, 2009

Minimum requirements

What’s a reasonable minimum spec to aim for these days? With Icefall, I’ve already taken the decision to target Direct3D9 – I get a lot of extra capabilities compared to DirectX8, and it still works with Windows XP unlike 10 or 11… a pretty simple decision. But what about in terms of video memory? And

Read More
Icefall / November 2, 2009

To install or not to install?

Should Icefall come with an Installer/Setup program? My previous games (like the Five Hundred card game) didn’t require any installation at all: it assumed you had DirectX7 (the game just failed if you didn’t), and all of the files it needed were in the same directory as the EXE itself. You just unzipped it to

Read More