Sunday, September 5, 2010

02 - Dwarves have stuff

I have added some finishing touches to the expedition customization window:

Now you can see how many points every dwarf has. Also, there is now a point total. And you can give a nickname to your dwarf. Let's give it a try and and create a nice starting expedition:

The first 5 dwarves have each points in one important skill like mining, carpentry and growing. 'f' Ooxk is a proficient mason, but also a fighter:

Together with my last dwarf who only has 8 points put into fighting, they could hold of an early attack on your fortress. Maybe.

This screen is mostly done. There are a lot of tiny interface improvements that I could apply, but I'm going to focus on some features first so that soon one could call this a game, rather than a tool for extremely interesting people.

On the bottom there are some new buttons and one of them actually works!

Clicking "Items" will lead you to this screen, where you can add items to your expedition. This is not fully implemented, but on the top-right you have your category selector. Again, I think it is important to see all the categories at once without having to scroll. And your items are organized in 44 categories. I barely added some items in the first two categories, and I am well over 100 items. It feels strange calling animals and food items, but I'll go with it for now.

Now you can add all items that you need for your first fortress:

That about does it! Two horses and some horse meat just to be on the safe side.

As for development, even as early in this project the code is starting to become table-happy. I have a table for everything and a large portion of the new code is dedicated to procedurally generating the list of animals and food and make it display correctly in the list. There are a lot of complicated distinction. It is not enough to mark an animal as "young", because a young dog is called a puppy and cows have cow calves and bull calves. And you can have meal made out of horse brain, but not rat brain, probably because the rat brain is to small and you would need a lot of rats just for one serving. Why bother when you can eat the whole rat for a much more nutritious meal!? I went overboard again with implementing the list again as in Dwarf Fortress, but I'll try to not do it again.

This approach with tables is not working. I'll leave everything as is for now, but for future items, I'll create and editor which loads up an external file and allows you to edit any object. This seems a good idea. Why have only one world with one set of fauna, flora and rules when you can have an editor that maybe you distribute to see what other people can create with it?

For my next post, I'll show you how it looks when your dwarves have arrived at destination, introduce the new "look at things" mechanism, and maybe talk a little bit about trees.

Statistics: 1050 lines of code in 14 files totaling 27.7 KiB of code

No comments:

Post a Comment