View
247
Download
3
Tags:
Embed Size (px)
Citation preview
Agenda
• History
• Types of RPGs
• AI in RPGs
• Common AI elements
• AI techniques
• RPG Making tool: RPG Maker XP
• RPG AI Improvement
What is AI?
• Artificial Intelligence– “the science and engineering of making intelligent
machines”– Refer to intelligence as exhibited by an artificial (man-
made, non-natural, manufactured) entity• Research in AI is concerned with producing
machines to automate tasks requiring intelligent behavior.
• Examples include control, planning and scheduling, the ability to answer diagnostic and consumer questions, handwriting, natural language, speech and facial recognition.
What is RPG?
• A role-playing game (RPG, often roleplaying game) is a type of game in which the participants assume the roles of fictional characters and collaboratively create or follow stories.
• Example: – Final Fantasy, Diablo, The Elder Scrolls IV,
etc.
History
• Text based RPGs– Computer RPGs
• The first commercially available role-playing game: Dungeons & Dragons
• AI: controlled the enemy final attack decision
• Graphical RPGs– Console RPGs
• Real-time combat based because more action-oriented input controllers
Action RPG
• An action role-playing game or Action RPG is a type of computer and console role-playing game which requires quick action or reflexes from the player. So-called "Diablo clones" are also part of this genre.
– Ex. Diablo, Dungeon Siege, etc.
Turn-based RPG
http://www.mobygames.com/game/windows/final-fantasy-vii/screenshots/gameShotId,11754/
MMORPG
• MMORPG– Massively Multiplayer Online Role-Playing Game
(MMORPG) is a genre of online computer role-playing games (RPGs) in which a large number of players interact with one another in a virtual world.
– distinguished from single-player or small multi-player RPGs
• number of players• game's persistent world
– Ex. Neverwinter Nights, World of Warcraft
AI in RPGs
• RPGs are fairly AI intensive– Varying types of gameplay
• Puzzles, combat, crafting, types of travel etc.
– Many hours of game experience• ~20-40 hours of gameplay for home computer• ~40 hours of gameplay for Console
Common AI elements
• Enemies• An almost endless supply for the player• Provide level points, money, items
– Behavior patterns• Statistical AI (monsters’ database)• Complex behavior patterns
– Running away– Healing themselves– Fighting in groups
Common AI elements
• Bosses• Monster leaders• Increased life point, skill, power, brain• Bosses are usually heavily scripted• The AI needs to include use of the dialogue
system for the game
Common AI elements
• Nonplayer Characters (NPCs)• Computer player in the game that the human
player can interact with in ways other than combat• Provide information or story advancement
– Grammar systems
• Not very intelligent
Common AI elements
• Shopkeepers• Special NPCs who do business with the player• Have extended interfaces• Have a notion about the player attitude that affects
the shopkeepers dialogue, prices, and items.
Common AI elements
• Party Members• Members of the player’s adventuring party (special
NPCs)• Simple AI on Party members but allow the player
to customize the scripting system• Use pathfinding in real time combat
AI techniques
• Scripting– Computer programming languages that are ty
pically interpreted and can be typed directly from a keyboard.
– Common technique to improve the AI system without hiring more programmers
• Programs are converted permanently into binary executable files
• Scripts remain in their original form and are interpreted command-by-command each time they are run.
AI techniques
• Scripting– Most RPGs are linear (objectives of the game
must be completed in a fixed sequence) or at most branching linear
– In game,• Dialogue Flow• Stage Direction• Game event flags• NPC behavior• AI Logic
AI techniques
• ScriptingPros:
• Save time and increase productivity• Increase creativity• Provide extensibility
Cons:• Require scripting learning time• Scripted code slower than binary
ScriptingIF//If my nearest enemy is not within 3!Range(NearestEnemyOf(Myself),3)//and is within 8Range(NearestEnemyOf(Myself),8)
THEN// 1/3 of the timeRESPONSE #40//Equip my best melee weaponEquipMostDamagingMelee() //and attack my nearest enemy, checking every 60 ticks to make sure he is still the nearestAttackReevaluate(NearestEnemyOf(Myself),60)
// 2/3 of the timeRESPONSE #80//Equip a ranged weaponEquipRanged() //and attack my nearest enemy, checking every 30 ticks to make sure he is still the nearestAttackReevaluate(NearestEnemyOf(Myself),30)
END
/* Sample Warrior AI User Defined Script from Baldur’s Gate (AI Game Engine Programming) */
AI techniques
• Finite-State Machine (FSMs)– Split the game into explicit states
http://www.programmingbasics.org/en/fsm.html
AI techniques
• Messaging– Messaging system – Parse information between party members,
facilitate group combat or dialogue
RPG Maker XP
• RPG game making tool
• XP version includes Scripting function Ruby Game Scripting System (RGSS)
http://www.enterbrain.co.jp/tkool/RPG_XP/eng/
RPG’s AI Improvement
• AI Storyteller– A series of events with multiple variables, and
a "pacing manager" that ensures the story remains interesting throughout the game.
• Create dynamic game story to satisfy the player
Ex. Dramatic story, happy ending, etc.
RPG’s AI Improvement
• Fully Realized Towns– Breathing town would make the game world
much more interesting and immersive
RPG’s AI Improvement
• Human-like NPCs (NPCs with memory)– More intelligent NPCs reacting with the
situations in RPG world– Have daily routines (life cycle)– Use need-base system with need pathfinding
– Ex. Zelda, Utima V, Obivion, etc.
RPG’s AI Improvement
• Enemies with better combat tactics• Baiting the player• “Stepping-stone” pathfinding• Fighting in groups
RPG’s AI Improvement
• Role-playing Does Not Equal Combat– Creating content or quests doesn’t involve
killing for nonlethal classes
Ex.
Harvest Moon: – to plant seeds to grow fruits and vegetables in
different seasons– to balance the character physical resources
RPG’s AI Improvement
• Grammar Machines (GMs)– Better conversation engines– Dynamic NPCs text responding– Utilize speech recognition software– Allow the user to really ask questions
Ex.– Utima: keyword system
RPG’s AI Improvement
• Quest Generators– More varied and long lasting gameplay
situation– Generate quests according to the players
interest– Use ad-lib system to generate unique quests
or add new content
RPG’s AI Improvement
• Better Party Member AI– The character can keep track of the often
player actions when fighting and using items– Learning by imitation– Party members script editor