Saturday, December 18, 2010

I feel so pretty!

A couple visual enhancements since the last screenshot... Today I've added a drop shadow to the damage floaters, I'm drawing them in order from oldest to newest (which I may change in the future), and I've got them offset from each other if you've got more than one damage floater showing at once (like the poor outnumbered hero in this screenshot).

I've also finally gotten rotation figured out! Which was, admittedly, entirely thanks to Stack Overflow. Still, the dudes are finally rotating exactly the way they should be, and although you can't see it in this screenshot, it even handles rotations that aren't even multiples of 45 degrees, which'll be useful when I get ranged attacks in there.

I've also created a first draft of a random name generator, but it's a little TOO random for my tastes. Here's a sample:
  • mon
  • alton
  • deane
  • olinaben
  • jeffain
  • josey
  • brale
  • flouguiely
  • joely
  • wicherlain

And this is one of the better runs... Oh well, I've got a few ideas on how to make it produce better results by switching from single-letter analysis to whole-syllable analysis and constraining the length to a specified range. If that doesn't work out, I have another idea I can try out.

Before that though, I have something very important I have to do -- quality control! Cookie quality control, to be precise. It's holiday baking day at my house today and I need to go make sure they're doing a good job. I'm sure it's going great since Tommy's helping, but I'd better go check on things just to be sure. Wouldn't want bad cookies sneaking out due to a lack of vigilance on my part, y'know.

Saturday, December 11, 2010

Violence and mayhem

The visuals are still pretty cheap, but I'm starting to make real progress. For example, if you look at the green guy nearest the blue guy in the picture, you'll notice a little floating number over his head. That represents the damage the green guy just took in combat.

That means two things. First, and most obviously: I've decided to make it clear when people have taken damage by making little numbers float over their heads. That's a pretty common thing to do in a lot of games, so it should be pretty familiar to people.

And second, which is probably less clear from a simple screenshot: I have combat working! It's pretty primitive so far -- currently only basic melee attacks are supported -- but the underlying code structure is pretty easily extensible to much more complicated stuff like freezing enemies in place, boosting an ally's defense bonus, blocking enemies' powers, and so on.

This brings the game to a point where about 75% of the functionality is there to support a very early-access alpha release for a few friends to play with. By the end of the Christmas holidays, I should probably have that out.

Next on my list (at least for now) is making the models rotate to face the direction they're walking or attacking, because the fact that they never look the way they're supposed to be going is a little creepy (IMO). After that, I've got some cleanup to do still on saving and loading, and then... well, I guess it'll be whatever the heck I feel like working on at that point.

In the meantime, steady progress is being made on the artwork. We've got the basic design finalised for the kobolds, the brutes, and the angry broccoli, and we've got a pretty decent idea what we're doing for a ranged-attack monster (it's way cooler than what I'd originally had in mind) and the heroic fighter. I'll try to post some of those up sometime this week.

And at some point, I have to introduce some AI to this game...

Monday, December 6, 2010

Wait just one second here...

Some more random things to show off today... As you can see, I moved the monster info bar to the bottom of the screen. I'm eventually going to move it over to pretty much right beside the minimap, then there'll be some controls beside it. Hard to explain, really, especially since I don't have the details worked out. It'll make sense in the end, I promise.

Other little changes include an adjustment to the texture on top of the walls to make it a little less weird, and some invisible tweaks to some of the rendering code.

Other than that, not too much to WAIT WHAT IS THAT BLUE GUY OH MY GOD A HERO HAS INVADED MY DUNGEON AAAAAAAAHHHHHHH!!!

(I'm easily amused.)

Yes indeed, I now have heroes invading the dungeon. Well, appearing inside the dungeon periodically, which is kinda similar. They don't do much, or anything for that matter, and they and the monsters don't interact with each other in any way either. So it's early days.

The next little while is going to feature some serious design work. Most of the time when I'm coding, I find I'm most productive if I just hack things in and then clean, tidy, and polish the code until it's no longer shameful. In some cases, though, that approach just leads to problems, and this is one of those cases. I need to stop coding and start planning, because that'll save me weeks of wasted effort later.

This, by the way, is one of those things that programmers tend to learn through experience. Bitter, frustrating, experience.

I don't actually expect this design phase to go too long; with any luck, by the end of the weekend I'll have the next chunk of code underway, where the heroes and the monsters are both moving semi-intelligently and attacking each other when they see each other. Fun for the whole family!

Sunday, November 28, 2010

Hints of gameplay

Tonight, I added the first hints of real gameplay to my game. When you click on a monster, you'll now bring up a quick view of that monster's statistics. In this case, we can see that the monster is called Skeldra (hooray for randomly-generated names!), he's at 21 of 40 health, and... well, some other gameplay stuff that may or may not matter, like wealth and attack and defense.

As a side note, being about two months into this project (admittedly only a few hours a week, but still) and only now adding the first bit of anything that looks like an actual game, that's a little sad. But at least it's in there now.

For anyone who knows D&D, the combat system is going to be a fairly basic D20 variant. For the rest of you... Well, there's a whole post waiting to be written on how the fighting's going to work. It'll be coming up soon.

There'll be a lot more detail on these guys, but most of it is likely to be hidden most of the time. This particular pane is intended to be basically a quick view so you don't have to open the full window all the time just to check on some basic stats.

Next up... Random name generation! "But wait," I hear you cry, "didn't you say mere moments ago that 'Skeldra' was a randomly-generated name?" Good catch, imaginary reader! I stole that name from a list of randomly-generated names I use for D&D. It's actually hard-coded right now, so every monster is automatically named Skeldra. Not so useful. I could start by simply having a hard-coded list of names and picking randomly from that -- I've seen some great games that do exactly that -- but being a nerd, I think I'm going to use a neat algorithm I found that produce reasonably realistic random names based on an initial data set; the nice thing there is that by simply providing a different data set, you can get different names. That lets me use the same basic mechanism for each of the monster types, while still giving each its own distinctive flavor.

When I get bored with random name generation (which may or may not be before I finish hooking it into the game) I'll probably move on to adding a dungeon entrance and spawning hero units. That's likely to show up in a week or two. And once I have hero units in the dungeon, with some monsters rolling around, well, the only logical next step is to start up some good old fashioned mayhem.

Monday, November 22, 2010

Another monster, and some green bars

I'll start today with another one of Tom's monsters. This one is one of the candidate sketches Tom did for the monster we're currently calling "that all-purpose monster". We're trying to decide whether to call him a goblin, a kobold, or something else entirely. Personally, I'm leaning towards kobold. Whatever we call him, this particular monster type gave us a little more trouble than the others. We were having a hard time finding the right balance between a bunch of constraints; we want the monsters to be monsters, they need to look capable of fulfilling the roles we were giving them, and they also need to look like they've got lots of character and are perhaps more misunderstood than evil. As the saying goes, everyone's the hero of their own story, and these guys are no exception -- as far as they're concerned, "heroes" are crazy humans who bash their way into your home, kill your family, and then take all your stuff. Who knows why humans do what they do, man? So the monsters have to look like they could possibly be nice creatures after all, if you sat down and had a nice meal with them and got to know them a little.

Basically, I have a hard time playing games where you act like a villain -- I generally give them up because it upsets me. So when I'm building a game where you are, in fact, the classic D&D villain, my first move is to turn the villain into the good guy so I can enjoy playing the game. And the monsters have to follow suit. One of the perks of building your own game is that you get to do stuff like that!

Anyway. The kobold above was just a little too evil, but the real problem was I found myself trying to imagine him doing work in the dungeon and he felt like a good fighting monster but didn't seem suited to being a worker. So he's been rejected. He's not too far off the design we've currently settled on though.

(Yeah, I know, I keep showing rejected monsters. Trust me, when Tom finishes off the polished art for the real monsters, I'll be posting those!)


Tom's not the only one who's been busy though... I've implemented a bunch of random little things in the last week, including moving the map around when you click on the minimap, starting in on the logic for turn-based action, and as you can see in this picture, I'm now rendering health bars for the monsters! The idea is that these bars will float over monsters' heads to give you a quick visual indication of how healthy they are. These guys are showing as being at about half health (the darker green shows how far a full bar would go, the lighter green shows what percentage of health remains).

Now I've got to go clean up the code that renders the health bars, and at some point before the end of the week I'm hoping to actually add an entrance to the dungeon and get my first hero unit to walk in the door. Unless I get distracted. One of the nice things about building this game is that I get to work on whatever I find interesting at any given moment.

Friday, November 19, 2010

Monster infestation!

Tom Fowler delivered the first batch of development sketches today. Keep in mind, these are very early development sketches -- basically, think of it as Tom brainstorming a bunch of ideas. The next step is for us to go through his ideas together, and figure out what we like and don't like about each of them, then see if any other ideas come to mind. Out of that, Tom will refine the design we've chosen and then eventually we end up with real polished illustrations, which will in turn serve as the basis for 3D models.

I'm actually feeling a little guilty about the fact that I don't have the money to pay someone to build models good enough to do Tom's artwork justice.

This guy is the infamous octojellypus! I love him. He's amazing. He's just bizarre and alien and I can just imagine what I'd think as a player if I had these guys on my side. It would be wicked awesome. Unfortunately, they won't likely be in the game, because I really don't know how I'd make them work visually. Well, that and I don't know exactly what kinds of powers I'd give them. On the plus side, Tom's come up with something even MORE awesome to serve the same sort of role these guys were going to fill, but I'm going to wait and show off those guys later.

Here's another guy who I'd love to include in the game but don't quite know how to incorporate him. Visually, he's just fascinating to me. I've been tossing a few ideas around in my brain that would need some critters, and having something like this might work well. I'll think about it. I'd love to find a way to include them.

This guy's from a totally different set that, not surprisingly, is being called "brutes". The role these monsters will fill is, basically, a big muscular brute who hits things and doesn't waste a lot of effort on thought. I've got a few fun ideas in store for them. Tom produced a lot of really incredible sketches for the brutes, we're going to have a lot of fun mixing and matching bits to come up with the next iteration, but this guy's got roughly the body shape that we'll likely go for.

So there you have it, three out of the 57 sketches. Yes, 57 -- I just counted them. They're all great. Seriously, as much as I love that octojellypus, I'm not including it in the game because Tom produced something that's even better.

This is why you hire pros, folks.

Tuesday, November 16, 2010

Finally some action!

Finally, some action! Of course, this is a still shot so you can't see the action, but trust me, it's there.

What action, you may ask? Simple: The monsters move! (And you can add and remove monsters on the map, but that's mostly just for testing the movement.) The game will eventually be turn-based, so I've rigged the 't' key to make the monsters wander a single square in a random direction. They don't currently rotate to face the direction they want to go, and they don't necessarily walk in any reasonable pattern, but they do at least move.

What's even better is that they're not just teleporting, which is what I was originally planning on counting as "acceptable" this week. They're actually sliding smoothly from one position to the next over the course of a quarter second.

Based on my accomplishments in the last few days, I think I might hold off on my initial release until I get at least some basic gameplay in there... I'm not 100% sure what I'll have in there, but I'm close enough to real gameplay that I might as well wait until there's something worth playing with.

Sunday, November 14, 2010

Map viewer, stage 1!

I've been fighting a particularly annoying cold the last few weeks and haven't gotten a lot done on the game, but the cold appears to be letting up and I managed to be productive today. Here you can see the map viewer/export app that'll go out with the regular game, allowing you to view your map and export it as an image file. The idea here is that if you come up with a really neat dungeon, you can export the map, print it out, and use it as a D&D dungeon. Not necessarily the most amazing feature ever, but hey, I'm excited about it.

It'll have a few handy features, such as being able to choose the scale (the screenshot I posted has it defaulted to ~ 1cm per grid square), the ability to choose whether to draw a grid overlay and whether you want the grid overlay to have a slight glow around it, and even the ability to set colours for the grid overlay. That stuff's already basically done. Before my trial release in a few weeks, I'm going to add the ability to specify floor, wall, and outline colours, as well as specify whether the grid (or even just the grid but not the glow) show show overtop of floor tiles.

The user interface is a little ugly right now, but don't worry, I'll clean that up soon. Like everything else about the game, I'm starting with a quick hack job and then refining it based on how it actually works out.

So that's it for this week... On the agenda for next week, I need to think some more about a save/load game menu, and I need to refine the exporter. And at some point soon, I'm going to have to make the monsters walk around the dungeon, although he won't be animated -- he'll just teleport from one square to the next for now.

Tuesday, November 9, 2010

Well that was easy

A little TOO easy, one might say...

I've got the game updated so it can save and load at will. Right now, the save file name is hardcoded, and it's automatically loaded at startup (if it exists). I'll be working later this week on adding a proper save/load menu, which ought to be interesting. Honestly, writing data out to a file and reading it back in is generally pretty easy -- the hard work is the ten million details around that, like choosing a file, handling errors, displaying a menu, etc.

Still, considering how completely flattened I've been for the past week, it feels pretty damn good to have accomplished anything at all, even if it was just the really easy stuff.

Saturday, November 6, 2010

Downloadable app!

I said I'd have big news about a downloadable version of my game, didn't I? Hmm, guess I'd better get on that.

So, here we go: At some point in the next few weeks, I'll be releasing a free downloadable version of my game! A very, very minimal version. (But free!) It'll be pretty close to what you saw in the last screenshot I posted. There's a fair degree of underlying code that needs to change, but when I'm done I'll be able to save and load games. So you'll be able to draw your map and save it and then reload it later. Pretty exciting stuff!

Oh, plus you'll be able to export a 2D version of the map at varying scales, suitable for D&D adventure handouts, planning, or even battlemaps.

I'm currently targeting Dec 1st for the initial release.

Tuesday, November 2, 2010

More visible progress

Took a spontaneous vacation day today, partially to recover from a rather annoying illness (cold? flu? sinus infection? SARS?) and decided to get some work done on the game. Big strides today, I think. First up, I've finally added the option to draw terrain! (I also added a border to the minimap, as you can see from the attached picture.) Clicking on a floor tile will cause it to change into a wall, and vice versa. You can also click and drag around to have it keep adding whatever type you're working with; so if you click in a wall section and drag around, you'll keep adding floor wherever you drag.

This isn't how the game will actually work, by the way, but it's a good first step. In the next few weeks I'm hoping to switch it to a system where you'll select tiles and then choose what you want to do with them. For now, that'll be restricted to "make floor" or "make wall", but eventually there'll be stuff like "fortify", "decorate", or what have you. I've got other stuff that's higher priority right now.

Also on today's hit list: Moving the mouse cursor to the edge of the window causes the window to scroll in the appropriate direction. For example, moving the mouse to the left edge causes the window to scroll to the left. Not the most exciting thing in the world but it's amazing how much easier it makes it to navigate around.

All in all, that makes this a successful week already. But! I've got more plans. I'm also going to look at a way to navigate by clicking on the minimap. And then I've got some code tweaks to do, which will result in the ability to save and load a map. That one may take until the weekend, or even into next week, since I don't currently have any actual menu, so that'll have to be built too. It's amazing how all these little details add up.

Oh, and make sure to check back later this week! I've got some big news, regarding a downloadable version of the app coming sometime in the next few weeks...

Saturday, October 30, 2010

Things are getting done

This week was mostly a wash. I spent some time modeling, but I was busy with a bunch of stuff and then got sick, so virtually no coding happened until this morning. Luckily, with that much time away, I had time to think through some problems I was facing, so this morning's coding work went much more quickly than normal. The end result is that I have a first-draft minimap added to the game! The way it's currently being done, it'll always display the whole map the bottom left corner.


See, it's a minimap! I've also added an extra room to the default map to be sure the minimap was working the way I wanted it to. Pretty cheesy stuff, but as I've said before, it's all about the little bits of effort accumulating over time.


And just for fun, here's Desmond, round 2. As you can see, he's grown legs and a tail, but no wings yet. I'm still very unhappy with his face, and I'll probably tweak that some more (especially the nostrils) before I get too much further, but I still think he's starting to look a whole lot better than he was before.

Next up... More work on Desmond, probably. And then I'm going to make the minimap live inside some sort of container in the lower-right corner of the screen, so it won't take up so much of the screen. Then I think it might be time to start really working on the actual game part of this game.

Oh, and sometime soon Tom Fowler is going to start on the artwork. I'm honestly not ready for it yet, so chances are the art will just sit around for a few weeks looking awesome with me feeling guilty about not touching it. But I'm still looking forward to seeing it, because hey, this is Tom Fowler we're talking about here.

Friday, October 22, 2010

Finally some more pictures


Here you can see the beginnings of a dragon model I've chosen to name Desmond. I'm not sure if Desmond will actually appear in the game at all, but I'm trying to set him up so I can use him as the border for the minimap the game will eventually have to have. We'll see how he turns out. Here's what he looks like for now.


And here's just a gratuitous shot of the game with walls, floors, the cursor, and a tile being pointed to by the cursor. It's not the most exciting, but hey, it's better than just another wall of text in here, right?

Sunday, October 17, 2010

Back to visible progress

The massive code cleanup effort of the past week has already paid dividends. It doesn't sound like much to non-coders, but in the space of two hours tonight I managed to get the right map square highlighted as the mouse moves around. Well, almost the right square. It's perfect for floors, not so hot for wall tiles. Still working out the kinks, dontcha know. ;-)

Giving myself some easier goals for this week. I'm going to get the highlighting working correctly, expand the screen size (the default project gives you a pretty tiny window), and make it fullscreen. If I'm feeling particularly ambitious and have time left, I might start in on selecting tiles and transforming them from wall to floor and back again.

I'm oddly excited by that prospect... It might not seem all that impressive, but it'll be the first real element of actual game that I'll be putting in.

Thursday, October 14, 2010

Invisible progress

One of the fun parts with any software project is that a lot of the work is invisible to the end user. A lot of that invisible work is behind-the-scenes coding, like some work I have coming up soon to make my monsters move intelligently around the dungeon, but a big chunk of it is stuff that doesn't actually directly impact the game. Things like setting up source control, for example. Which is, not so coincidentally, what I accomplished on Tuesday night. Before that, I got the code reorganised to be easier to maintain, and solved a weird graphics glitch.

All of this to say that the end result of three days work since the last time I posted is that the game looks and behaves exactly the same as it did before I started any of this work. But trust me, it's better on the inside!

Tonight I get to start on picking the tile the mouse cursor is over and highlighting it in some way, which means we're back to visible progress. Within the next day or two, I should have a screenshot worth posting!

Saturday, October 9, 2010

On to the hard stuff

Not much visible progress to report today... Between having a real job, not sleeping well, playing with the kid, visiting family, and a bunch of other things, I haven't had much time to spend working on the game in the past few days. I did get walls drawn in game, and I got the camera moving around, so that was pretty fun.

Now, though, I'm into the hard stuff. Until now, all the work I've been doing has been prototype work -- just playing around, experimenting with how things work until I get it sorted out. But I've gotten to a point where I'm done all the prototyping and it's time to refine the code and start worrying about things like readability and maintainability. It's an important step, but it does mean that things temporarily slow down, especially on the visual side. In the long term, it'll help me get the game done a whole lot faster though, especially when I start adding whatever new functionality I haven't thought of yet. Good design matters in code!

On tap for this coming week: Generating a map at runtime instead of hard-coding floors, walls, etc. I'm also going to try to get wall tiles to highlight in some way when the mouse is over them, and hopefully clean up the cursor a little and give it a click animation. Even if clicking doesn't do anything, it's disconcerting when there's no visual confirmation for a click!

Next week, I'm planning to start building the real UI side of things; adding a command bar where you enter commands for your minions and having wall tiles highlighted a different colour to indicate pending work.

Tuesday, October 5, 2010

First screenshot!


Just felt like showing off a little progress. I've got the little man standing on a dirt floor, I've got my hand cursor (need to clean that up a little, but it'll do just fine for now) floating around, and although you can't see it from a still image, I've got the camera rotating around and moving up and down. I need to play with the control scheme somewhat, but that's something I can refine later.

Next up: Walls! And a slightly broader view... The camera's in just a little too tight right now. But yeah, with a better camera angle and some walls, hopefully it'll start to look like a person standing in a dungeon, which is when I get to start adding actual gameplay in. Hooray!

Sunday, October 3, 2010

Fire!

Nothing too exciting to report today, but I have been having fun experimenting with Blender to create fire. Fire, fire, fire!

I need to tone this down a bit, but this is a pretty good start for a torch. I guess. Honestly, I'm not sure how that's going to work. I guess I'll need to do some more research to see if I can actually use this. But it's been entertaining figuring out how to make reasonably realistic-looking fire.

Now back to relearning a bunch of math I haven't thought about in 10 years!

Edit after the fact:


Just for fun, I experimented with changing the colours. I think this looks suitably eldritch! I'm definitely on the hunt for ways to use that in the game... It'll probably end up being one of the last things to be done before release (most of the polish is going to be last-minute stuff) but seriously, doesn't that flame just look evil and fun?

Saturday, October 2, 2010

A journey of a thousand miles

Working on software always makes me think of the old adage that a journey of a thousand miles begins with a single step.

Keep that in mind as you're reading this blog; progress is measured in an hour here, an hour there, one tiny detail at a time, until eventually it all comes together as something really interesting and powerful.

Today brought three tiny steps. First off, I have a cursor! It's a little hand, and you point the finger at whatever it is you want to click. Second, not only did I get the cursor into the game, I even got it to track around the edge of the game window if you move the mouse out past the window's boundaries. And third, I got my generic green dude to move around when you hit the arrow keys.

So, tiny steps, but all of them are vital in their own way. Tomorrow I'm going to continue working on floor tiles, but that one's more complicated because I'm working off of some nicely generic sample code that incorporates a ton of math, so doing anything involves a whole lot of (re)learning.

Tuesday, September 28, 2010

Administrivia is stressful

This evening was spent doing the initial work to set up a corporation. I've never done this before, and frankly, I'm finding the whole thing a little stressful. Not really for any good reason; just a random part of my brain that's freaking out a little at the prospect of being committed to actually following through with this whole crazy plan of building a computer game. So I'm ignoring it.

The plan for the week is to produce my first half-baked humanoid model, which will be used as the generic figure for both heroes and monsters (although I'll be giving it different colours to represent different unit types). After that, I'll be building the initial executable, getting the model rendered in the gamespace. That's actually a pretty quick step, so after that I'm going to give the model some floor to walk around on.

Normally, the player won't directly control monster movement, but it'll be a good step for now to help me make sure that characters can move around in believable ways, that I draw floor squares and tile them as I need to, and so on. Really just the first basic steps to manipulating objects in 3D space.

I've also got to get some more administrivia done, like starting on a website. I think that might be next week's work, or possibly a sideline for a few weeks.

Saturday, September 25, 2010

What's going on here?

Might as well start this thing off by explaining what the heck is going on.

The short explanation is that I'm blogging my attempt to create a computer game.

The longer explanation is... actually, it's very similar to the short explanation. Y'see, about 15 years ago, I decided I wanted to play a computer game where you built yourself a dungeon and lured heroes in to their doom. I've been thinking about that game ever since, and while a couple games come close -- Dungeon Keeper, Dwarf Fortress, and Minecraft -- nothing's ever been quite what I want. (Side note: Go check out Minecraft. The free one is kinda fun, the for-pay version is ZOMG AWESOME.)

A couple weeks ago, I decided that instead of just wishing I could play this game, I should go ahead and build it.

That's not as crazy as it sounds. First, I'm a professional developer, and a pretty damn good one (if I do say so myself). I've even done some 3D game development before. Admittedly it was in school, and the stuff I do on a day-to-day basis is quite different, but I'm good enough with code not to worry about the techie side of things. Second, the tool and technology support out there these days is just incredible. In particular, I can't say enough good things about Blender. Third, while I have very minimal artistic ability, I have a good friend who's a talented professional illustrator who just happens to absolutely love drawing monsters. I've talked him into doing the concept art as well as a few illustrations for use in-game. Tom Fowler is pretty much the exact person you want to have around if you're doing a game involving monsters.

Will there be hurdles? Yes, of course. For starters, despite having a pretty clear idea of the concept of the game (I keep thinking of it as "SimDungeon"), it turns out that I don't know how that translates into gameplay mechanics. So in part, this blog is my opportunity to have a discussion with myself about whatever random part of game design and development seems interesting on any given day.