On Wed, 30 Jul 2008 17:25:18 +0100, "Hugo Arts" <[EMAIL PROTECTED]> wrote: > I think a dialog system qualifies as neither AI nor generalisable. What > about customising dialog based on the main characters attributes, or > perhaps > NPC's speaking amongst eachother (with a player eavsedropping). What about > game devs that like the final fantasy/zelda style of dialog more than the > Elder Scrolls one? Maybe NPCs should say different things at different > times. > And we're not even getting into graphical presentation. It's a very > game-specific thing. > > What you're proposing are all things that belong in a game engine more > than > in a lib like pygame.
I was working with the assumption of this stuff being for a module outside of Pygame. Re: replaceable functions within A*, this makes sense. For instance, the way I did A* when I tried it assumed only orthogonal moves. Adding diagonal moves or even 3D motion would, I think, just mean replacing the code that decides what nodes count as "neighbors" from a given node. Changing the cost-calculation functions would let you add considerations like whether a node is considered enemy territory, hence more costly than usual for its terrain. Re: a dialog system, you don't really _need_ help to do a Zelda/FF style of conversation. You can just, say, have a dictionary of NPC indices/names, each linked to a string or a list of strings that get chosen from randomly or when a global "plot" variable reaches some level. With a "Morrowind" system you can get different responses at different times (just make time/plot/quest status one of the variables), or based on player attributes (same method), but you can't have NPCs converse. The sequel did that, but I don't know how. Basically I'd like to see RPG characters be at least slightly less moronic in 2008 then they were in the original "Final Fantasy" (most console RPGs aren't even trying) and a system like this one would be a fairly easy way to do that even in a homemade game. As for graphical presentation, that's no problem; the code would only provide text output, leaving the rest of the game to decide how to present it. What do you think of a not-just-dialog, yet simple, AI system suitable for RPGs? Something that lets you offer a few kinds of interaction like starting a shop screen, asking them to join you, or asking about some topic? As with the pathfinding thing, part of the trouble would be with making it generic enough to work with the various forms of movement &c that people would use. Re: speech synthesis, that's not so farfetched. Look up "PyFlite," which implements a Carnegie Mellon speech-synth system called Festival; specificially a simplified version called Flite. PyFlite is very easy to start using, but it offers only one voice in that implementation. I've not played with it enough to see if there's a way to get more voices for it, or the ability to add simple <i>emphasis</i> or other cues like that. It might be useful if there were at least half a dozen deadpan voices instead of one.