Game Development Community

dev|Pro Game Development Curriculum

Plan for Ted Southard

by Ted Southard · 08/11/2004 (7:36 am) · 4 comments

Well, looks like the redesign of the AE script is the way to go, and it's all set and waiting for a bot to test with. As the team works on the visual content for the game, I'm plugging away at my own version of the AI framework. Why my own? Well, there's a way that I want the bots to do things that isn't easily managed with the code and scripts in their current incarnation. There's a few changes that I want to make to the AI code for the following things/reasons:

1) I exposed AIPlayer::ProcessTick() for quick prototyping and for the server scripts to do small things inside the tick function. Adding a variable inside the code counterpart allows me to control the script ProcessTick() from executing every tick to now executing every n ticks. I'm going to use that to test level-of-detail AI for some of my functions.

2) I had the hardest time trying to make my bot wander for a few days, and then it dawned on me that the follow code that's in the AIPlayer class now supercedes the wander code, and vice versa. So, all of that needs to be combined, as well as functions with "goto", "follow", and "attack" targets. Instead, it should be a more generalized "target" and "state". If the target is null, then the state would have to switch to something else, though if the bot has a target, then the state it is in(goto, follow, attack, serenade, etc) dictates the action, instead of seperate functions with seperate targets that interfere with each other's functionality.

3) The AE scripts will need the above two things, and I'm working on several helper functions for wandering not-so-randomly(or at least looking like it), and "life-schedules" for more lifelike behavior of the mob's in the game. It occurred to me that in the MMO's I play, the mob's either sit there and do nothing, or they just sort of mill around waiting to be sent into the big spawn sphere in the sky. Kind of dumb, and it doesn't look engaging in the least. Life-schedules allow for mob's to wander, sleep, eat, etc. Other functions will give them a short memory in case a player doesn't kill them, and if the player returns and the mob still remembers them, the mob will act according to it's nature(ie, run away, make a show of intimidation, attack, etc).

Also, I'm thinking of putting a little bit of AI into other parts of the game. Here's a few of the considerations I'm looking into:

1) Color coordination and clothing coordination of the NPCs dynamically generated in the game. I've seen it in other games that they just wear "whatever". It's a small thing, but it's a visual thing that can be put to use to make the gameworld consistent with itself.

2) If you defeat an NPC, you should loot what they're wearing. In other words, if he has a nify sword and it's not damaged beyond repair or destroyed in the fight, then you should have access to it as loot. The opposit also holds true: What the hell is a Radioactive Sandflea doing with a laser blaster if it doesn't have hands or a backpack!? Raw materials such as hide, meat, etc? Sure. Money? Maybe the Shankgoats in the game will have some(goats eat anything, you know), but by and large, animals don't have money.

Well, that's it for now... Back to work :\

About the author

Started with indie games over a decade ago, and now creates tools and tech for games. Currently working as a contractor for startups and game studios.


#1
08/11/2004 (10:09 am)
I like the idea of life schedules. Some of the very early Ultima mobs had these, as well as most of the good MUDs. They gave those games so much life, even if they were just simple scripts.

Are you planning this to compete with the other kit, be an alternative, or keeping it for yourself?
#2
08/11/2004 (10:53 am)
I've been programming MUDs for years. Some MUDs certainly do follow the 'consistent world' ideas very well, not to include some of em have some hardcore roleplaying - which is what really counts.

Of course consistent worlds are much more easily accomplished in a MUD than a graphical counterpart. Thats cause its all text. :P

-Jase
#3
08/11/2004 (12:15 pm)
Erik: Right now I'm keeping it to myself. Not because it would compete with Phil-and-company's AI pack- I think our packs may be looking at different parts of the same problem(of making games a little more realistic and fun in general). But this is a part of the game I'm trying to put together to make it competitive with the masses of other persistent worlds out there. If I released it for free or for pay before or just after launch, and someone used it in a competing product... ::shudder::

That said, I will probably release some small update for free, since I did benefit from code snippets, and I'd like to contribute as well, but it won't be anything groundbreaking(well, strictly speaking, neither is what I'm talking about in the plan).

Jase: It's a lot harder to be consistent when you're presenting all the visuals to the user, because with text the player's mind fills in the blanks. Here, we fill in the blanks, but even then it's hard, and a lot of MMO's and PW's don't do it well.
#4
08/13/2004 (8:47 am)
Very cool stuff Ted. Please continue with the updates whenever you have them, I love hearing about AI dev with Torque.