It's been a little while since we stopped to look back, and evaluated the current stage of Driftmoon, so I decided to ask myself a few difficult questions.
What is Driftmoon?
It's a roleplaying game that my lovely wife Anne and I are making. It's a game for people who love to explore and find things, and who like to meet interesting characters. See the Driftmoon page. I think that this screenshot tells you something about the nature of the game:
When will it be ready?
I'm terrible at estimates, so I'll just tell you what's left for us to do. We've completed 6 major areas out of 8 (the current Alpha includes 4 of them). We've got a lot of content ready for the last two areas, so I think we're at about 80 percent completion for the game. So there's still a few months left before we can release it.
What are you working on right now?
The new monsters! Although Driftmoon is not an action RPG, we still want our combat to be as fun as possible. So we've been working hard on improving the fighting side of the game, and part of that is adding interesting monster types. We want to make some monsters that require a bit of thinking from the player. Some monsters might be relatively easy on themselves, but together with others they start requiring pretty clever strategies to deal with. And you can sometimes even use the new monsters against each other.
What is the vision behind the game?
The vision is to make a fun game, with our own personal touch! We want to make a game with intriguing characters, where you can explore and find new things. Above all, we wanted a place for us to pour all the stories floating around in our heads. So there are a lot of optional mini-stories in Driftmoon.
How long is it?
I believe the main adventure in Driftmoon will be about 10-20+ hours of high quality playtime when completed. After that you can continue playing with our mods, which are just one click away. Obviously a lot depends on your playing style, as with all roleplaying games. There are a lot of optional quests, and dialogues including a lot of back story that you can read if you want to. We made the decision early on that each minute of the game should matter, so there's nothing repetitive, and no empty content just for the sake of prolonging gaming-time.
What other games is playing Driftmoon like?
Of course Driftmoon is not a retro game, or a clone of any game, but it's possible to make some comparisons. The combat system in Driftmoon has similarities with Dragon Age. In it's core it's really a turn based system, but it runs in real time, and you can pause it. Talking with other characters is similar to Baldur's Gate or Fallout. And controlling your character works a lot like in Diablo, except you don't need click so many times in combat.
Why is Driftmoon top-down?
It's top-down because I tend to get lost in games with a first person view. The perspective also makes it very easy and intuitive to control your character. We can also make all of our characters from cleverly placed sprite sheets, so it's very easy to make new characters and monsters in the game. That is a big time-saver for modders, and it's left us a lot more possibility to fine-tune other aspects of the game. If you haven't had the chance to play any top-down games before, the perspective might feel a bit weird at first, especially when looking at the screenshots. But when you actually play Driftmoon, I promise you will get used to the viewpoint in a matter of minutes - that's what I've been told by some of our preorderers.
Here's how peanut for example has put it: “This looks great. I actually quite like the top-down perspective – the graphics style is strong and clear, and I think the perspective will make interacting with mouse much easier. No need to rotate the camera to select obscured objects.”
How does modding in Driftmoon work?
Driftmoon comes with the full tools used to make the game, and they will also be available in the demo version. So basically you can fiddle around with Driftmoon, and make your favorite changes to it. Or, you can implement that great game idea that's been floating around your head, waiting to get out. When making your mod, you get to use all of the Driftmoon content (including images and sounds) in any way you choose, or create your own. It's a complete roleplaying game building set! What's more, there's an automated mod distribution and installing system built into the game, so you don't have to worry about hosting your mod. And if you choose to ask money for your mod, we can arrange that as well.
What have people been saying about the game?
There have been no actual reviews yet, but the feedback we've received has been very positive. And Driftmoon has been nominated for the MindTrek Indie Award!
We also want to heartily thank all our preordered, the users of our forum, and the commenters of our blog for hanging with us along the way. Your support, feedback and ideas mean a lot to us!
If you want to support us, you can still preorder Driftmoon on a 20% discount!
By popular request, I will reveal you how we do pathfinding in Driftmoon. This might be interesting to you if you're making your own game and want to implement pathfinding, and also if you're making a Driftmoon mod. Pathfinding in Driftmoon has gone through a couple of iterations already, so I'll start at the beginning.
First of all, we use the A* search algorithm. That was pretty much the only thing that went right from the start. A* is easy to implement, and there are libraries available for it. All I needed to do was create some amount of location nodes, tell the algorithm where I want to go, and where I start, and that's it.
So how do we make the nodes? Driftmoon is a top-down game, so I figured we could make a grid. All of the examples I saw at the time were of grids. An automatically generated grid would be good, because modders would never have to worry about the pathfinding, it would just work. So I made a grid, and looped through all the points, and connected the ones which didn't have walls in between them. To make sure our AI could navigate small doors or cracks in dungeon walls, I had to make the grid pretty small. So I ended up with grids that amounted to about 10000*10000 points in them. You might spot the problem with that.
While A* is obviously a fast algorithm, it can't possibly cope with that amount of points in the graph. When my maps started getting bigger my AI churned about a minute looking for a new path. I had to reduce the amount of nodes in the pathfinding grid. So I tried it algorithmically. Make the grid sections bigger where there's nothing but open space, and smaller where there are gaps and doors. It worked, but it started taking minutes to create the grid when the map was saved in the editor. And I couldn't make the algorithm optimal, it still produced millions of nodes.
This is what I ended up with. The node painting tool. I realized that by using my brain for a few minutes I could come up with a few million times less pathfinding points than my algorithms did. You just click where you want the nodes to go. They are connected automatically, and the AI will look it's routes using those points. Now we're in the league of about 100-1000 points per map. Another way to do this would be to paint areas, and the AI could look for paths from one area to another. But I went with points because they are easier to paint by modders (and me).
After all that, the AI works like this: It knows where it is (here), and where it wants to go (eg. go talk to the player, or go kill the player). For both the start and the end points, it looks for a way to the nearest pathfinding nodes. And then it looks for the optimal path between those nodes. Here are some of the optimizations it uses: If it sees the end point straight away, it doesn't bother with pathfinding at all. If it sees a clear path to a pathfinding node one step ahead, it will skip any unnecessary pathfinding points. I've tuned the A* algorithm to prefer routes with no dynamic obstacles, but the AI goes through the obstacles like a bulldozer if it can't find an alternate route. From the above you probably reasoned, that a lot of the times the AI simply has to decide whether there is a clear path from A to B. If your making your own game, the most straight forward way to do that might be to use the raytracer in your physics library, but in Driftmoon, we're using our own spatial hash maps.
An important matter to realize is that inside dungeons, often there simply isn't a path from where you are to where you want to go. In this case, the A* algorithm hammers through the entire set of pathfinding nodes, and this is obviously the slowest possible case. We need the ability to quickly check if we ever could get from A to B, or is it completely impossible. This is done by marking each pathfinding node with an area number. If the area numbers are different between the start and the end nodes, that means they are on areas that are not accessible to each other. So now the nonexisting path case is the fastest one, we just check whether the area numbers match. I'm setting the area numbers simply by doing a flood fill for each node when we start the level.
Now I was left with a pretty snappy pathfinding, but as I added more monsters and townspeople, I started noticing that it was bogging down the framerate when the AI wanted to do pathfinding. The problem was that when the player moved, a lot of the monsters might decide to start looking for a new path at the same time. So I implemented a pathfinding queue with priority numbers. The monsters nearest to the player get their pathfinding done first, and monsters very far from the player might not get pathfinding at all, or might get it less than the others. And if the monster's pathfinding wasn't complete yet, it fakes it by just going on a direct path.
So that's how pathfinding in Driftmoon works. I've spent many months making it. My advice to people making their own games is this, skip pathfinding altogether. Make the monsters zombies, robots, or green slimes that don't need pathfinding, and you've saved yourself many weeks of development time!
I've just been informed that Driftmoon has been nominated in the MindTrek Indie Games Awards!
The MindTrek jury writes:
Driftmoon [..] Competes in very difficult genre which has the most demanding but also most loyal users. Fascinating story offers possibility to prevail.
How right they are, roleplaying games are extremely demanding to make. When starting work on Driftmoon I had no idea it would take years to finish it. But now that it's nearly complete, I'm glad we decided to take the challenge!
So go on to the MindTrek page and check the other nominees!
Update: DIY Gamer has posted an article on the competition.
In our last Driftmoon alpha, there was little reason to use bows in combat, since (1) the arrows were limited, (2) you got the bow pretty late in the game, and (3) most of the monsters were far easier to defeat using melee weapons. We're changing that right now, bows will be much more useful from now on! I thought about a hundred very complex ways to make that happen, but finally I realized it's not nuclear physics. We simply needs some monsters that are easier to defeat using melee weapons such as swords, and some monsters that are easier to defeat using ranged attacks, such as bows.
We're now in the middle of weighing different alternatives that would make it convenient to react to the new varying enemy types. For example, now that I frequently want to change my weapon set, a button that changes between two weapon sets would come in handy. I could reserve the right mouse button for this purpose.
Another problem we've been thinking about is that some of the attack skills, such as the Retreat skill, should actually work outside combat. But you can only activate the skill while in combat because the skill buttons only show up when you're fighting someone!
So I'm thinking that we could turn the current quick item slots into two-purpose slots, meaning you could fill them with skills as well as items. We'd get rid of the current skills list that only appears in combat. I think this opens up a lot of possibilities for modding, with the player being able to activate skills out of combat. Since skills are just scripts, modders could make skills that make the player invisible before combat, or skills that make the player change into a werewolf shape - all without requiring the player to carry special items to do that.
The only problem that I see with the multipurpose slots, is that you'd get 10 slots less! Any ideas? Don't need more than 10 slots? Go Warcraft and add as many slots as the screen edges can take (but you'd loose visibility?)? Make the weapon set button, the right mouse button perhaps, switch to another set of 10 slots?
Following my replay of Wazzal a while ago, and your persistent requests, I've decided to release the game as open source. You can find the source codes at SourceForge. Feel free to commit your own changes there.
The code is only about 12000 lines, but I didn't have time to put it into separate files at the time. Unlike Bikez 2, which I released earlier, Wazzal is mostly in English! Bear in mind, that it is still one of my earlier projects, so I'm releasing the code on one condition: If you're ever thinking about hiring me, don't judge my coding skills by this.
PS. We're making more enemy types to Driftmoon. And let me tell you, it's hard work training new monsters! They ate through my hat, and one of them nearly got away with Anne, but I've managed to capture a good number of them into Driftmoon! I'll tell you more about the little critters later.
Jgprof in the forum wanted to know a bit about Driftmoon's background. I thought the question interesting enough to write a short post about.
"What language is Driftmoon written in, and what libraries are you using? How many LOC is it and how many hours have you spent on it?"
The Driftmoon game engine consists of about a 100 000 lines of C++, including the editor tools. It's a lot of code on one person's plate, I find it a great exercise for my memory. There are a lot of libraries we use. Ogg Vorbis, the sound decoding library. DirectX for graphics. Box2D for physics. And of course the standard JPEG and PNG libraries. Zlib. The actual game is written mostly in the Driftmoon scripting language, but I don't know how many lines of code there would be. Thousands in any case.
A quick calculation shows that we must have spent about 5000 hours for the game and the engine in the last six years. We've worked on the actual game content only for the last two years, after I had to drop the Cormoon project and adapted the engine to Driftmoon. The tough part at the moment is getting enough hours to work on Driftmoon, as we have two lovely little distractions running (and crawling) around the house and I have my day job. But we've managed pretty well, I think.
"Simlarly for the content: how much time goes in to creating a level as beautiful as the ones in the Alpha release?"
It's hard to say how long a good level takes to make, as we always have to work on new additions to the engine and the overall experience. And there's a lot of testing that we have to do. The upcoming monastery area and the adjoining crypt took about two calendar months to complete. Our current rate seems to be about one hour of gameplay per month of work, as we don't have to touch the engine so much and can finally focus more on the content side of Driftmoon. Making the content is very hard work, since we're committed to keeping each hour of gameplay fun! We're certainly hoping to keep that up for the rest of the development time.
Just wanted to let you know of an interesting vote that's opened in TIGSource just recently. The list of Most Anticipated Unreleased Indie Games (2011 version) includes a long list of upcoming indie titles, Driftmoon included. So, in case there is an indiegame, or -games you're anxiously awaiting, this is a great opportunity to go and cast your vote (it's possible to select many games when you cast your vote - just be sure to select them all during the same vote, because you can't change your vote later).
Check the list and vote especially if you're interested in coming indie titles. It's a great chance to update your knowledge on what's coming - and maybe even find some new pearls in the bunch!
Last week we asked for your ideas on improving Driftmoon combat. We've read them all, and we really appreciate all the different views you've brought out!
We've pretty much completed the work on the new monastery level, and the new alpha version is just waiting for the combat mode changes. While Driftmoon is much more about adventure than it is about combat, I still want to perfect it.
From early on in the game you should get to make choices that make a difference on whether you win or not. Interesting choices. Which enemy to kill first? Which skills should I use against this enemy, and which ones should I save for later? My health is running out, will I kill the enemy with this shot or run away? Should I use a bow against this enemy?
I have to meticulously tune the combat balance for your choices to matter. Interesting choices are very difficult to make, so I have to change a lot of things, like what the different enemy types do and how they behave. I'm not going to reinvent the whole combat mechanics we currently have, but it will need a lot of love. And of course I will have to add interesting situations in the levels, not just randomly drop different monsters around...
It's a huge amount of work for me, but I'm certain it will be worthwhile. So you can look forward to a whole new level with about 1-2 hours of gameplay, as well as carefully tuned fights in the previous levels!
A recent preview of Driftmoon got me again thinking about the combat system in Driftmoon. I thought I'd ask you, how would you improve the combat?
Some of you may remember I decided to change the way combat works right after the preview version a couple of years ago. In the preview, the combat worked like in Diablo. One click on an enemy gets you one strike.
And the current model is more strategic. One click starts a fight with an enemy, and you get to choose the kinds of attacks you want to use next.
So which one do you prefer? And if you prefer the current combat model, how would you improve it?
[Update] How about beefing up the combat with a magic system? Possibly the traditional spell book and mana kind?
Here's the first version of the Driftmoon World Map. Any suggestions?