Archive for the 'rpg' Category

Design, or is all that shiny stuff important?

November 15th, 2007 | Category: design,game design,gui,rpg

Design is a very big thing, for a lot of people. But I find its often misunderstood, or incorrectly applied. To start with, design does not mean the same thing to Interior decorators as it does to architects. But most people see design as more of the interior decorator kind, than the architect kind.

Interior decorators do what I call appearance level design. And the benefits of appearance level design are not all that important. They make people feel better, more at home. Its a more impressive room/house/office.

That is not real design, in my view. Real design is figuring the best placement of bathrooms and appliances in the kitchen for maximum comfort and productivity. Real design is invisible, unseen, uncredited.

Here’s a little task for you, to see what design really is about. Walk into any room of your house/apartment/mud hut/palace, and choose a common household item. I’ll take a knife block as an example. Now, spend five or ten minutes thinking about how you could improve a knife block, to A) make it easier to use or B) add new functionality that is not just combining two opposite functions (like a clock on a VHF antenna).

If you can come up with an improvement that is not just glitz, that actually makes the item better than it was before, then the item does not have good design. If however, you can come up with nothing, and you realize changing anything would be for the worst, the item has good design.

My example the knife block, works really well for its purpose: hold knives, keep them sharp, and keep them organized. Can there be an improvement, that would make using it easier, faster, more efficient at its purpose? After ten minutes, all I could come up with was improving the knives themselves. The actual knife block works great. Its easy to pull out a knife, you know by the size of the hole how big the knife is, and its easy to put back in. Some knife blocks have built-in sharpeners, and thats about the only improvement that could be made.

The fact is, it takes experience and introspection to see design around us all the time. In our games, in TV shows, in our world all around us.

Another excellent example is in Final Fantasy III for the DS. The actual interface is a hodge-podge of button-clicking and touch-screen use, not very good. However, in the item list, for each category of items, there is an 8×8 icon representing it. This sits beside each item in your inventory, allowing you at a glance to see what it is. Axes for viking weapons, a glove icon for accessories, a spear icon for dragoons. Its simple, effective, nearly invisible. I caught myself using the icons, and thats when I actually noticed them. Someone consciously decided to make icons for each kind of item, and displayed them. Why? To make it easier to deal with a large inventory!

Good design is all around us. And good design takes conscious effort. Any time you find yourself making a snap decision on the placement of an item, or icon, or graphic interface, ask yourself why it goes there, and is there any way I can improve this?

As a personal example of good design, I was tasked to make it so that users of an application would know that the file has not been saved yet. My first response was a dialog on exit(or any other context change, more on that in future posts) if the file was not saved. Then I thought, okay, the user, she’s likely not going to want to have to click through a dialog all the time, so how else can I do this? I added an icon to the upper bar, that appears when the file is modified. Its red, shaped like a stop sign, and has the word stop on it. Its placed right by the exit button.

Nowhere else in the application is red used, so when you go to load a new file, exit, you see the icon if you did not already. It disappears when you save, and it appears when you modify a file. No dialogs, no clicks, simple information conveyed quickly and easily. That is good design. It makes the workflow faster, the user quickly and easily learns what the icon means, and it helps them!

Next time, ask yourself why you are making the decision this way. If you can improve it, do so!

Comments are off for this post

Game AI, or Do game AI’s feel pain?

November 10th, 2007 | Category: AI,game design,genetic algorithms,rpg

As some of you may know, I am currently working on an rpg.(Who isn’t it seems like).

However, I was thinking about different AI ideas that could be implemented in an RPG. For this post, I will focus only on monster/enemy AI.

Now, the first thing that can make rpg battles/dungeons a bit more interesting is a context outside of battle, where what happens in battle does affect the overall dynamic of the dungeon. Here is one possible idea, similar in aspect to a genetic algorithm. Each enemy has a fear and an intelligence rating, randomly assigned within a predetermined racial standard deviation. Say, slimes are smarter than kobolds for example, on average.

Now what this means is that if you cross an enemy’s fear/intelligence barrier, ie, “They’re really tough, maybe I should run.” So they’d try to escape. If they do escape, what happens? Normally, you’d never see that enemy again, or at the very least, never be able to tell. However, what if the enemies that survive or escape you, communicate with each other? And even are able to formulate plans and groups to take advantage of whatever they learn.

This can be done by giving escaping monsters a memory, a kind of statistical observation of your performance. Then in a background task, have a couple or more of such monsters communicating their knowledge to each other. Now, based on the length of time since the knowledge was obtained, the detail, and what is observed, different information will be valued more than others. By sharing the information between the monster memories, the background task is able to determine your weaknesses. Say it saw your white mage fall to two hits, but your knight took 10. That would be taken into account.

Then, the enemies would lead a charge against you, with slightly modified battle AI’s. As per our example, focus on the white mage!

And since this would be largely time and number of battles based, the longer you are in the dungeon, the tougher the enemies get.

To balance that, we make it so that when you leave the dungeon, the monsters all forget about you.

This behaves similarly to a genetic algorithm, where the fitness test is fighting you. And the sharing of information is similar to swapping genes, but, in this instance, its a method that can deal with unexpected shifts of the problem space. Whereas, in genetic algorithms, the genes have to fit the problem well, and take a while to adapt. By data-mining observed actions, the enemies can adapt faster than with a genetic algorithm.

Another idea I considered was enemy genes, where each enemy you manage to kill does not reproduce, and thus, the more you fight in an area, the tougher the monsters. However, without a very flexible genetic system(IE, one too powerful to adequately simulate) this would only lead to monsters with stronger and stronger genes. Also, the algorithm would have to be tweaked to show results quicker than most GA’s.

Next post: RPG AI Part II

1 comment