Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as...

58
Unreal Tournament Setting and Sample Code

Transcript of Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as...

Page 1: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Unreal Tournament Setting and Sample Code

Page 2: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

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

Page 3: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• NetBeans Installation Step 1/9 – http://www.netbeans.org/downloads/index.html

3 /57

Page 4: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• NetBeans Installation Step 2/9

4 /57

Page 5: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• NetBeans Installation Step 3/9

5 /57

Page 6: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• NetBeans Installation Step 4/9

6 /57

Page 7: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• NetBeans Installation Step 5/9

7 /57

Page 8: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• NetBeans Installation Step 6/9

8 /57

Page 9: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• NetBeans Installation Step 7/9

9 /57

Page 10: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• NetBeans Installation Step 8/9

10 /57

Page 11: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• NetBeans Installation Step 9/9

11 /57

Page 12: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• Pogamut2 Installation Step 1/7

12 /57

Page 13: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• Pogamut2 Installation Step 2/7

13 /57

Page 14: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• Pogamut2 Installation Step 3/7

14 /57

Page 15: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• Pogamut2 Installation Step 4/7

15 /57

Page 16: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• Pogamut2 Installation Step 5/7

16 /57

Page 17: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• Pogamut2 Installation Step 6/7

17 /57

Page 18: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• Pogamut2 Installation Step 7/7

18 /57

Page 19: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• Create Pogamut2 Project Step 1/2

19 /57

Page 20: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• Create Pogamut2 Project Step 2/2

20 /57

Page 21: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• Pogamut2 Trouble Shooting– Pogamut2 프로젝트를 생성할 수 없는 경우

21 /57

Page 22: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• Pogamut2 Trouble Shooting– NetBeans > Tools > Plugins

22 /57

Page 23: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• Pogamut2 Trouble Shooting

23 /57

Page 24: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• Pogamut2 Trouble Shooting

24 /57

Page 25: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• Pogamut2 Trouble Shooting

25 /57

Page 26: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Installation

• Pogamut2 Trouble Shooting

26 /57

Page 27: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

서버실행

• Pogamut2

27 /57

Page 28: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

서버세팅

• 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

Page 29: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

프로젝트 생성

29 /57

Page 30: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

프로젝트 생성

30 /57

Page 31: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

프로젝트 생성

31 /57

Page 32: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

서버 접속

32 /57

Page 33: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

서버접속

33 /57

Page 34: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

봇 동작 확인

34 /57

Page 35: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

봇 동작 확인

35 /57

Page 36: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

봇 동작 확인

36 /57

Page 37: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

봇 동작 확인

37 /57

Page 38: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Class Architecture

38 /57

Page 39: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

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

Page 40: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

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

Page 41: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

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

Page 42: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

• 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

Page 43: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

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

Page 44: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Code Flow

44 /24

prePrepareAgent()

postPrepareAgent()

doLogic()

shutdownAgent()

Page 45: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Sample Code

Better…

… but what to do if the bot is facing the wall from the beginning ?

45 /57

Page 46: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Sample Code

Better…

… what if the bot lose the player?

46 /57

Page 47: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

1 인칭 시점

47 /57

Page 48: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

3 인칭 시점

48 /57

Page 49: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

노드와 링크

49 /57

Page 50: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

IDE Interface

50 /57

Page 51: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Sample Code 2

51 /57

Page 52: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Sample Code 2

52 /57

Page 53: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Sample Code 2

53 /57

Page 54: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

54 /57

Page 55: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Quiz

• http://www.botprize.org/quiz.html

55 /57

Page 56: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

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

Page 57: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

2008 BotPrize contest

57 /57

Page 58: Unreal Tournament Setting and Sample Code. Architecture Unreal Tournament –Commercial game used as a virtual world Parser –Translates text message from.

Question