Archived

This topic is now archived and is closed to further replies.

sSimontis

RPG AI

Recommended Posts

Hi. Some friends and I are working on a 2D RPG. I have been made the programmer. I want to know what kind of AI I will be doing for a 2D RPG. I know a little FSMs, and that is about it. Any source code would help a lot. The only source code I could find was Dungeons of Moria 5.5, which is much too old to be considered. Scott Simontis e-mail:ageofscott@comcast.net AIM:ssimontis

Share this post


Link to post
Share on other sites
What kind of things do you need AI for, and what kind of ''cRPG'' is it? Does it have realtime combat as in say Baldurs Gate or one of the Link games, or does it have turn-based combat ala some Final Fantasy games? Do you need AI for navigation, combat, dialog selection, or something else entirely?

Share this post


Link to post
Share on other sites
That''s exactly the point. With AI, you solve things problem by problem... not genre by genre. Make a list of the things that your agents will need to do and then solve each one individually.

Dave Mark - President and Lead Designer
Intrinsic Algorithm -
"Reducing the world to mathematical equations!"

Share this post


Link to post
Share on other sites
quote:
Original post by sSimontis
Any source code would help a lot. The only source code I could find was Dungeons of Moria 5.5, which is much too old to be considered.



You might consider looking in Sourceforge for OpenSource RPGs. If you dont find anything there, then you''re probably fresh out of luck, as most people would generally not be prepared to give you the source code from their projects.

As the others have said, define exactly what sort of gameplay you want to experience and remember that your Game AI is responsible for deliver the dynamics of that gameplay. You''ll want to consult with whomever is designing the user interface, as this will have a big bearing on how the player interacts with characters in the world. For example, it''d be no good having your characters generate realistic discussions, if your player could not converse with them effectively!

For each aspect of gameplay, write down a description of the sorts of ways in which that aspect might play out. For example, a real-time combat scenario. PlayerA sees Enemy1 and Enemy2 at the top of the screen. Enemy1 draws her bow. Enemy2 charges toward PlayerA, drawing her sword. PlayerA clicks on spell_icon_5 and casts stun on Enemy2... and so on. You get the picture I hope. Now, for each of these things, you need to consider how you want the decisions to be made and the actions to be implemented.

Why did Enemy1 draw her bow? Why didn''t she draw her sword instead, as Enemy2 did? What will Enemy2 do if she notices PlayerA casting a spell while looking at her?

Write this ALL down. You should practically be able to play your game on paper, perhaps with a few dice for randomness, before you ever start coding your AI. Once this is done, THEN you can look at what AI technologies you need to solve specific problems... and yes, FSMs will most likely form the basis of your agents state transition definitions and action triggers.

Good luck,

Timkin

Share this post


Link to post
Share on other sites
I am making a Baldur''s Gate like game, so that should be more specific. I was thinking about a system of when player was within x yards of monster, the monster would come to life. I was also thinking of a system to make townspeople actually do stuff rather then just sit there.

Share this post


Link to post
Share on other sites
You might want to have a search for whatever became of the Roguelike site. It had articles on how to make townsfolk interesting (though there are lots of ways to do so if you don''t mind spending a few cycles on it).

Share this post


Link to post
Share on other sites