unreal tournament setting and sample code. architecture unreal tournament –commercial game used as...
Post on 17-Jan-2016
227 Views
Preview:
TRANSCRIPT
Unreal Tournament Setting and Sample Code
Architecture
• Unreal Tournament– Commercial game used as a virtual world
• Parser– Translates text message from the GB04 to java objects
• Agent – Here goes the user logic
• IDE– Plug-in Netbeans development environment
2 /57
Installation
• NetBeans Installation Step 1/9 – http://www.netbeans.org/downloads/index.html
3 /57
Installation
• NetBeans Installation Step 2/9
4 /57
Installation
• NetBeans Installation Step 3/9
5 /57
Installation
• NetBeans Installation Step 4/9
6 /57
Installation
• NetBeans Installation Step 5/9
7 /57
Installation
• NetBeans Installation Step 6/9
8 /57
Installation
• NetBeans Installation Step 7/9
9 /57
Installation
• NetBeans Installation Step 8/9
10 /57
Installation
• NetBeans Installation Step 9/9
11 /57
Installation
• Pogamut2 Installation Step 1/7
12 /57
Installation
• Pogamut2 Installation Step 2/7
13 /57
Installation
• Pogamut2 Installation Step 3/7
14 /57
Installation
• Pogamut2 Installation Step 4/7
15 /57
Installation
• Pogamut2 Installation Step 5/7
16 /57
Installation
• Pogamut2 Installation Step 6/7
17 /57
Installation
• Pogamut2 Installation Step 7/7
18 /57
Installation
• Create Pogamut2 Project Step 1/2
19 /57
Installation
• Create Pogamut2 Project Step 2/2
20 /57
Installation
• Pogamut2 Trouble Shooting– Pogamut2 프로젝트를 생성할 수 없는 경우
21 /57
Installation
• Pogamut2 Trouble Shooting– NetBeans > Tools > Plugins
22 /57
Installation
• Pogamut2 Trouble Shooting
23 /57
Installation
• Pogamut2 Trouble Shooting
24 /57
Installation
• Pogamut2 Trouble Shooting
25 /57
Installation
• Pogamut2 Trouble Shooting
26 /57
서버실행
• Pogamut2
27 /57
서버세팅
• MapName– Name of the map you want to run. It's the same as name
of the map file, without the .ut2 suffix. You can see all the map files in UT2004/Maps/ directory
• Game Type– BotDeathMatch
BotTeamGameBotCTFGameBotDoubleDomGameBotBombingRunGame
28 /57
프로젝트 생성
29 /57
프로젝트 생성
30 /57
프로젝트 생성
31 /57
서버 접속
32 /57
서버접속
33 /57
봇 동작 확인
34 /57
봇 동작 확인
35 /57
봇 동작 확인
36 /57
봇 동작 확인
37 /57
Class Architecture
38 /57
Main Class
• Body– Bridge between client itself and Unreal Tournament 2004– Method for agent control
• Memory– Contain History, which is the storage of all sensory data
coming from Body– Implement interface WorldView, RecentMemory, Knowl-
edge and Invertory• Inventory
– Basically an array of weapon• Game map
– Module for navigation– Built-in A* algorithm– Provide method for obtaining path to desired location
39 /57
Body
• MoveTo(Location) – simple RUNTO command, input anything that implements
ILocated or is location. • Stop() <SC>
– stops the bot immediately • TurnHorizontal(amount)
– roll is not used for bots. • TurnVertical(amount) • TurnTo(Location)
– target can be again object or location... • Jump() <SC> • Run() –
– disables walking • Walk()
– enables walking
40 /57
Navigation
• safeRunToLocation() • GetPath(Target) - target can be location or Ilocated. • RunAlongPath(Id of path) • RunAlongList(list of Ilocated objects)
– will request paths and do everything automaticaly • ReachCheck(Target) - anything Ilocated. • GetPath() • RunAlongListOfILocated(List) • nearestWeapon(type) • nearestXY()
41 /57
• Shoot() • StopShoot() • ChangeWeapon() • StopShoot()<SC>
– stops shooting• Shoot(Target, Mode, Time)
– how long we should be shooting • ShootCharged(Target,Mode)
– for charging weapons• ChangeWeapon(Weapon)<SC>
– Weapon in inventory with correct inventoryId • ChangeWeaponToBest()<SC>
– issues UnrealScript command
42 /57
Memory
• WorldView– Information about what agent currently sees– Internal status
• Current health, weapon, ammo, visible navigation point, enemies
• RecentMemory– A bit older information
• Knowledge– Persistent knowledge about the map
43 /57
Code Flow
44 /24
prePrepareAgent()
postPrepareAgent()
doLogic()
shutdownAgent()
Sample Code
Better…
… but what to do if the bot is facing the wall from the beginning ?
45 /57
Sample Code
Better…
… what if the bot lose the player?
46 /57
1 인칭 시점
47 /57
3 인칭 시점
48 /57
노드와 링크
49 /57
IDE Interface
50 /57
Sample Code 2
51 /57
Sample Code 2
52 /57
Sample Code 2
53 /57
54 /57
Quiz
• http://www.botprize.org/quiz.html
55 /57
2008 BotPrize contest
• The Judging Panel– David Fogel - President of IEEE Computational Intelli-
gence Society – Robert (RJ) Spencer - COO of Interzone Entertainment – Penny Sweetser - senior game designer at 2K Australia
and an AI expert – Cam Atkinson - a l33t game player – John Wiese - senior project manager in Special Opera-
tions Command Support Systems at Thales Australia • Human
– Andrew Smith – Roderick Baker – Byron Pogson – Keith Johnson– Seb Davidson
56 /57
2008 BotPrize contest
57 /57
Question
top related