Wednesday, July 28, 2010

More delays.

Sorry for the lack of updates. Real life kinda threw a wrench into things and progress will be slow for a while. I did manage to get some equipping going on so it hasn't come to a complete halt yet. The player can now wield swords, knives, potions, corpses, etc.. Of course just because you can wield something doesn't mean it will do any damage but it's still fun to see my human swinging a goblin corpse around. I tweaked corpses so that they can do some damage so you'll be able to beat things to death with a corpse if that's how you roll.

Saturday, July 24, 2010

Delays...

Between the heat and people getting sick I haven't been able to get much done. Hopefully by Monday everything will be back in full swing and I'll be able to do regular updates again.

Tuesday, July 20, 2010

Thee Speaks?

The base stuff for NPCs and dialog are now in. You can now ask NPCs questions and they'll give me a reply. It's very basic right now and I'll need to flesh it out more as more content and lore gets added. I got it to wrap properly so if you get a long winded NPC it won't look too weird.

I also spent some time tweaking the menus. The menu being close to the upper left corner didn't really feel right so I moved it over to the right of screen center. I also made the conversation and item selection windows scroll better so you can tell when you're at the top or bottom of the list.

Photobucket

Monday, July 19, 2010

Remaining Features for First Release

I'm taking time out today to try to organize what features I need to complete for an initial release. As stated earlier, the first release will be very basic, with only the bare essentials of content. The list is as follows:

*At least one type of non-hostile NPC.
*A system for generating and displaying NPC dialog.
*Basic quest generating and handling.
*At least one skill increasing quest.
*World map with some varying features. For an initial release the world map will be pretty small. No point in making a large map when there really isn't much to do in it.
*Basic village generation. There may only be two or three villages on the world map in the first release.
*Add furniture to buildings.
*Some pathfinding optimization.
*A couple more combat commands to liven things up and make sure command switching is working right.

That's all I can think of for now. I may need to add more to this list later. The hardest stuff will be with the quest and dialog systems. Everything else should be pretty straight forward.

Saturday, July 17, 2010

You can run but you can't hide!

Something that I'm sure some of you will be glad to hear. I went back and added some proper pathfinding. Of course being the lazy bastard that I am I couldn't be arsed to code all that myself so I just downloaded some code from the internets and plugged it in, which probably saved me a week's worth of headache. It still took me several hours to figure out how to work it into my program but it's functioning flawlessly now.

Now the goblins are a lot more relentless, chasing me no matter where I run to. I'll need to go back later and re-implement a hide and seek mechanic.

Friday, July 16, 2010

Name Brand Furniture 50 Percent Off!!!

I got a few pieces of furniture drawn up. It's really hard to get them to look recognizable from a purely top-down view. I think I did an okay job though. The only one I think might be a little confusing is the table but it shouldn't take long to get used to. Here's the graphic file I'll be using in the game. The stuff in color is just me testing out how they might look and aren't exactly how they will look in the game.

Photobucket

Thursday, July 15, 2010

You Must Construct Additional Pylons!

I've been spending the past couple of days playing around with building generation. I think I got it to where it looks good and generates reliably. The hub system seems to have been a good idea. Surrounding rooms tend to blend in with each other rather than overwrite each other so that's good.

I'm going to take a break from the programming side and add some additional artwork. Maybe add some furniture and containers. It's stuff I'm going to need finished in order to work on other aspects of the program anyway.

I've also been considering writing up a laundry list of items I want to have finished for an initial release. Don't expect very much. Most of the game basics will be in place but there will be very little content. You may only see goblins and farmers to start with and the variety of items will be very limited. The idea will be to test out and demonstrate the features of the engine before I move on to adding more content.

Tuesday, July 13, 2010

Unable To Comply, Building In Progress

I started work on generating buildings. I got a function that generates simple, rectangular buildings with a doorway. I'm currently working out a concept for expanding it into more complex buildings with multiple rooms. The idea is you start with a single, large room that acts as a hub and add more rooms around it.

It gets more complicated as you try to make the extra rooms play nice with each other so you don't end up with some weird overlap. I may need to make an extra function that goes through and cleans up any mess that gets left over. Or I could make it where generation fails in case of an overlap. This will take a bit of experimenting to get it working the way I want it.

Photobucket

Monday, July 12, 2010

Saving, Loading and the Complications Involved

The save/load code is proving more tedious than difficult. There's a lot of variables that need to be dealt with individually. I had to make several functions to process saved data into something the game can read. Most of that is out of the way but I need to think about how I'm going to handle the save data as a whole.

Saving every individual creature, item and tile alteration would severely inflate the size of the save file, even for a single map. Currently I'm only saving creature information but that alone puts the save file at 200k. That's not too bad but I haven't even added items to non-player creatures yet.

There's several things I can do to lower the size of the save and all of them come with a catch.

First I can setup creatures and items to load all their information from a template. This would destroy any possibility of customized creatures and items and at the very least they require a position to be saved, plus stat changes for creatures. When a map is first generated this stuff gets all their information from a template anyway and modifies it. I could just save the data that gets modified but that is still a lot of data.

Second, I can let everything reset to it's original, randomly generated state when the game is loaded. This is obviously bad for several reasons. The player will have killed off a bunch of creatures in a dungeon and collected a bunch of loot, then load the game to find themselves surrounded by those same creatures and items.

The third option and the option I plan to use is a combination of the first two, except the player will only be allowed to save between maps. Much like in JRPGs where the player can only save on the world map. The catch is...well there's several.

Creatures and items will have reset every time the map is loaded. This can be good or bad depending on the player's tastes. To extend the replay value of a map I will set the majority of creatures and items to be randomized each time. For important creatures and items like non-hostile NPCs, bosses and special items, I will tag them as persistent. Persistent objects will not be randomized when a map is loaded but I will only have to save their dead/alive/picked up status. They will use the same seed the map uses to be generated. Other objects will use a random seed.

When all is said and done I should only have to save the player character's information and a few variables from each map.

I implied earlier that changes to map tiles may be a possibility. A handful of changes wouldn't be a problem but I also have to consider the possibility of the player tearing down every wall and tree he comes across. I may allow for some maps to be completely saved to the hard drive to let the player construct a home or something. That's going to be pretty far down on the list of added features so I'll cross that bridge when I come to it. For now expect any map changes to be discarded when it's loaded again.

Saturday, July 10, 2010

Items...

Still getting a few issues out of the way with items and inventory. I knew items were going to be one of the hardest parts. Fortunately there shouldn't be much more left to do with them so I'll be moving on to more important stuff soon.

Friday, July 9, 2010

Dead Bodies Everywhere!

Still squaring a few things away with command menus. Creatures are now dropping corpses when they die, which is essentially an item clone of themselves with some graphical modifications. The portrait gets replaced by crossed bones. I considered using a skull and crossbones but I thought that might look ambiguous with skeletons and necromancers running around.

For a little graphics enhancement I created a new GameObject array for VanishingObjects. Whenever a Creature dies or an Item is picked up it creates a graphical clone with a 1 second lifespan. As the vanishing object approaches the end of it's lifespan it's alpha value decreases making the object more and more transparent until finally it disappears. It's a definite improvement over the harsh instant transition from Creature to corpse.

Thursday, July 8, 2010

Potions Everywhere!

I got most of the command menu, inventory and item stuff in place. If there's going to be any hard to find bugs it will be with those so I'm testing them extensively before I move on.

As a stress test I added 10,000 potions to random positions on the map and didn't notice any slowdown. So I pushed it up to 1,000,000. Without placing any items this simply increased the time it takes to load the game significantly. Normally the game loads nigh instantaneously. Once the game loads it runs fine but makes the game use over a gig of system memory. If I actually place that many items...well I'm sure it would load eventually.

The total number of items on the map should never reach 10,000. To do that would require the maximum number of creatures to drop the maximum number of items in their inventory. For gameplay reasons I don't plan on allowing creatures to drop more than a handful of items when they die. Combined with items already randomly scattered on the map I estimate the most you'll ever see is around 2,000.

Of course there's nothing to stop the player from dropping that many items and I'm sure some will try. However it will start to look pretty ridiculous around the 100 mark when they start dumping items all on one tile.

I still have a few things to sort out with commands and inventory then I'm going to start laying the groundwork for save functionality.

Wednesday, July 7, 2010

Creature Graphics as Tokens

I took a break from commands and started changing some of the graphics around. I spent a good deal of time last night experimenting with different ways to draw Creature graphics. A full body, colored creature takes a lot of time to draw and can look awkward without animations. ASCII might be good enough for some people but it doesn't really portray what a Creature is very well. So I decided to shoot for something in the middle and I'm not sure how popular this idea is going to be.

Creatures are now represented in game as tokens. They basically look like coins with a simple drawing of the Creature's head in the middle. The Creature's image is overlaid on the token at runtime. So for instance I can have a goblin head portrayed on a rough looking, white token to represent a goblin skeleton. In my opinion it looks a lot better than ASCII but is a far cry from being realistic. But at a glance the player should be thinking "Yep, that's a goblin alright". Here's a screenshot of the token in action:

Photobucket

Welcome!

After much consideration and many suggestions from forum posters I decided it would be wise to create a blog for my game Dathida's Legacy. Dathida's Legacy is a graphical roguelike with an emphasis on getting the player more involved in the world around them. Character progression will be directly related to the quests they undertake and acquiring powerful items will require exploration and/or ingenuity.

Expect to see many unique features and I will try to update with my progress daily. Updates will be taken directly from the originating forum thread which you can view at: http://www.bay12forums.com/smf/index.php?topic=60464.0 That site is the home of Toady's excellent roguelike, Dwarf Fortress, and I recommend you give that game a try as well.