Thursday, December 29, 2011

Frustration is good for the soul

The last couple days have been very educational for me. I've been trying to work on my new game, but I'm relearning that skill in one area does not equate to skill in other areas. In this particular case, ability to write great code does not translate into any kind of ability at all to design a game.

I'm accustomed to knowing what to do next, and how to do it, and even if I do get blocked I have techniques for brute-forcing my way to a point where I can get something useful done. None of that helps with game design though, leaving me rather frustrated. I am, quite frankly, completely lost.

Being a bit lost isn't a surprise, but what is surprising to me is just how quickly I hit that point. I figured I'd get much farther on in the project before I hit complete bafflement, at which point I'd at least have something I could show people and get some feedback. As it is, I ain't got squat. Just a bit of hand-waving and some gusts of warm air.

Oddly though, all this frustration and bafflement is making me happy. I'm not trying to make a living off of video games -- it would be fun, of course, and I'm trying to make a little money, but making my primary income off games isn't a realistic goal at this point -- so I'm really doing all this for fun and for the opportunity to stretch myself and learn new things. The fact that I'm lost is proof that I'm trying to do things I don't really know how to do, which means I must be learning, right?

Or at least that's way I'm taking it. :-)

Friday, October 14, 2011

The times, they are a'changing...

Yes, I know, I've been silent for months. And I'm sure it will shock people to find out that I've put this game on hold for a little while.

But! I have a good reason! I'm putting Welcome To The Dungeon on hold... so I can build a DIFFERENT game!

I've been doing a little research and I think I've got a decent chance of making enough money off indie games to nicely supplement my income. (And there's always the hope that a game will spontaneously take off and sell like crazy!) But I don't think Welcome To The Dungeon is the game to start with. It's something I'm building purely for fun, rather than profit, and frankly I don't think my game design skills are quite up to some of the more challenging aspects of it yet.

So this game goes on hold for a little while, and I'm on to a new project.

What project is that, you ask? Well, I haven't worked out the details yet. The spirit of the game takes inspiration from a few different sources, most notably Kobolds Ate My Baby (which is, by the way, an awesome game). It'll be a smaller adventure / puzzle-solving sort of game that follows its own quirky (and often deadly) logic and aesthetic, intended for broader distribution to more casual gamers. I'm hoping to get it onto mobile devices -- mostly Android phones & tablets -- as well as PCs. If things go well, I might use the proceeds to purchase a new Mac so I can also develop an iOS version.

I've got some more thinking and planning to do (including name selection) and once I get that stuff sorted out, I'll post up here again. What I'll probably do though is switch to a new blog that's more geared towards the company in general rather than a specific game, because I've already got tentative plans for a second new game once I get this first one sorted out...

So, if there's anyone out there still reading this blog... Any comments? Think my strategy makes sense?

Friday, September 2, 2011

One step forward...

As usual, life has been keeping me busy. I've settled on Unity3D, as it appears to offer everything I need, and it even offers the ability (if I pay extra for the Pro license) to provide add-on packs. I might take advantage of that later to provide custom downloadable content as part of a Kickstarter reward as a way of getting a bit of funding to get the game built, but we'll have to see whether that will really work.

So with restarting the graphical portion, I've been taking stock of where I am with my game. It turns out my work over the past year hasn't amounted to much -- Tom's artwork (which is awesome, of course), a bunch of concepts I mostly had sorted out about 15 years ago, and some pretty basic logic, including my own implementation of A* pathfinding. (The pathfinding is lifted pretty much directly from an AI programming book I own. So the most complicated thing I have isn't even my own idea.)

I'm taking a couple weeks away from game development to focus on a few other things, but I'm hoping that by the end of September I'll be back hard at work. And then I need to start really pushing on this, because I have some very tentative plans to share a booth at next year's PAX with Carl Hume, developer of Kingdoms of Arcania (link currently busted but hopefully back online soon). Before that, I need to find out how much the booth costs and when exactly we'd need to commit to it, so that we know what our timetable is. I doubt either of us will be making any money off PAX, but it seems like a fun excuse to go visit our tribe, and by splitting a booth we'd be able to occasionally spell each other off and take turns wandering PAX. In order for that plan to have even the pretense of making sense, I need to make sure my game's in a condition to show off by the time PAX rolls back around.

Speaking of PAX: I think anyone who reads this has already likely heard all about my trip to PAX, but I'll recap it here just in case... PAX was awesome. No, seriously, awesome. In every way. I honestly can't think of anything I didn't enjoy about PAX, even waiting in line. (There are some things I might have enjoyed more were they done differently, but that doesn't mean I didn't enjoy things the way they were.) Everyone there -- literally every single person I interacted with or even saw in the convention center -- was in a good mood and having a good time and being considerate towards their fellow con-goers and just generally being decent human beings. If you're a gamer, go to PAX.

Thursday, August 11, 2011

Yes, I'm still alive

I realise it's been six months since my last post. In that time, the basement reno was finally completed, my daughter was born (actually a bit before the reno was done...) and I've run a half marathon. It's been busy.

Now that things are settling down again, I'm back to looking at my game, and I've come to a couple conclusions. First, and most importantly, the XNA Framework just isn't the way to go. I want to have the option of spreading this thing across multiple platforms (particularly tablets) and XNA doesn't offer that. So I'm now investigating alternatives, starting with Unity3d. If it offers what I need, I'll be back to square one as far as the graphics go. On the plus side, I was smart enough to make sure that the core game engine didn't rely on the graphics, so I'm not starting entirely from scratch. It'll still be a lot of rework but not as much as it might have been if I hadn't been as careful with my design.

The second conclusion I've drawn in reviewing my game is that the game isn't as fleshed out as I'd thought it was. I think reimplementing the graphics will give me a little time to ponder the way the game works, and the thought of implementing a touchscreen-based interface has given me the seeds of a few ideas that might help.

Two weeks from right now, I'll probably be in my hotel in Seattle getting ready to attend PAX. By the time PAX starts that Friday morning, I hope to have settled on a new game engine (I think Unity3D will work, but we'll have to see) and hopefully I'll already have the basics of the engine reimplemented and have something to play with.

Wednesday, February 23, 2011

More delays

The last few weeks have seen a decided lack of progress in the game, due to a bunch of conflicting priorities. Chief among those was getting some more work done in the basement; we're nearing completion of the drywall, which puts us only a few weeks away from being ready to move stuff in there and actually enjoy that space for the first time in the six years we've lived in this house. That'll be a nice change.

Another problem I've been dealing with is a severe lack of direction with the game. I've got a thousand things I could be doing, but none of them were clear winners in the "this needs to be done next" camp and all of them were big and awkward and require a fair bit of time and motivation to tackle. So the net result is that I felt like doing nothing.

I finally realised what was going on a couple days ago and have taken steps to correct it. The real problem that I've been facing is that there's no game in this game, and that's where I need to start. So I'm going to work on the basis of "what do I need to do next to make this more like a game?" And the first thing that came to mind was that, y'know, there needs to be an entrance to this dungeon... And voila, I have made a dungeon entrance!

I know it doesn't look like much, but that's because it's kind of living in isolation right now. It'll look a lot better once it's actually in place in a dungeon. I've got some work left to do on the floor (I stretched it out like crazy for the screenshot because I wanted it to be obvious what it was) and I've got some other tweaking to do, but overall I think everything's in pretty good shape. Sometime this weekend I'm hoping to finish it up enough to get it in place in the game, then start spawning creatures from it.

After that... well, there are a bunch of things I could tackle after that. I'll probably need to start by switching out my hacked-up UI library for something a little more robust, which I think I can accomplish with a single day's work, and then I can start experimenting with playing the game to see what elements I need to work on to make things actually fun.

My goal is still to get an early demo out there before the baby's born, which gives me another month (hopefully). I don't know if I can make it, but I'm sure going to try!

Monday, February 7, 2011

Starting to look like a game!

I've spent the last couple days moving stuff around, trying to get my basement cleared out enough for an electrician to do the rough wiring. Not surprisingly, that hasn't left a whole ton of time for me to work on the game. Luckily, that particular bit is out of the road and tonight I cleared out some more time to get a bunch of work done, which mostly involved trying to get the kobold model into the game. It worked, but...

Well, here's the thing. I made the kobold model smallish, because kobolds are small, right?

But they were so small you couldn't even see that they had claws on their toes. That seemed a little excessively small to me. So I grew them almost 50%. Their eyes were still so small they were eating up maybe a pixel on my screen. That was just ridiculous. So I doubled the size of the eyes, and took this screenshot.

Things still ain't right.

So now I'm looking into zooming the camera in and out... It'd be a shame to spend all that time modeling these guys only to have them be so puny on screen that you couldn't even see what a horrible modeling job I did!

On the topic of the model, you may not be able to tell from this screenshot, but the model's head has changed pretty significantly. The nostrils have widened out a bit, the head was squashed in towards the middle, and the eyes and ears were both rotated quite a bit towards the back. Overall it's starting to look a whole lot more like Tom's artwork, although I'm still not doing it justice.

Thursday, February 3, 2011

Getting better

My kobold may not be perfect, but as you can see in this picture, it's getting steadily better. I'm noticing now that the head shape really doesn't match up with what Tom drew yet, and of course the kobold's body and parts are all just flat colours, without any of the fur or other interesting textural details that'll make them really pop. And the feet are still just blocks, and the pot belly still just ain't right. But aside from all that, I think I'm doing pretty darn well so far. I'll probably just make the feet look like real feet and then stop with the model for now and go back to real gameplay stuff.

Thinking of gameplay, I remembered that in my last post about mechanics, I left out an important resource: prestige! (Or notoriety, I haven't quite made up my mind about which name is better.) The idea of prestige is that it represents how well known you are and, more importantly, how respected you are. Greater respect = more powerful monsters coming to work for you, and also more powerful heroes invading your dungeon...

There are a few ways to gain prestige. The simplest, though least effective, is to make your dungeon bigger. Having a dungeon with multiple floors grants you an additional bonus, because the deeper the dungeon, the more powerful the monsters you must have (or at least that's what everyone thinks). Killing heroes grants you prestige, but having heroes escape with lots of loot can increase your prestige even faster. On the other hand, having your monsters killed (albeit temporarily) earns you a bit of a reputation for being a poor leader, decreasing your prestige.

I'm also now trying to decide if I should gear the game towards infinite play (think SimCity) or limit it in some way where there are definite victory conditions (Civ). If I go with victory conditions of some sort, achieving a sufficiently astronomical prestige rating would be a pretty obvious victory condition, representing your influence becoming so great that even your enemies are forced to concede that you're unstoppable. I'd also need some other victory conditions... I think I'd prefer to stay away from the "highest score after X turns" that's the default of Civ, because that's kinda boring to me, but I'm not sure right now what else to use. Anyone have any ideas?

Wednesday, February 2, 2011

Holy crap this is ugly!

I've started modeling the kobolds, because it's something I can fiddle with in my spare time and it amuses me. At some point this weekend I'll get back to coding, but for now I'm having fun with this guy.

Of course, just because I'm having fun with it doesn't mean I'm actually any, y'know, good or anything. Still, they're getting steadily better and it's still (obviously) very early in the modeling process. You can probably get an idea of where they're going, and as the process goes on there'll be a bunch of changes that'll make them look better in a hurry, so don't worry too much about how ugly this guy looks right now.

It'd be nice to get the first incarnation of this guy done so I can start having real monsters in the game instead of just green blob man... :-)

Sunday, January 30, 2011

So here's how the game world works

I've come up with an explanation for how the game world works, or at least how part of it works.

In Dungeon World, the monsters are magical creatures. There's a fair amount of loose magic floating around, enough to sustain the creatures, so they can exist perfectly fine just wandering around loose, which is their natural state. They also eat normal food, with most magical creatures having a particular fondness for rat.

In Dungeon World, there are also wizards. Through intense study, wizards have learned how to tap into that ambient magic and use it to produce incredible effects, often amassing great power for themselves along the way.

Eons ago, one of the most powerful wizards ever to live discovered that a very small portion of the population had an innate ability to absorb, concentrate, refine, and channel magic. Some of the individuals with that gift became wizards, their power subtly boosted by their natural talents, while most went about their lives blissfully unaware of their potential. This ancient wizard, Sheifan, was one of the gifted, and discovered that with the proper ritual, he could channel some of his power to magical minions, greatly increasing their power and resiliency. He raised an army, marched on the civilised nations, and was crushed brutally when he forgot to bring enough food for his minions and they deserted him. They carried with them the recipe for the ritual of binding, and now most monster tribes have at least one wise old monster who knows how to perform the ritual.

Monsters benefit greatly from association with a Channeler. With the refined magical power supplied by their liege, monsters are able to learn much more quickly, and steadily develop their powers. Many of them grow steadily stronger, faster, and smarter as time passes, and virtually all monsters gain new abilities with continued service to a powerful lord. Most importantly, while a normal monster can be disrupted and even killed, a monster linked to a Channeler has a constant stream of magic coming in to keep them healed. The end result is that a monster serving a Channeler can be knocked down any number of times but never completely killed until the Channeler is killed.

Channelers, in turn, gain virtually nothing from acting as living power sources. They gain no abilities and no powers, although they also aren't weakened by the process. This makes it a pretty one-sided deal, so to convince Channelers to feed them power, monsters offer to serve Channelers and obey their every order... when it's reasonably convenient to do so, and as long as they're well paid and well fed.

The life of a Channeler is often difficult.

Now, in terms of gameplay, what all this means is that you're going to have a couple different resources to manage. The first is food -- if you don't have enough food (which is to say, a steady stream of rats) you can't feed your minions, and they'll get unhappy and eventually desert you. Before a monster agrees to work for you, they'll check out the food situation, so you can't even hire a monster unless you're producing enough rats to feed your existing minions plus the new one.

The second is gold. Gold is required in order to pay your monsters, buy them gear, and buy ritual components so you can perform a ritual and bind the monster's essence to you.

The third is mana. For now, there won't be any player spellcasting in the game, but I'm thinking of a few mechanics that would allow you to tap your mana pool to improve some aspect of your dungeon's functioning (accelerated building, increased gold production, zones of improved combat effectiveness, that sort of thing). But mana is also used to feed your monsters. More powerful monsters require more mana to sustain them, and as with food, if you don't have enough, monsters won't sign on with you in the first place.

Acquiring rats will be fairly easy, I think. I'll probably set up rat farms as a furniture item your monsters can build, with each rat farm supplying a steady stream of 1 rat per turn or something to that effect. Fighting adjacent to a rat farm will likely create a small chance of breaking the rat farm, giving your minions reasons to protect the farms and put them in out-of-the-way places.

Gold is also likely to be pretty simple to acquire. I'll most likely go with something as basic as gaining gold by looting the bodies of your fallen enemies, although the monster who delivers the killing blow will likely get to keep a percentage of the gold.

Mana is a little trickier. I was thinking of having it generated by creatures, but then it just amplifies itself and having lots of mana causes you to have even more mana. Instead, I'm considering some variant where it's based on the size of your dungeon. But then I need to create some sort of balance so you can't just dig out a massive, sprawling, mostly-empty dungeon and gain crazy amounts of mana while you've only got a couple kobolds kicking around. It's gotta be tricky to maintain. One possibility I've been considering is that your dungeon might need maintenance, and every bit of work your monsters do costs you gold, and maintaining your dungeon in an orderly state - necessary for mana generation - costs gold. Higher-grade dungeon areas (polished marble floors instead of dirt, for example) cost more to maintain, but attract a higher grade of monster and also provide more mana.

So, anyone have any thoughts on the topic?

AI gets some of that I

Up until now, I've been working with some really stupid AI code for my game. Basically, the algorithm I used for the critters was: "If you're beside an enemy, hit him. Whether or not you hit an enemy, move in a random direction." Not surprisingly, this wasn't the most effective AI in the world.

While I ponder some of the nitty-gritty details of gameplay mechanics (I'll probably post more about that tonight) I decided to fix the AI and make it appear a little less brain-damaged. I've introduced some code that looks at all possible enemy targets and prioritise them, and even try to move towards them. Of course, it's still only moving in straight lines, so if it happens to bump into a wall before it runs into the enemy, well, it'll just keep running into that wall.

Sometime this week, I'll be adjusting that code even farther to implement something called the A* pathfinding algorithm, which allows monsters to do things like walk through open doors. It's crazy, I know! But it works! And honestly, it'll probably only take me about 2 or 3 hours to write, at which point I'll have monsters behaving almost intelligently. That should make a huge difference to the feel of things...

And in the meantime, I think I've come up with some fun gameplay mechanics, which I'll post about later. For now, I'm going to go make the monsters dig out unwanted walls and then watch the NHL All-Star game.

Monday, January 24, 2011

The ecosystem has been unsealed!

How many months into the development process is it, and I'm only just now putting in an entrance to the dungeon? Whatever. The important thing is: Hey look, it's a set of stairs! No way to actually USE the stairs yet, but that's probably next on my list. I discovered a whole host of problems with having intelligent spawn points, and I could just hack something in to get started, but I've got an elegant solution partially worked out that'll save me a lot of problems in the future. I'm going to stop coding for today and spend some time thinking about design.

Saturday, January 22, 2011

Apparently I'm not the only one...

Looks like someone else had the same idea.

It's nice to get some validation of my idea, although to be honest I'd prefer that validation not come in the form of someone else (with substantially larger, ie any, budget) building something very similar.

Even from the brief promotional materials they've put out, I can see that they're going in a different direction than I'm planning, so I'm not super worried about it. I will have to be careful not to check out the game too closely though to make sure I don't accidentally steal any of their ideas.

One big advantage I'll have is that where those guys are using boring ol' goblins, I've got Tom Fowler art to work from. So my monsters will be WAY more awesome. Pbbbt! Take that, other developer! ;-)

Friday, January 21, 2011

Digging has begun!

I know, I know, I keep saying that eventually I'm going to move off the visual stuff and into gameplay... and look, I have! This screenshot shows what the game might look like when you tell your monsters to dig out some walls to expand some rooms. It currently works by basically laying the shovel/pickaxe icon on top of the wall, so as the camera rotates around the texture moves too. I'm debating switching it to a system more like the health bars, where the icons float in a fixed point in space. I think the tinting needs to stay -- it makes it really easy to pick out which squares are going to be worked on. Right now there's a problem with the tinting, in that it only works to bring things basically to black, so if I wanted to have different tints for different things going on (e.g. tint some squares blue to indicate that they're ice-cold) I can't do it. So there's work to do there.

Tinting goofiness aside, what do you guys think? Like the icons, or no? Have them floating, or leave them as an overlay on the wall top texture? Maybe lose the pickaxe and have just a shovel in that icon? Or vice versa? Any other thoughts?

Wednesday, January 19, 2011

Now with randomness!

Having the same texture repeated over and over and over and over again gets pretty boring to look at. I came up with a very clever solution yesterday and spent four hours coding it and troubleshooting it -- this was really hard stuff, mind you, very complicated work in an area of XNA I hadn't played with much, so four hours of work is pretty intense -- and finally got it working. I hit Run, and the game started up... and played at about 4 frames per second. Or less.

That solution got thrown out.

Today, I came up with a new solution. A little less elegant, and it adds a lot more files to the project, but with a little attention to organisation things seem to be under control. I ended up having to create a batch of new textures, and while I'm not entirely thrilled with them -- they seem a little bland to me -- I still think it's less ugly than the old version was.

I've currently only got 4 textures for the wall faces, and still only 1 for the floor, but I have 8 for the tops of the walls. Not the most exciting thing ever but at least it breaks up the monotony.

Monday, January 10, 2011

So soft and cuddly!

One thing that's been bugging me as I've been building the game is the appearance of the walls. Even aside from the questionable texture choice, they look very much like they're assembled out of computer-generated blocks -- the corners are harshly, mathematically exact. They just don't look like walls that have been hacked out of the earth. So over the last couple days, I've been fiddling with the code I use to render the walls. It's been some pretty heavy work in the back end, but I'm finally getting pretty close to where I wanted to be on the walls. I still need to tackle the top of the wall though, because that corner's still sharp as can be, and I need to smooth it out a bit. That'll probably be another day or so of fiddling. In the meantime, at least the walls are looking a lot softer.

I will eventually be getting back to building real gameplay, but I'm kind of stuck on how I want some things to work and I can feel the back of my brain playing with ideas, so I'm trying to stay out of its road and let it figure stuff out while I keep myself busy with other stuff. One way or the other, by this weekend I intend to have a fairly detailed plan for how I want gameplay to work, because I've got next week off and I want to spend at least a couple days really grinding out a lot of progress in a hurry. I'm not going to get another chance to spend whole days focusing on code for the next while, so I've got to make the most of this opportunity and get as much done as possible. So by next weekend you should see some pretty significant progress, I hope!

Saturday, January 8, 2011

Back to the bit mines

After a brutal cold that laid me out for a couple weeks, followed by a busy week at work this past week, I've finally gotten ambitious again and gotten some work done on the game. The only thing a user might see is that units slide more smoothly on the minimap; other than that, the game behaves exactly the same as it did before I spent two hours fiddling with it tonight. But the code that makes it happen is a whole lot cleaner and easier to understand, and WORLDS easier to extend for anything I add in the future.

There's a term gaining popularity in the software development world called "technical debt". Technical debt is a way of thinking about the trade-offs that are made while development is happening, and can be used as a tool to help communicate certain technical costs to non-technical people. A very simplified version goes like this: Any time you hack in a quick fix in code, you've added an amount of technical debt equal to the time you saved by doing the quick version instead of a really good solution.

The problem with technical debt is that it accrues interest. Every time you work in code that's burdened with technical debt, your work goes slowly. The more technical debt, the slower the work goes, until eventually things grind to a virtual halt.

Of course, at any given moment, when faced with any given decision, the quick-and-dirty road will ALWAYS get you faster results in the short term. And yet by consistently avoiding technical debt, overall development speed is significantly higher in the long run.

So as much as it might not be super-exciting for other people to look at, a fair bit of my development effort is actually spent just moving code around and rewriting things I don't like the look of. But in the long run, it means that the few hours a week I can currently find to work on this game will be spent working in really clean code being as productive as possible. And with a new baby on the way in a couple months, anything I can do to make sure I can step in and get some development done quickly is going to be a huge help.

I think the next item on the agenda is more code cleanup. I'll be tackling the code I use to render walls and floors and making that code a lot smarter, and as a side-effect it should make it almost trivial to add in the concept of explored versus unexplored terrain, allowing me to hide areas of the map that haven't been explored yet. So there might actually be a visual update there, which would be exciting.