Next Step: Proper NPC Design

This topic is 819 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Good morning all,

My next big step is to finalize the towns designs and features for my JRPG (heavily design influenced by games like Breath of Fire, Chronotrigger and Golden Sun).

I am programming the behavior for the towns' NPC inhabitants, right now they have simple dialogue when you walk up to them and press A and give quests.

The main organic feature they have is that some of them are programmed to pick a random location in the town, check if it is possible to move there, path-find the best way there, walk there, then repeat the whole process. So far this looks pretty nice as the NPCs keep walking to random locations and makes the town feel a little more alive. (I can of course make this process a little more restrictive so it plays out a little less senselessly, so some only move around the market square for example).

Before I move on to focus on the next feature, do you fine people have any more ideas or thoughts on how to make the towns and inhabitants feel a little more a live, more organic, despite the very simple 2D graphics style? What are some design features or behaviors which you have enjoyed in old JRPGs when it comes to inhabited locations?

Edited by Got_Rhythm

Share on other sites

Do you have a day/night cycle?  Things and characters that can only be interacted with at a certain time of day potentially in a particular place.  Underground stuff to happen upon with a midnight stroll.

Share on other sites
That's great! I had taken that off the table a long time ago because I assumed I'd have to commission twice the number of assets (a day and night version of everything).

But now I'm better at game design I think I can accomplish it easier by having a black box cover the whole screen with a low opacity, and add some interesting lighting effects.

And then yeah like you say, certain events at night only and day only.

Share on other sites

IF they're moving, i 'd be tempted to make them interact with each other.

They could buy/sell goods according to some needs and/or profit(the player should be able to trade with most-if-not-all NPCs)

Or they could spread rumors, let's say the player accomplished a quest(slay dragon) the quest-provider would then tell the next X NPCs he encounters what the player did,

giving the player bonus-reputation with X different NPCs, and those might refer to the player as "dragonslayer."

Edited by powerneg

Share on other sites

I'd like to add two notes of caution, if I may:

First, beware of making it difficult for the player to find a given character; consider providing information to the player on where relevant NPCs are to be found. (One option for this might be to allow the player to ask other NPCs for the location of a given NPC.) Naturally, there might be exceptions to this: You might want certain NPCs to be unavailable at certain times, or difficult to find in general (the latter might make for an interesting puzzle if handled well, I imagine). It might even be interesting to allow the player-character to build up information on the locations of NPCs in order to (perhaps) provide the sense of "getting to know" a city or town.

Second, if characters are in specific places at specific times, consider allowing the player to skip to a desired time. Sitting doing nothing while waiting for a specific in-game time can be rather boring, I feel!

IF they're moving, i 'd be tempted to make them interact with each other.

...

Or they could spread rumors, let's say the player accomplished a quest(slay dragon) the quest-provider would then tell the next X NPCs he encounters what the player did,

giving the player bonus-reputation with X different NPCs, and those might refer to the player as "dragonslayer."

I really like this idea: it could be a lot of fun to hear NPCs spontaneously chatter with each other, especially if their conversations include the player's exploits, and reflect changes in the game-world or plot.

Share on other sites

Have some NPCs when 'asked' direct you to another NPC who has the quest for you.  That as a variant (and have them mention where the other probably is).

On the return or for the initial 'find' have some NPCs who hang around alot be able to tell you where the questgiver is at the moment to make it easier to find them.

The quest giving  NPCs should have some habitual spots they frequent (home and business) much of the time and some schedule (if your game has time)  when they are usually at those spots

Share on other sites

when it comes to believable NPCs in settlements, key things include:

* schedules and activities for NPCs. NPC "Radiant" AI in Oblivion and Skyrim are basic examples of this.

* intelligent interactions between NPCs. such as the sales transactions poweneg mentioned. note that you don't actually have to model transactions, just do the animations to make it look like they are interacting.

* intelligent interactions with their surroundings. something a bit more than just using a grindstone that happens to be at hand (skyrim). imagin if instead they strolled up the street and browsed the foodstuffs for sale in the market area. much more convincing. this kind of stuff is basically a fancier version of your random wandering. but you have a number of random activities to choose from, based on whats nearby. and animations for all of it, of course.

* good animations that convey emotion - a talented animation artist can really bring a character to life. especially when combined with a good dialog writer and a good voice actor. its the animator, the writer, and the actor who turn a model into a believable synthetic person inside your computer.

* simple things like making the NPCs face the person they're talking to. another example of how attention to detail in animations can make a big difference.

you might sum it up as high quality AI driving high quality animations.

Share on other sites

Do you plan on having a conversation system? If so maybe you can develop trust with NPC's (using the convo system) which then share information with you, or harbor or help you out if you're in trouble.  This would allow you to tackle problems in a different way had you not gained their trust.

Edited by Infinisearch

Share on other sites

I remember a game ages ago where there was a NPC in a bar who had a list of subjects (keywords actually) that you could ask what they were/meant/whatever and you could get 3 answers at a time.  Then the NPC would dismiss you (and you could come back sometime later).   You could request the info on any of the known subjects again if you wanted.     Having a few NPCs to do that for general situations things and then maybe similar  (shorter list) for specific/situational NPCs dealing more with quests and such.

Edited by wodinoneeye

Share on other sites

For the schedules, I would try to make it high level and try to make it organic through points of interest driving the NPCs.

Something like:

(Wakeup -- sort of implied)

GoToMarket -- 8am

GoHome  -- 4pm

GoToBed -- 10pm

And then have various points of interest at each location that any ai might walk over to and play an animation for.  The points of interest could then be checked for and claimed by NPCs, having them walk up and play some animation.  (For example, that market, the NPC could be a shopper, and go from stall to stall looking at wares, while a NPC who is a storeowner, the vendor point of interest could request he come over and stand there all day once he is at the Market.)

Same with GoHome, the home might have a Library with a Desk, so the NPC could browse the books or go sit at the desk and read.

Share on other sites

The old ultima games (hmm.. part IV or V ?) have some nice behavior. In general, I would recommend (thought somewhat technically) to move behavior to single objects. That is, instead of a NPC who knows that he needs to eat at a tavern table, the tavern table provides the interaction to eat. This makes it a lot easier to let your NPCs interact with the world (the NPCs in Sims interact like this).

Simple example:

tavern: lot of table objects, which provides "eat" interaction

home: bed, which provides "sleep" interaciton for NPC Harry

field: corn objects which provides "farmer_work" interaction

NPC Harry, simple behavior tree (behavior trees, in short BHT, are a technically AI implementation) :

priority_node
- check_if_hungry
--> scan for eat interaction objects
--> find path to eat object
--> move to target
--> start interaction "eat" with target object (play animation,remove food items, update hungry state )
- is_morning
--> scan for farmer_work interaction objects
--> find path to farmer_work object
--> move to target
--> start interaction "farmer_work" with target object (play animation, produce new items, put them in inventory etc.)
- is_evening
--> scan for sleep interaction objects
--> find path to sleep object
--> move to target
--> start interaction "sleep" with target object (play animation,start snoring sound etc. )



Behavior can be reused and combined. New behavior can be added with ease (monster near->panic/combat, guards who seek objects with the interaction "catch_criminal", the player can get marked as "catch_criminal" after stealing something etc.)

Edited by Ashaman73

Share on other sites

The old ultima games (hmm.. part IV or V ?) have some nice behavior. In general, I would recommend (thought somewhat technically) to move behavior to single objects. That is, instead of a NPC who knows that he needs to eat at a tavern table, the tavern table provides the interaction to eat. This makes it a lot easier to let your NPCs interact with the world (the NPCs in Sims interact like this).

Annotated objects, there is a good old thread on this in this forum, I'll dig it up and edit this post.

edit - This was the original thread http://www.gamedev.net/topic/75762-annotated-objects-which-drive-behavior/

Edited by Infinisearch

Share on other sites

Remember to include some nice Gaussian randomness in the timings of NPC behaviour especially -- whether it's how long they wait in a given place before moving, when they switch activity, etc. One of the things that has always irked me about Skyrim is that all the shop holders pack up and go home at exactly the same time of day. So unrealistic!

Share on other sites

If your game makes part of the quest (or mission or activity) finding pertinant information to move the quest forward (versus most games where that aspect is lacking and the player's 'led by the nose')  then having to track down suspects/suppliers/guides in their routines/haunts/hideaways becomes more worthwhile  (instead of having them always stand around like mannequins ).    This topic IS about advancing interaction with game  'people' to some degree (and people aren't one dimensional as most games have had them - with more LOGICAL detail to their lives...)

You probably will have to partially match the detail level for all the uninvolved NPCS (but then maybe your settings won't look like a 'pretty desert'/mannequin-on-rails population).   We actually have enough CPU /memory resources (and modular programming and animations) to do this now (old days there just wasn't enough).

The effort a player needs to put into this has to be perceived as being worthwhile - maybe with better (or optional) results if they can obtain EXTRA information and sufficient reward for the time invested.  Possibly also - the whole scope of the 'playing' can be made to include some decisions about different ways the quest/mission is to be/can be solved (more flexibility of the player AND of the environment).  Unfortunately multipath plots/sandbox-like game mechanics are ALOT more work to program/debug/validate.

---

Depending on how LONG the quest/mission is (like if it spans time in the players real life),  journaling of what happened along its progress (and reminders of what was learned/seen and actions taken).   There are Lots of distractions in todays world, and players can easily lose the situational context  which is bad when  details are made relevant to the success of their quest/mission.

Edited by wodinoneeye

Share on other sites

Thank you guys for all the feedback. I have now implemented a day and night cycle. It's a bit clunky right now but it is there ready to be tweaked. No actual NPC behaviors tied to it yet but that will be fun to play with over the coming weeks.

The next experiment will be to have the NPCs interact with each other. So on a random chance if they are next to each other they will trigger a little animation.

I think that having extra text boxes for the NPCs' little conversations with each other might clog up the screen too much (as I will be porting to mobile eventually), but occasional little emotion icons above their heads might be a nice way to flesh them out a little more. It will also save on time and cost if I decide to try to translate the game...

The initial plan is to have a very simple conversation system consisting of two or three choices which elicit different responses. I think the main reward for engaging in conversations will be to uncover different ways of completing a quest, and to a lesser extent getting to know the world and the lore better.

Thank you for all the suggestions. I think it will all depend on how many different animations I can afford to commission which will dictate how much the NPCs interact with the world and how complex their AI will end up being, but you have given me a lot of great ideas, thank you.

Share on other sites

I think that having extra text boxes for the NPCs' little conversations with each other might clog up the screen too much (as I will be porting to mobile eventually), but occasional little emotion icons above their heads might be a nice way to flesh them out a little more. It will also save on time and cost if I decide to try to translate the game...

They might "share emotions" instead of talking(well, RL-chitchatting could be described as sharing of emotions) occasionally changing the emoticon of each other.

Share on other sites

This topic is 819 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Create an account

Register a new account

• Forum Statistics

• Total Topics
628732
• Total Posts
2984436

• 25
• 11
• 10
• 16
• 14