OUR NEWEST GAME:
« Newer Entries » Older Entries

Foggy

03.09.2010 View Comments

Farms, Fields and Peasants

22.08.2010 View Comments

This is one of my favourite tracks from Gareth. I can almost see the rolling wheat fields and farmers standing by a mill, wondering who could help them with their insane quests.

PS. We've got the way the music works pretty much figured out, I'll write about that a bit later.

Why D3DX is evil

22.08.2010 View Comments

In case any DirectX programmers happen to spot this, I wanted to share a warning about using the D3DX library. It's evil, and I'm going to stay away from it!

D3DX is a helper library for DirectX, it's got math helper functions, functions to start up Direct3D, text rendering functions, and perhaps the most widely used is the method to load textures from a file.

Several years ago Microsoft made the D3DX library a DLL that's distributed with the DirectX. Here's something you may not be aware of, they make several versions of DirectX each year. Each comes with it's own version of the D3DX library, and doesn't work with the previous versions. Say, I download the June 2010 DirectX SDK. Then Driftmoon will require at least the June 2010 version on each computer to play the game. Pretty nasty, isn't it?

What Microsoft wants us developers to do is make our game installers also install the new DirectX. It's easy to cram it onto a DVD, but not so in a downloadable game. For downloadable games you can even try installing just the bits your game needs, but I've never got it working reliably on all computers. And what if I don't want to include an installer?

Since I want Driftmoon to run as reliably as possible, I decided to ditch the D3DX library completely. In a week I remade the text rendering functions using regular Windows GDI text rendering, and I remade the texture loading function using the LibPNG and IJG libraries to uncompress png and jpg files. It was a pretty simple matter - and now I've got the code where I can see it.

See the first level!

05.08.2010 View Comments

I've finally finished work with the new starting level! It's been a lot of work, you can tell by the amount of chocolate wrapping in my recycle bin.

(Minimap for the crypt level)

To celebrate this I wanted to highlight some important features we've finished recently:
  • A peek at the starting point of the new plot: It starts simple enough, your brother Robert has sent you a letter asking you to retrieve a highly valuable magical object from these ruins. After fighting your way through undead to get the object, you find the ancient king still guarding it. Turns out, he's been guarding the artifact because it's too dangerous, too powerful to fall into wrong hands.
  • Music: Each map will have a set of area specific tunes composed by our talented friend Gareth Meek. There are also half a dozen tracks to play in combat. It's incredible how much it has added depth to the world!
  • Minimap: The image you see above is the minimap for the crypt area. Today I finished adding the level editor button that can create a 1024x1024 texture to contain the minimap. It works wonders, and will be very handy also for modders who want to use the minimap option in the game!
  • Improved combat: The combat has been changed from the hack and slash style present in the preview into a more strategic style. You can use various recharging combat skills to take advantage of your opponent's weaknesses. You will learn combat skills by leveling up, and from certain special quests.
  • Randomized items and monsters: To add a bit variation to gameplay, many items and monsters are taken from a predefined random set. It's an easy way to add some replayability into the game, which is important to me since I play each map hundreds of times.
  • New graphical effects: We've got completely new particle effects, roofs, sun shadows and more!
PS. I've updated the website theme a bit to make it load faster. According to my tests, it's dropped to a quarter of what it used to be, especially if you're on a slow connection.

D3DX problems

31.07.2010 View Comments

It's been bugging me for the last couple of weeks. On my computer the game runs fine, on some other computers it crashes in some seemingly unimportant code. After scratching my head for way too long (I hope I'm not going bald because of this!), I got to the root of the error (Thanks for the help Gareth!).

Firstly it was crashing in some DirectX matrix code, namely the D3DX helper library. Why would it crash on every other computer, and work on every other - even with the same input? Because I have an AMD and the crashing computers had Intel. Internally the D3DX library does things differently depending on the platform it runs on. Apparently the Intel version did something different with floating points, and crashed nicely whereas the AMD version didn't mind.

Quite possibly it's my fault, some bug in my code most likely. It's nearly impossible to test it though, I don't have any Intels at home to debug with. Oh well, doing simple matrix mathematics in a completely separate DLL is a bad idea anyway. Even Microsoft admits this, since they're encouraging users to switch over to their new XNAMath library which uses inline code instead of DLL calls. Moving over to XNAMath should fix the problem, since it doesn't have separate code paths for different processors. But honestly, Microsoft could have told me about XNAMath in March, and saved me a couple of weeks.

Update: The problem has been solved, and now the game will happily work on Intel platforms as well.

« Newer Entries » Older Entries