1 Interactive AI CIS 487/587 Bruce R. Maxim UM-Dearborn.

Slides:



Advertisements
Similar presentations
Chapter 6 Server-side Programming: Java Servlets
Advertisements

The creation of "Yaolan.com" A Site for Pre-natal and Parenting Education in Chinese by James Caldwell DAE Interactive Marketing a Web Connection Company.
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
1 of 2 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
* 1 Common Dialog Control. * 2 You want your user to set property or provide your application with some information easily? How do you do it? The Common.
Royalty Free Music for Schools Do You Have the To Do a Podcast?
DEVELOPING ICT SKILLS PART -TWO
The Librarian Web Page Carol Wolf CS396X. Create new controller  To create a new controller that can manage more than just books, type ruby script/generate.
Computer Science & Engineering 2111 Text Functions 1CSE 2111 Lecture-Text Functions.
PHP (2) – Functions, Arrays, Databases, and sessions.
3D Game Programming All in One By Kenneth C. Finney.
The Internet. Telnet Telnet means using your computer as a terminal. All commands you type are sent to the host computer you are connected to and executed.
3D Game Programming All in One By Kenneth C. Finney.
What is AML? What is a program? What is AML? An AML can: –Automate frequently performed actions –Provide a quick and consistent way to set environments.
1 of 6 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation. All.
8/6/2015Auto Attendants 1 Smarter Communications.
2) OVERVIEW High-definition Screencast (record video and publish immediately to YouTube, social media or as MP4s) HTML5 Publishing (output compatible.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
Copyright 2007, Information Builders. Slide 1 Maintain & JavaScript: Two Great Tools that Work Great Together Mark Derwin and Mark Rawls Information Builders.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Bookstore Web Application Introducing Visual Web Developer 2008 Express and the.
INTRODUCTION TO DREAMWEAVER 8. What we already know…  Design basics  Contrast  Repetition  Alignment  Repetition  HTML.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 4 – Creating New.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 22 Macros.
Developing Workflows with SharePoint Designer David Coe Application Development Consultant Microsoft Corporation.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
| | Tel: | | Computer Training & Personal Development Outlook Express Complete.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
Chapter Four UNIX File Processing. 2 Lesson A Extracting Information from Files.
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
Introduction to Matlab & Data Analysis
111 EMC CONFIDENTIAL—INTERNAL USE ONLY NMC -- NW Administration NMC Team NetWorker 7.3 TOI July 28, 2005.
10/9/20151 Unreal Basics CIS 488/588 Bruce R. Maxim UM-Dearborn.
Lecture # 6 Forms, Widgets and Event Handling. Today Questions: From notes/reading/life? Share Personal Web Page (if not too personal) 1.Introduce: How.
Lecture 8 – Cookies & Sessions SFDV3011 – Advanced Web Development 1.
 Whether using paper forms or forms on the web, forms are used for gathering information. User enter information into designated areas, or fields. Forms.
UFCFS D Technologies for the Web Unity 3D: Review of Topics and Related Concepts.
Microsoft Office Outlook 2013 Microsoft Office Outlook 2013 Courseware # 3252 Lesson 6: Organizing Information.
ITCS373: Internet Technology Lecture 5: More HTML.
Variables and ConstantstMyn1 Variables and Constants PHP stands for: ”PHP: Hypertext Preprocessor”, and it is a server-side programming language. Special.
GTR Data Inc. Welcome to our EDI Demonstration G.T.R. Data Inc. August 1997.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Introduction to Enterprise Guide Jennifer Schmidt Rhonda Ellis Cassandra Hall.
ResponseCard XR Answering Questions. Polling The host computer must be able to receive your responses, but it can only do so when the polling is open.
IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator.
XP Tutorial 8 Adding Interactivity with ActionScript.
UFCEK-20-3Web Games Programming Unity 3D: Review of Topics Publishing for the Web.
1 School Information Systems SISFin and P-Card. 2 Benefits of P-Card P-Card is a credit card and can be used with any merchant who accepts them. Purchases.
Innovation Intelligence ® 1 Chapter 4: Using TCL to Control the HyperMesh Session.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
STEP BY STEP INSTALLATION By Eng. BASSEM ALSAID. Step 1: Boot from windows server 2008 installation DVD, windows will load needed files for starting installation.
Python Let’s get started!.
PestPac Software. Leads The Leads Module allows you to track all of your pending sales for your company from the first contact to the close. By the end.
Chapter 9 Quick Links Slide 2 Performance Objectives Understanding Forms Planning Forms Creating Forms Creating Text Fields Creating Hidden Fields Creating.
Digital Literacy: Computer Basics
MUSIC GENRE JUKEBOX. CLIENT SPECIFICATIONS Audio Player Create, delete, and modify play lists Play, pause, stop, skip, fast forward, and rewind Send Streaming.
: Information Retrieval อาจารย์ ธีภากรณ์ นฤมาณนลิณี
Change margins. 1 Preview a document. 2 Change paper size and orientation. 3 Print envelopes and labels. 4 Choose print options. 5 2.
Day 22, Slide 1 CSE 103 Day 22 Non-students: Please logout by 10:12. Students:
Lesson 17 Mail Merge. Overview Create a main document. Create a data source. Insert merge fields into a main document. Perform a mail merge. Use data.
COM621: Advanced Interactive Web Development Lecture 10 PHP and MySQL.
Advanced HTML Tags:.
Introduction to Dynamic Web Programming
DBW - PHP DBW2017.
CIS 487/587 Bruce R. Maxim UM-Dearborn
Lecture 5: Functions and Parameters
Presentation transcript:

1 Interactive AI CIS 487/587 Bruce R. Maxim UM-Dearborn

2 Slides based on the Code from Advanced 3D Game Programming by Kenneth Finney

3 GUI Specification Configurable to be key-based or automatic Player menu for queries or responses AI can respond to all player inputs AI can act on all player inputs Means to display AI character portrait AI turns to face player Should not activate if NPC is not AI player Use flat text files for query and response tables

4 Archtitecture ATI Queries ATI Actions GUI ATI GUI Management Code AIT Server Management Code Torque Client Torque Server

5 Preparation - 1 Add the following lines of code to the end of demo\client\defaults.cs to create global variables used by several modules $pref::AIT::DataPath = "demo/data/AIT/"; $pref::AIT::MaxOptions = 100; $pref::AIT::QueryColour = "\c1"; $pref::AIT::ActionColour = "\c5";

6 Preparation - 2 Add the following lines of code to the end of demo\client\scripts\default.bind.cs function TalkTo(%val) { if (%val) commandToServer('AITCOntact'); }

7 Preparation - 3 Add the following lines of code to the end of demo\client\scripts\default.bind.cs // Binds letter q to the make contact function TalkTo // and reserves the numeral keys for use in the GUI moveMap.bind(keyboard, q, TalkTo); moveMap.bindCmd(keyboard, "1", "SelectAnswer(1);", ""); … moveMap.bindCmd(keyboard, "8", "SelectAnswer(8);", ""); moveMap.bindCmd(keyboard, "9", "SelectAnswer(9);", ""); moveMap.bindCmd(keyboard, "0", "SelectAnswer(10);", "");

8 Preparation - 4 Add the following lines of code to the end of demo\client\scripts\default.bind.cs // Gives the numeral keys their default meanings when not // in AIT query dialog function OutOfAITFunction(%NUmber) { switch(%NUmber) { case 1: commandToServer('use',"Crossbow"); case 2: %Number = 0; … case 9: %Number = 0; case 0: %Number = 0; }

9 Preparation - 5 Add the following line of code to the end of demo\server\defaults.cs $Pref::Server::AITPath = "demo/data/AIT/" Add the following lines of code to the function onServerCreated after the line exec(“./crossbow”); demo\server\scripts\game.cs exec("./AITServer.cs"); exec("./AITCommands.cs");

10 Preparation - 6 Add the following line of code to the end of demo\client\init.cs to the function initClient exec("./ui/AITGui.gui"); after the line exec("./ui/PlayerList.gui"); and the line exec("./scripts/AITClient.cs"); after the line exec("./scripts/centerPrint.cs");

11 Preparation - 7 Always delete the following files after making changes to preferences and defaults (Torque creates them dynamically when the engine exits) demo\client\config.cs demo\client\config.cs.dso demo\client\prefs.cs demo\client\prefs.cs.dso demo\server\prefs.cs demo\server\prefs.cs.dso

12 AITServer - 1 Add the code from the file AITServer.cs to the directory demo\server\scripts The functions GetActionEntry and Get Action extract the response actions from the response table file AITMessageClient sends information to the AIClient code for the NPC talking to the player

13 AITServer - 2 Function serverCmdAITAnswer sends a message to the server and waits for is answer (encoded as an index to the action table) Function serverCmdAITContact begins the dialog when player presses the q key when within range of the NPC (will either respond with the action script or a busy message) Function AITBusy makes sure the NPC is busy doing something other the talking

14 AITServer - 3 Function CheckAITStatus checks to see whether the player has wandered out of range of the NPC or it needs to check for another query The AIT-system-aware AI is spawned into the game using SpawnAI (like we did in AIGuard) The fuction TestAIT is a test function containing several preset values to artwork and scripts

15 AITClient Module - 1 The file AITClient.cs needs to be copied into the directory demo\client\scripts The functions GetActionEntry and GetAction are the same as those on the server side Function clientCmdCloseAIT shuts down the AIT GUI when ordered to by the server Function clientCmdAITMessage posts the info pased by the server on the GUI

16 AITClient Module - 2 Function OnAITMessage –locates the bitmap used the the character mugshot and the AITScript file –locates the response and any audio by looking through the query table –Assembles and answer and formats it for the GUI The method AITAnswer::OnURL directs queries to AITQuery::OnURL which assembles the info from the query

17 AITClient Module - 3 Function PlayAITSound plays the sound if it can find the specified.wav file Function SelectAnswer is the function we used in the key bindings, it either selects an answer from the GUI or returns the numeric key to its original purpose

18 AITCommands Module Copy the code in the file AITCommands.cs to the directory demo\server\scripts The functions behave pretty much like theit names imply

19 AITGui Module Copy the file AITGui.gui to the directory demo\client\ui The formatting and syntax is important or the GUI will not compile

20 AITScript Files These are specially formatted files that look are lot like html The.qry files contain the indexed query tables and the.rsp files contain the indexed response files The required files elf.qry, elf.rsp, orc.qry, orc.rsp are housed in the directory demo\data\AIT with the other AIT art assets

21 AIT Resources The AIT art and sound assets are store in the directory demo\data\AIT

22 Testing the AIT System Once you are inside the FPS demo, open the console and type testAIT(); Your task now is to find the NPC chat palyer without getting killed by the AIGuards Once you find the NPQ type q and then use the menus (the NPC will kill you if you ask it to do so)