Programming Unreal Tournament Joe Manojlovich University of Pittsburgh School of Information Sciences.

Slides:



Advertisements
Similar presentations
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
Advertisements

11 Getting Started with ASP.NET Beginning ASP.NET 4.0 in C# 2010 Chapters 5 and 6.
Yingcai Xiao Game Development Intro to Unreal Engine.
Lab#1 (14/3/1431h) Introduction To java programming cs425
Chapter 9 Imperative and object-oriented languages 1.
Introduction to a Programming Environment
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Unity 3D game IDE 1.  Unity is a multi-platform, integrated IDE for scripting games, and working with 3D virtual worlds  Including:  Game engine ▪
Lecture 1: Overview of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++ Designed.
Microsoft ® Office Word 2007 Training Mail Merge II: Use the Ribbon and perform a complex mail merge [Your company name] presents:
Other Features Index and table of contents Macros and VBA.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
What is RobotC?!?! Team 2425 Hydra. Overview What is RobotC What is RobotC used for What you need to program a robot How a robot program works Framework.
1 ENG236: ENG236: C++ Programming Environment (2) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
Week 4-5 Java Programming. Loops What is a loop? Loop is code that repeats itself a certain number of times There are two types of loops: For loop Used.
A First Program Using C#
CS140: Intro to CS An Overview of Programming in C by Erin Chambers.
AIT 616 Fall 2002 PHP. AIT 616 Fall 2002 PHP  Special scripting language used to dynamically generate web documents  Open source – Free!!!  Performs.
General Computer Science for Engineers CISC 106 Lecture 02 Dr. John Cavazos Computer and Information Sciences 09/03/2010.
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
© The McGraw-Hill Companies, 2006 Chapter 4 Implementing methods.
DEPARTMENT OF COMPUTER SCIENCE & TECHNOLOGY FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UWA WELLASSA 1 CST 221 OBJECT ORIENTED PROGRAMMING(OOP) ( 2 CREDITS.
Why Java? A brief introduction to Java and its features Prepared by Mithat Konar.
2010 Fall SNUCSE Computer Game, Case Study Jung-Dam, Won.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
Programming in Java Unit 2. Class and variable declaration A class is best thought of as a template from which objects are created. You can create many.
10/9/20151 Unreal Basics CIS 488/588 Bruce R. Maxim UM-Dearborn.
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
CSCI-383 Object-Oriented Programming & Design Lecture 13.
Java Programming, Second Edition Chapter One Creating Your First Java Program.
How to Create a Videogame By: Connor McCann. Java Java is one of many programming languages Java is used to run web browsers and most PC video games I.
Basics of Java IMPORTANT: Read Chap 1-6 of How to think like a… Lecture 3.
GAME 1024: Advanced Game Programming Lesson 1: The Beginning By Kain Shin.
5 BASIC CONCEPTS OF ANY PROGRAMMING LANGUAGE Let’s get started …
Variables and Functions. Open your Encoder program Let’s begin by opening the “Labyrinth Auto Straight” code. Save this file as Labyrinth with variables.
Java 5 Part 1 CSE301 University of Sunderland Harry Erwin, PhD.
Term 2, 2011 Week 1. CONTENTS Problem-solving methodology Programming and scripting languages – Programming languages Programming languages – Scripting.
AI and Game Programming Unreal Tournament Project.
Java server pages. A JSP file basically contains HTML, but with embedded JSP tags with snippets of Java code inside them. A JSP file basically contains.
Sanjay Johal. Introduction(1.1) In this PowerPoint I will be explaining :  The purpose of the code for each of the two given programs, e.g. to carry.
Yingcai Xiao Game Development Intro to Unreal Engine.
Chapter 3 Syntax, Errors, and Debugging Fundamentals of Java.
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Fall 2002CS 150: Intro. to Computing1 Streams and File I/O (That is, Input/Output) OR How you read data from files and write data to files.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
M1G Introduction to Programming 2 5. Completing the program.
Application development with Java Lecture 21. Inheritance Subclasses Overriding Object class.
Sega 500 Scripted events and Sequences Jeff “Ezeikeil” Giles
1) PHP – Personal Home Page Scripting Language 2) JavaScript.
Classes, Interfaces and Packages
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 2: Introduction to IS2803 Rob Gleasure
CSCI 156: Lab 11 Paging. Our Simple Architecture Logical memory space for a process consists of 16 pages of 4k bytes each. Your program thinks it has.
Network Replication Possibly the ugliest thing to learn this semester Many different states Simulated Functions Is it an Event or function? Roles.
Object orientation and Packaging in Java Object Orientation and Packaging Introduction: After completing this chapter, you will be able to identify.
Notices Assn 2 is due tomorrow, 7pm. Moodle quiz next week – written in the lab as before. Everything up to and including today’s lecture: Big Topics are.
Quiz 1 A sample quiz 1 is linked to the grading page on the course web site. Everything up to and including this Friday’s lecture except that conditionals.
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
Information and Computer Sciences University of Hawaii, Manoa
Internet and Java Foundations, Programming and Practice
Engineering Innovation Center
Lecturer: Mukhtar Mohamed Ali “Hakaale”
Introduction to Python
Unreal Engine and C++ We’re finally at a point where we can start working in C++ with Unreal Engine To get everything set up for this properly, we’re going.
Java Programming Language
Game Development Intro to Unreal Engine
CIS 488/588 Bruce R. Maxim UM-Dearborn
General Computer Science for Engineers CISC 106 Lecture 03
Presentation transcript:

Programming Unreal Tournament Joe Manojlovich University of Pittsburgh School of Information Sciences

Points of Contact Usability Study Lab, 2 nd floor, Information Sciences Building Meetings every Tuesday, Thursday 3pm to 7pm (all are welcome) (Unofficial) Pittsburgh Unreal Research Group –There is a surprisingly large amount of UT hacking for research purposes going on in the Pittsburgh area University of Pittsburgh (several schools) Carnegie Mellon University (several schools)

What is Unreal Tournament? UT is a multiplayer video game Produced by Epic games ( Runs on Windows, Linux, Macintosh, PlayStation, and soon Xbox

Old/Current Versions of Unreal Unreal I –The original Unreal game –Single player –Obsolete and unsold now (?) Unreal Tournament –Multiplayer Unreal game –Obsolete and unsold as of a month or 2 ago

New Versions of Unreal Unreal 2 –Single player –Due 2003 Unreal Tournament 2003 –Multiplayer –Due summer 2002 (any day now…) Unreal Forever –Xbox –Due 2003

Why Program UT? By using UT as a basis for other research, you can avoid needless reinventing while benefiting from a proven development platform UT is designed for programming, and many tools and resources are available to assist you

Research Being Done with UT Gamebots –This is a modification to UT that allows one to control UT bots remotely over a standard network connection ( CaveUT –This project uses multiple UT clients to create el-cheapo 3D visualization ( Many others…

How to Program Unreal Tournament UnrealScript –Source code level Level Programming –Graphics level Scenes People Weapons

UT Source Code Since UT is based on a virtual machine model like Java, most of the game is actually written in UnrealScript You can read the source code to most of the game, except the low level graphics rendering components and a few other bits UnrealEd will let you browse and edit the game source code Also available online:

Common Terms Bots – Players in game under human or AI control Level – self-contained environment containing bots and their surroundings Maps – a level, without the bots Game – a level, with active bots, running on a UT server

Types of Games DeathMatch Free for all TeamGame Team free for all Domination Control of level points Assault Task-oriented Capture the Flag Goal of returning enemy flag to home base

The Unreal Virtual Machine UT is divided up into several components: –Server –Client –Rendering engine –Engine support code

The Unreal Virtual Machine Game Type Game Code OpenGL, DirectX, etc. Level Actor(s) EngineNetwork Client(s) Death Match DM-Tutorial Tournament Male Underlying Hardware/Operating System

Unreal Network Architecture Client UT is a client/server based game Server Client Currently supports 32 players on a server This may increase with the new version of UT

Java/C++ vs. UT If you have some knowledge of any object- oriented language, then learning UnrealScript itself is easy UnrealScript is much simpler than “real” object-oriented languages which are burdened with complex features unnecessary for game development

Object-Oriented Programming Objects –Function code and data combined in one unit Classes –Templates for production of objects Inheritance –Classes arranged in a hierarchy, where children classes start with properties of its parents

Inheritance Animal Reproduces Consumes Bird Has Wings Flies Fish Has Fins Swims Gills to Breath Robin Small Red Chest Ostrich Large Doesn’t Fly Great White Large Goldfish Small

Class Structure in UT Objects/Actors Pawns Info

Object/Actor Classes Object is the basic superclass for every Unreal class Actor class, subclass of Object, defines basic game functionality –Players –Weapons –AI –Most of the UT game itself

Pawn Class Subclass of Actor Defines the living entities of a level PlayerPawn, a subclass of Pawn, is used for all players in the game ScriptedPawn, another subclass of Pawn, is used to drive the built-in game players

Info Class Info classes maintain game data GameInfo manages game related information ZoneInfo handles the composition of spaces in levels, such as water, lava, etc. PlayerReplicationInfo is used for network games, to minimize network traffic between Unreal clients and the server

UnrealScript Syntax UnrealScript is a full programming language solely used for the Unreal series of video games Most of its syntax is very similar to other high-level programming languages such as Java or C++

Variables byte: A single-byte value ranging from 0 to 255. int: A 32-bit integer value bool: A boolean value: either "true" or "false" float: A 32-bit floating point number string: A string of characters name: The name of an item in Unreal (such as the name of a function, state, class, etc)

Variables (cont.) Enumeration: A variable that can take on one of several predefined name values Object and actor references: A variable that refers to another object or actor in the world Structs: Similar to C structures, UnrealScript structs let you create new variable types that contain sub-variables

Variables (cont.) To declare a variable: var int a; var byte Table[64]; var string[32] PlayerName; var actor Other;

Language Constructs UT supports all the standard loops, like those in Java or C++ –If –For –While –Do-While

UnrealScript States States are unique to game programming languages like UnrealScript Allow one to define functionality based time and state of a bot For example, a bot could have a “Running” state that will cause the bot to flip while jumping, but only while running, and not while standing still or walking

An Example State auto state Idle { Begin: log( "I am idle!" ); sleep( 10 ); goto 'Begin'; }

An Example State (cont.) All this state does is override a built-in inherited state that is active when a bot isn’t doing anything, i.e., idle Every 10 seconds of idle time, this code will print to the log “I am idle!”

Modifications Mutators –Used to make slight changes to the game –Subclass parts of the game, and redefine game code –Can be mixed with other mutators at run-time Gametypes –Used to change large parts of the game –Cannot combine with other gametypes

Using the Command Line Tools Start->Programs->Accessories->Command Prompt cd C:\UnrealTournament\System

An Example Mutator Remember that mutators simply take some built-in functionality of UT and modify it slightly Mutators subclass the UT Mutator class For this example, we’ll create a low gravity mutator. The game already has one built in, but it makes a good example, as it’s very simple.

The Low Grav Mutator In the UnrealTournament directory, create a directory named “MyPackage” and inside that a directory named “Classes” Create a text file named LowGrav.uc in the Classes directory Edit the UnrealTournament.ini file, in the System directory, and add your package name to the EditPackages list

The Low Grav Mutator (cont.) class LowGrav expands Mutator; –Each source file will have this class declaration, and only one class can be in each source file

The Low Grav Mutator (cont.) function bool CheckReplacement(Actor Other, out byte bSuperRelevant) { if( Other.IsA('ZoneInfo')) { ZoneInfo(Other).ZoneGravity = vect(0,0,-200); } return true; } An inherited function, used to replace or modify actors in a level

The Low Grav Mutator (cont.) In the command prompt, enter the UnrealTournament/System directory Type ucc make all Create a text file named MyPackage.int in this directory, with the contents (one line): Object=(Name=MyPackage.LowGrav,Class=Class, MetaClass=Engine.Mutator,Description=“My Low Gravity, My Low Gravity") This will make your mutator show up in the game menus

The Low Grav Mutator (cont.) To run your mutator, start UT Start a new practice session Click on the Mutators button Scroll down to “My Low Gravity” and double click on it Close the window, and start the practice session

UnrealEd UT comes with a dedicated 3D level modeling and source code editing program Most do actual coding outside of UnrealEd, since many prefer to use other source code development tools such as Microsoft Developer Studio Most source code work done by UnrealEd can also be done from the command line

Using UnrealEd Start program UnrealEd.exe in the UnrealTournament/System directory Most people design maps in more mature 3D modeling program, such as Maya or 3D Studio Max UnrealEd is fine for doing pure UT design that is not too complex

An Example Level I was planning to show an example of creating a level here, using UnrealEd, but it’s not something that lends itself well to a presentation This is also a cheap way for me to get out of admitting that I don’t know much about level programming

Unreal Graphics Meshes –These are the skeletons that form the bodies of UT creatures –Have no defined surface Textures –Applied to meshes to provide a surfaces

Resources

Questions Questions, concerns, comments, sarcasm, insults? Please or come to the group meetings on Tuesdays and Thursdays… there are just so many little tips and tricks that are best learned in person