Jump to content
  • Advertisement
Sign in to follow this  
kremvax

Looking for literature on RPG specific problems

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,

I'm starting a new RPG project, which is my first RPG (I've already developped smaller games), but before going too far in the development I need to take some time of reflection. The problematics in RPG-programming sound much more complicated than everything I've done before.

That's why I'm looking for good and modern literature about RPG programming, unfortunately it turns out to be quite hard to find reading on such specialized domains. I'm especially interested in:

- How to design a data-driven dialog system between AI
- How to design AI behaviors? Pros and cons between hard-coding and scripting ...
- How to design a powerful, flexible quest system
- Common pitfalls to avoid in these domains?

So any thought, any links to litterature would be greatly appreciated. Maybe I don't look to the right place, but I didn't find anything of interest in gamedev's articles, directly related to these subjects. I'd be surprised not to find any reference on that in 2013.

 

 

--------------

 

Now let's give some more information of my own project, if you're ok to read more - I've already started to implement some stuff, it's more like a draft than final code that I will use: it's still time to refactor, and I'm going to do some. It's all C++, with json data. See https://github.com/jotak/RPGProject/tree/reorg_dialogs . I've started to implement some AI behaviors, dialog system, etc. But I'm not sure if it will still fit well when the project grows up. It must be scalable. See in particular this folder : https://github.com/jotak/RPGProject/tree/reorg_dialogs/Sources/AI .

- AI class refers to an AI character.
- Each AI have some traits. There's a method that compute the attraction between AIs according to traits. Space is partitionned in order to limit the possible interactions between AIs (no need to compute interaction with someone 5 miles away)
- Each AI can have a "timetable", in json, which tells at some hour in the day what it's supposed to do.
- Each AI is doing an AIAction, which is either taken from its timetable, or dynamically attributed in code (for instance when I'm starving, I'll try to buy food and then eat).

I already can see some limitations induced by this system. Timetable are written in json. What happens if everyday at noon I go to lunch at the inn... then inn's keeper get killed, the inn closes... my timetable becomes invalid, I have to dynamically write a new one? Isn't LUA or such scripting language more adapted for this? Maybe the best way would be to create a json/LUA interface, if it doesn't already exist?

 

This is just a quick flavour among numerous questions I have on these subjects.
 

Many thanks.

Joel

Share this post


Link to post
Share on other sites
Advertisement


How to design a data-driven dialog system between AI

 

by this you mean something like a script driven system for conversations between npc's? 

 


- How to design AI behaviors? Pros and cons between hard-coding and scripting ...

 

an excellent question, i've always done hard coded myself.  anyone out there use scripts?   if so, why?      i have full source code access, low compile times (at least during the early stages when i do AI), and don't have non-coders to deal with, so i've never needed scripts.

 

 

 

 

 

 


- How to design a powerful, flexible quest system

 

this thread should help....

 

http://www.gamedev.net/topic/638940-types-of-quests/

 

i've done some serious quest and mission generators in the past. my games tend to use procedurally generated content, so i've had a lot of practice writing quest and mission generators.

 

 


- Common pitfalls to avoid in these domains?

 

uh.... predictability in scripted AI?  (too few scripts, or too simple, or both).      lack of responsiveness in scripted AI?   (when the game doesn't change scripts quickly enough in response to changes in the environment - such as letting the current script end before starting the new script that is the correct move at this point in time).

 

simplistic quest gens that lack variety.    my biggest quest gen ever had a politics engine that drove about a dozen different types of  campaign gens, which in turn drove perhaps two dozen types of mission gens, and a single mission gen could create thousands of different missions before you even got into number appearing and initial placement.  the game overall could generate some like 80,000 different missions.

Share this post


Link to post
Share on other sites


I already can see some limitations induced by this system. Timetable are written in json. What happens if everyday at noon I go to lunch at the inn... then inn's keeper get killed, the inn closes... my timetable becomes invalid, I have to dynamically write a new one?

 

stuff like that's easy to handle with code.

 

and that's another thing you must watch out for in writing quest gens, perhaps the most important.  

 

when writing quest gens, you must prevent by design, or check for and handle, everything that could possibly happen to make a quest un-doable. otherwise the player gets stuck.  this can get complicated.  the checks can easily double the size of the code that runs a given quest.

Share this post


Link to post
Share on other sites

 

How to design a data-driven dialog system between AI

 
by this you mean something like a script driven system for conversations between npc's?

 

 

Script or even just data (difference between script and data can become thin). Like what I've started to do, things like this :

[{
  text: "Hey %name%, show me what you can sell! I'm looking for %goodstype%",
  condState: [buying],
  responses: [{
    text: "First choice quality, take it!",
    condState: [have],
    responses: [{
      text: "Thanks, goodbye."
    }]
  },{
    text: "Sorry %name% but I don't have any, come on later.",
    condState: [dontHave]
  }]
}]

 

- How to design AI behaviors? Pros and cons between hard-coding and scripting ...

 
an excellent question, i've always done hard coded myself.  anyone out there use scripts?   if so, why?      i have full source code access, low compile times (at least during the early stages when i do AI), and don't have non-coders to deal with, so i've never needed scripts.

 

I read this yesterday : http://intrinsicalgorithm.com/IAonAI/2012/11/ai-architectures-a-culinary-guide-gdmag-article/

and found that the Sims-like approach, with an utility function that computes a score for each pair of Action+Character, would really fit my game well. At least I hope. And it allows some data-driven tuning if I explode the utility function, for each action, in parameters that are quantifiable.

 

For instance let's say I have an "Eating" action. Its utility function will be parameterized with a weight on AI's hunger. This weight can be an external data.

 

The counterpart is that this approach will give me less opportunity to script very special behaviors for particular characters.

 

 

 

- How to design a powerful, flexible quest system

 
this thread should help....
 
http://www.gamedev.net/topic/638940-types-of-quests/
 
i've done some serious quest and mission generators in the past. my games tend to use procedurally generated content, so i've had a lot of practice writing quest and mission generators.

 

Thanks, I'll read it soon!

 

 

 

I already can see some limitations induced by this system. Timetable are written in json. What happens if everyday at noon I go to lunch at the inn... then inn's keeper get killed, the inn closes... my timetable becomes invalid, I have to dynamically write a new one?

 
stuff like that's easy to handle with code.
 
and that's another thing you must watch out for in writing quest gens, perhaps the most important.  
 
when writing quest gens, you must prevent by design, or check for and handle, everything that could possibly happen to make a quest un-doable. otherwise the player gets stuck.  this can get complicated.  the checks can easily double the size of the code that runs a given quest.

 

Thanks for the tip. I think if on every quest "object" I keep a reference to the places / characters / objects involved, and with an "availability for quests" boolean attribute on each game object it looks like we can handle that in that way... (i guess)

Edited by jotak

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!