OUR NEWEST GAME:
« Newer Entries » Older Entries

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.

Automated error reporting

24.07.2010 View Comments

Suppose you're trying out a new game, and it crashes on startup or one minute into the game. The likelihood you're going to tell this to the developer and help them is probably below 0.1%.

Many developers are of course fine with their games crashing. If you're just developing freeware for your own fun, it might not matter if the game doesn't work on every last machine. As for me, I'm determined to fix all of the errors I possibly can.

So to this end, I implemented an error log sending system into Driftmoon. If the game crashes, the game will ask whether you allow it to send me a report of the error. Basically it will try to log where in the game code the crash happened, but it doesn't of course tell me what you did to crash the game. So telling me what happened is still extremely helpful!

The server collects your IP number so I can identify which reports belong to the same computer. I take privacy seriously, so I'm the only one who can access them. As for user created mods crashing, I'm still debating whether to allow mod makers to get access to crashes in their own mods.

With the automated update system this should allow me to quickly react to any crashing errors I happen to forget in the game. This will be especially useful for all of you mod makers, since modders will use the game in ways I didn't originally intend - now instead of going around the problem you can report it to me and hope to get a fix not only for you, but also for your players.

« Newer Entries » Older Entries