Saturday, August 28, 2010

0.0.0.9 - Item Crafting

Adventurer 0.0.0.9 is out, and I'm back on my 7 day per update average schedule. The big thing that got done with 0.0.0.9 is that the framework of item crafting is in place. You can break down any item into its components now (liquids and gases will have no container and be lost, so watch out for that). Axe becomes a wood stick and an iron wedge. The other half of all that alchemy is the construction of new items from components. If you have a stick and a wedge, you can now make an axe from it. Simply select either item you want to start with, hit [c]ombine craft, and you'll get a list of all the items you can presently make from it. Pick one, and it will be made.

The other thing, not as major as the item crafting, is I fixed up the crash-out code. I managed to trigger going into that part of the code when I was working on the rest - only to find that it had problems with simple Console output. I mean, what the heck? "The handle is invalid"? Can you be any more generic, Microsoft? Oh, wait, they can. Anywhoo, I looked up what that was about. Turns out my project isn't a Console Project, so the ball is dropped when I call console commands, because nobody bothered to set up console stuff if it's not a console application.

In retrospect, I might be able to fix that if I can find the right settings. But more importantly, I fixed it another way. Instead of Console output, whenever the game fails to continue running, it dumps whatever exception occurred into a text file at ErrorLogs/crash.txt. So if the game has crashed on you, consult that file to see if anything's there. If you email me at zahru.tesla@hotmail.com or just post a comment here or something, include that file's contents. It'll help future versions be more stable.

Next week's updates' tasks are... hrm. Wow. A lot to be done. As a new feature, skills and attributes can be in. That way you can become more powerful as you do things. Skills are going to work on a 'natural' system. You get more 'axe' skill whenever you use an axe. You get tougher body parts whenever they're injured. That could be a lot of work though - no guarantees that it will be ready. Also, AI still needs work to make use of the new armors and weapons and crafting and such. So that can use some work. Also, combat mechanics need some work - you aren't guaranteed to hit the right target if more than one is adjacent to you. So I'll see you next week with another update. And I'll post another blog post at the start of next month.

Sunday, August 22, 2010

Adventurer 0.0.0.8 - Armor and Weapons


Here's 0.0.0.8, a day later than I would have liked. But hey, it works. So! Armor and weapons are in, and a slight rework on the inventory controls. 'e' and 'd' no longer do anything from the main game. Since now there's more than health potions, you need to select those items. Hence, the inventory menu actually does stuff now. Play around with it. When you need to remove armor, un[W]ear it. When you need to put your weapon away, un[w]ield it. All from the main game.

Weapons have their attack data, which override your own when wielded. Armor shaves off some damage, if you're hit in a body part it covers. And something else I added is a random item generation system that I can use varying weights for. Which means when I implement it, YOU can modify the encyclopedia entry on items and change their drop rates. As it is, armor has about a 30% chance of generating. Which armor is all equal.

Next thing I'm working on is item crafting. Yeah. Snap that hand axe, turn that shirt into strips of cloth. You'll be able to craft them into things. And maybe, just maybe, I'll add some skill growth.

Saturday, August 14, 2010

Adventurer 0.0.0.7 Level Upgrade


Adventurer 0.0.0.7 is ready for the world. I know last time I said I was going to do armor and weapons and stuff. Well, here's how my train of thought went: "Okay, to do armor, I'll need to be able to place the items down. I could add that to the mix with potions, but... eww, the potions are all in the halls, too. They need to only be in rooms. Now how am I going to do rooms? Hmm, I could do it this way... what about doors? That would be cool. And stairs. Those could all be fixtures..." And before you know it, I'd completely rewritten the level generation.

But I think it was worth it. The dungeon layout feels a lot better, and now we've got doors that you can [o]pen and [c]lose. The goblins and rats handle it perfectly; goblins can open doors, rats can't. Rats don't have any body parts dextrous enough. Also, since I had doors working, I went ahead and made another dungeon fixture, stairs. You can now go up [<] and down [>] stairs to the next level up or down. Now, the levels aren't persistent like Nethack; that'll involve saving levels to files, and I'll tackle that once I try to tackle save files in general. You can, however, go deeper or more shallow through the dungeon, and it all seems to work right.

Also, while I was at it, I fixed up the inventory menu a little better. Still not perfect, but you can see what you're carrying with you now. Also, I used the same principle to make a health menu. You can see all the body parts you have, and the general condition they're in. Also, I color coded everything to do with health so it's easier to notice you've lost over 30% of your blood, and your head's about to be hacked off.

Next update will probably be more to do with armor and weapons and such, if I can get the equipping of items to start working right.

Saturday, August 7, 2010

0.0.0.6 - Body Parts and Combat

......_............
...../.\.I'm.Okay!.
.....\_/...........
......|./..........
......|/...........
......|............
......|............
...../.\...........
..../...\..........
...................

It's another week, another update. What gifts does Kala bring this time? Why, a Body Part system that lets rats know they don't have opposable thumbs, and lets limbs be broken, maimed, and even completely taken off. Even threw in a splash of blood for you.

So yeah, there really isn't much more to say on the matter. You can now get into fist fights with the goblins and get your arm broken. You can also bleed out. You can theoretically survive without a leg, but if your head's damaged beyond repair, you're a goner. Also, rats have finally stopped picking up potions, and going for them. The AI has been shifted over to Creatures, rather than the main Update loop. This means that the AI can be more individual to the individual creatures. Go have fun with it.

As for what I'm working on next, probably armor and weapons. And getting that inventory menu to show you your items. Same concept, a screen to show your health. From here 'till version 0.0.1, I'm going to be focusing more on stuff that will use the systems I have in place, rather than go out of my way to make more. Really, a lot of the framework I needed is up now. So expect armor and weapons, some feedback, and maybe some skill gains or something like that. And a system to save your game, that'll be useful, if complicated to make. Hey, maybe I can even do multiple levels.

Oh, and something interesting, I found a bug. Memory leaks, they're causing the memory requirement of the game to rise the longer it's run, until eventually it will have to quit. I'm downloading a program that will help me track down what's causing that. It's not of critical importance, but it's on a list of things to do. Still, I think other things could use more of my attention right now, I'll get to the memory leaks once I've done some other things. Technically, they're probably not memory leaks. Rather, some bit of code is hanging on to variables it shouldn't need anymore, and keeps making more. Not so much garbage collection's fault. But I call 'em memory leaks. They act like memory leaks, and I'm going to track those down sometime.

Sunday, August 1, 2010

Adventurer 0.0.0.5, End of Month 1 - July

I bet you're wondering what that huge image up there is. I'll tell you - it's a healing potion mapped down to an atomic level. And it's in the most recent update, which I just posted at my Google Code page. Maximize the image if you want to see just how detailed it's mapping down that potion.

Now, I'm not saying that I track every single atom or anything like that. Or even that at the moment that all of the data held within is correct. But the system is up and in place, and I can now start working with it.

Adventurer 0.0.0.5 (I'm being conservative with the version numbers: I see 0.0.1 as being something I can reasonably call a game, and 0.1 as something I can be proud of. 1.0 Will be a stable 'finished' product, though I'll likely keep working on it pretty much forever. The big thing it does above the previous is that now I'm importing all the libraries of creatures, items, materials, and what-have-you all from text files in a folder labeled "Encyclopaedia Adventura". These text files simply hold information about creatures or whatever, using a system of "[TAG] variable". So "[CREATURE] human" says that a creature type named "human" exists. [/CREATURE] closes it. Everything in the middle is information about the human creature type.

The big advantage of this is that people will be able to mod the game easily just by adding, removing, or changing stuff in the encyclopedia file for it. The game file later opens it, searches for tags and data, and compiles it all into internal lists of Creatures and Items and stuff. So all I have to do to add a feature is to tell the code to look for another tag, add a variable to a creature, and update the library. So right now, theoretically, you can create any creature of any power that you want.

But right now it's pretty generic. I only have two creature images ready, @ and r. There's only health potions. And the rats drink the potions just as readily as the goblins. So the next update is going to fix that some. I'm putting in a Body Part system. In fact, if you look at the code, you can see that I've partway implemented it already. Basically, instead of saying "You're a rat, you can't drink potions", I can say "You can't drink potions because 1 - you're too dumb to figure it out and 2 - you need a body part capable of using items." This will be much more realistic. And it leads right into the second major thing I'm doing, an AI update. Right now, all creatures act the same because the AI code is in the Update code. But that's silly, it should be somewhere in the Creature code. So I'm getting around to implementing that Sentience object I set up earlier. Every creature will have one (possibly more in the future), called 'mind'. The mind will have a function for figuring out what the creature wants to do next. So then, all I have to do is say something like "action = thisCreature.mind.thinkOfAction();". It will then figure out what it can do, and what it should do. All this is planned for 0.0.0.6, which shouldn't take as long as this update to get around.


And finally, a retrospective on Month 1 - July. I have taken the game from a rough, weak concept to something that is starting to take shape. I've got some rather impressive systems in already, though sparsely populated. And I'm just bringing in more, now that the hard stuff is going by. Overall, I would say the work on this project is a huge success so far.

On the other hand, the project has almost no one watching it or downloading it. I have a whopping total of 16 downloads, most of those from people I already know. I have zero comments, except for a brief bit of interest on the Dwarf Fortress forums. I've only had one person contact me directly. I have 133 page views, most of those I bet come from myself.

Ah well, I'm doing it for the Fun and XP, not the Fame.

Adventurer gains +1 Months of Maturity Points.
Adventurer gains +1 Level of Awesome.
Kala gains +5 Update points.
Kala gains +4 Weeks of College.
Kala gains +1 Level of Game Programmer.