Sega 500 Combo Mutator Jeff “Ezeikeil” Giles

Slides:



Advertisements
Similar presentations
First of all – lets look at the windows you are going to use. At the top you have a toolbar, with all your various tools you can use when customising your.
Advertisements

CS 11 C track: lecture 7 Last week: structs, typedef, linked lists This week: hash tables more on the C preprocessor extern const.
Microsoft® Office Outlook® 2003 Training
Princess & Dragon – Version 2 By Michael Hoyle under the direction of Professor Susan Rodger Duke University July 2012 Part 2: Using Methods.
Week 11 - Friday.  What did we talk about last time?  Object methods  Accessors  Mutators  Constructors  Defining classes.
Lists Introduction to Computing Science and Programming I.
Week 2: Primitive Data Types 1.  Programming in Java  Everything goes inside a class  The main() method is the starting point for executing instructions.
Assignment 1 Pointers ● Be sure to use all tags properly – Don't use a tag for something it wasn't designed for – Ex. Do not use heading tags... for regular.
CSC 160 Computer Programming for Non-Majors Lecture #7: Variables Revisited Prof. Adam M. Wittenstein
SE320: Introduction to Computer Games Week 8: Game Programming Gazihan Alankus.
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.
Line up By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Welcome to the CRE Programming Club! Robert Eckstein and Robert Heard.
MrsBillinghurst. net A2 Computing A2 Computing Projects Game Animation in Pascal.
Lecture 22 Miscellaneous Topics 4 + Memory Allocation.
Getting Started With Alice By Ruthie Tucker under the direction of Prof. Susan Rodger Duke University, July
Sega 500 Making a Flamethrower Jeff “Ezeikeil” Giles
Click your mouse for next slide Flash – Introduction and Startup Many times on websites you will see animations of various sorts Many of these are created.
CS 11 C track: lecture 5 Last week: pointers This week: Pointer arithmetic Arrays and pointers Dynamic memory allocation The stack and the heap.
Sega 500 Intro to Bot AI Jeff “Ezeikeil” Giles
Copyright © 2000, Department of Systems and Computer Engineering, Carleton University 1 Introduction Structures are somewhat like an array in that.
Amber Annett David Bell October 13 th, What will happen What is this business about personal web pages? Designated location of your own web page.
Week 2 - Monday.  What did we talk about last time?  Software development  Lab 1.
Files COP3275 – PROGRAMMING USING C DIEGO J. RIVERA-GUTIERREZ.
Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles
Sega 500 Close Combat weapons Jeff “Ezeikeil” Giles
Module 10: Simple Inheritance #1 2000/01Scientific Computing in OOCourse code 3C59 Module 10: Simple Inheritance In this module we will cover Inheritance.
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #002 (January 17, 2015)
Sega 500 More replication Jeff “Ezeikeil” Giles
Art 315 Lecture 5 Dr. J. Parker AB 606. Last time … We wrote our first program. We used a tool called GameMaker. The program we wrote causes a ball to.
REVIEW On Friday we explored Client-Server Applications with Sockets. Servers must create a ServerSocket object on a specific Port #. They then can wait.
Important UDK Classes How they fit together Copyright © 2015 – Curt Hill.
Sega 500 Placing target boxes on the HUD Jeff “Ezeikeil” Giles
Unit 2 Sections 1-6 Sentence Frames 5th Grade. Unit 2 Section 1 Sentence Frames 5th Grade.
Animation Basics. A) Animation In animation we attempt to make things that aren’t really there appear as though they could actually exist and move in.
Sega 500 A Near TC for the GUI Jeff “Ezeikeil” Giles
11 Adding Tomato Targets Session Session Overview  We now have a game which lets a player bounce a piece of cheese on a bread bat  Now we have.
Some Thoughts about Hits, Geometry etc Rob Kutschke, Hans Wenzel Fermilab March 13, 2007.
Documentation. Your documentation must fit the needs of your audience. It’s always better to say one thing that is useful, as opposed to many things that.
Sega 500 Mutators Jeff “Ezeikeil” Giles
Game Maker – Getting Started What is Game Maker?.
Alice Learning to program: Part Two Writing Your Own Methods by Ruthie Tucker and Jenna Hayes Under the direction of Professor Susan Rodger Duke University,
Sega 500 GUI & Menus Jeff “Ezeikeil” Giles
Sega 500 Creating a New Game Jeff “Ezeikeil” Giles
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.
M1G Introduction to Programming 2 5. Completing the program.
Sega 500 Scripted events and Sequences Jeff “Ezeikeil” Giles
Review of Previous Classes Declaring Variables - var myVar:DataType = value Data Types – Number, uint, String, Boolean Functions – parameters, return.
Sega 500 Precaching in UT2003 Jeff “Ezeikeil” Giles
BIT 115: Introduction To Programming Professor: Dr. Baba Kofi Weusijana (say Doc-tor Way-oo-see-jah-nah, Doc-tor, or Bah-bah)
CS2102: Lecture on Abstract Classes and Inheritance Kathi Fisler.
Sega 500 Mario Sunshine Camera …in UT2k3 Jeff “Ezeikeil” Giles
CSE 143 Lecture 13 Recursive Backtracking slides created by Ethan Apter
Computer Science I Animations. Bouncing ball. The if statement. Classwork/homework: bouncing something. Compress and upload work to Moodle.
Today's Ninja Challenge: Write Your First Computer Game!
Coding – Week 2 Functions, Arrays, and Objects. Functions  Functions are not a new concept – you’ve been using them already.  void setup() {} and void.
C++ Functions A bit of review (things we’ve covered so far)
Getting Started With Alice: The Basics. Step 1: Background Open up Alice, and choose a background for your Alice world. Your world is something you can.
Lecture 8: Collections, Comparisons and Conversions. Svetla Boytcheva AUBG, Spring COS 240 Object-Oriented Languages.
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
Alice Development Environment. Which area contains our “program” (set of instructions)? D AB C.
Sega 500 More on Possession and Using Stuff Jeff “Ezeikeil” Giles
Chapter 4 - Finishing the Crab Game
C++ coding standard suggestion… Separate reasoning from action, in every block. Hi, this talk is to suggest a rule (or guideline) to simplify C++ code.
Repeating code We could repeat code we need more than once: i = 1 print (i) i += 1 print (i) #… stop when i == 9 But each line means an extra line we might.
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.
Editable Attributes (1)
CIS 488/588 Bruce R. Maxim UM-Dearborn
Using the Power of XML Personally
Easy-Speak How easy is it?
Presentation transcript:

Sega 500 Combo Mutator Jeff “Ezeikeil” Giles

Last day Explored exactly what mutators are and what makes them tick. We also created our first simple mutator that doubled the jump height of the player.

Today We’ll expand on this by building a more complicated mutator. The goal is to add a new adrenalin combo option to our bag of tricks via the mutator.

The plan Keeping it somewhat simple, we’re going to wrap up our jump doubler function into a mutator… In such a way that the bots will prefer to use it also. And change the velocity at which we take falling damage.

Jump mutations Well, what’s the logical place to start? Since this is a combo mutator, step one is to define the Combo…then implement the mutator. I dervied a new class from combo: class SuperJumpCombo extends Combo;

Jump mutations And set our inherited defaults. defaultproperties { Duration=30 ExecMessage="On the bounce!" ComboAnnouncement=sound'AnnouncerMain.ComboWhore' keys(0)=1 keys(1)=1 keys(2)=2 keys(3)=2 }

Jump mutations Most of this is pretty self explanatory. The only newness here is the keys array. These are used in the xPlayer controller class to see if the logged input triggers the combo. We’re not going to worry about how the xPlayer know to trigger the combo. For now, it’s enough to know that this is where it happens.

Jump mutations The Keys array is read form the highest index number (3) back. So our combo is set up as: back  back  forward  forward

Jump mutations Now we inherit 2 functions that actually DO the combo. And surprisingly, they do exactly what their name suggests. But do notice that it’s only for an xPawn. function StartEffect(xPawn P); function StopEffect(xPawn P);

xPawn…Having a quick boo. So lets crack this class open and find out how these combo’s are implemented.

xPawn…Having a quick boo. Right near the top of the file, well find this. The name of the current active combo and a bunch of flags. var Combo CurrentCombo; var bool bBerserk; var bool bInvis; var bool bOldInvis; var bool bGibbed;

xPawn…Having a quick boo. Now there’s lots of interesting stuff that goes on in xPawn, particularly related to the combos… You can track each of the flags down to see what they do, but were just going to track the CurrentCombo.

xPawn…Having a quick boo. Doing so leads use here: It is in this function that the combo is actually spawned. function DoCombo( class ComboClass )

xPawn…Having a quick boo. But notice what else it’s doing here. UnrealMPGameInfo(Level.Game).SpecialEvent(PlayerReplicationInfo, ""$CurrentCombo.Class); if ( ComboClass.Name == 'ComboSpeed' ) i = 0; else if ( ComboClass.Name == 'ComboBerserk' ) i = 1; else if ( ComboClass.Name == 'ComboDefensive' ) i = 2; else if ( ComboClass.Name == 'ComboInvis' ) i = 3; else i = 4; TeamPlayerReplicationInfo(PlayerReplicationInfo).Combos[i] += 1;

xPawn…Having a quick boo. It’s actually changing the replication info on the fly… Thus changing how this pawn looks/acts and behaves on other machines.

xPawn…Having a quick boo. We’ll talk more about replication in a couple of weeks, but for now it’s a good idea to keep an eye out for this kind of thing.

Jump mutations Right, back to the Jump mutator. As mentioned, we have the start / stop effect functions to play with, so getting ours online…

Jump mutations We define these functions as: function StartEffect(xPawn P) { P.jumpZ=P.default.jumpz*3; } function StopEffect(xPawn P) { P.jumpZ=P.default.jumpz; }

Jump mutations Well that was simple! But it’s not in the game yet…We need our mutator. Deriving from mutator: class AdrenalinBounce extends Mutator;

Jump mutations And modifying an int file so that it shows in the menus: Object=(Class=Class,MetaClass=Engine.Mutator,Name=Eze.Adren alinBounce,Description="Doubles jump height for duration of adrenalin.")

Jump mutations Set up some appropriate defaults DefaultProperties { IconMaterialName="MutatorArt.nosym" ConfigMenuClassName="" GroupName="ASuperBounce" FriendlyName="Adrenaline Super Bounce" Description="Doubles jump height for duration of adrenalin." }

Jump mutations And we’re in! But the catch is that the game still doesn’t know about the new combo. In effect the mutator does nothing…yet.

Jump mutations Now this is where things get different from yesterdays example. If you recall, we used the ModifyPlayer function to change the default players jump height…We don’t want that anymore since the combo does this for us.

Jump mutations So somehow, we need to find a way to modify the pawn from the combo. …AND, we have to register the combo so that UT knows about it.

Jump mutations After some poking around, I found this in xPlayer: var string ComboNameList[16]; var class ComboList[16]; With defaults as: ComboNameList(0)="XGame.ComboSpeed" ComboNameList(1)="XGame.ComboBerserk" ComboNameList(2)="XGame.ComboDefensive" ComboNameList(3)="XGame.ComboInvis"

Jump mutations Hrmmmm! This is the is the list of all the combos that UT knows about…interesting. Somehow, if we could just get our combo into this list through our mutator…

Jump mutations Actually it’s pretty simple, one line of code. However, it’s a bit odd to read the first time through. In our mutator we over ride the PostBeginPlay function

Jump mutations function PostBeginPlay() { class'xGame.xPlayer'.default.ComboNameList[4]="Eze.SuperJumpCombo"; super.PostBeginPlay(); } All this is doing is accessing the default ComboNameList in xPlayer and adding ours to the fray. And then calling the super.

Jump mutations From here, we can trigger the combo…

Jump mutations And get some SERIOUS air when we jump. But notice that there are no effects to tell everyone our combo is active AND we can jump high enough that we take damage when we land.

Jump mutations Dealing with the fall damage first, is a simple fix…In effect, we just have to change another default in the xPawn. Add this line to the starteffects function in the SuperJumpCombo class P.MaxFallSpeed=P.default.MaxFallSpeed*1.5;

Jump mutations And no more falling to your death from a simple jump. Oh, don’t worry. You’ll still go splat if you fall far enough. The MaxFallSpeed variable is, in effect the terminal velocity for the pawn. Once you fall fast enough, the abrupt stop at the other end hurts some.

Jump mutations And now for some effects. I’m going for total cheese here. So We’re going to attach some pretty streamers… Now, we’ve already seen how to attach stuff to pawns, but this is going to be a *bit* different. We’re going to attach them to specific locations on the pawn.

Jump mutations Notice the streamers are in fact not coming from the pawns feet like in the speed combo. I’ve attached them to the thigh.

Jump mutations So how did we do that? It was pretty easy, the hard part was finding the bone names. The code to add them was: var TransTrail LeftTrail, RightTrail; … function StartEffect(xPawn P) { LeftTrail = Spawn(class'TransTrail', P,, P.Location, P.rotation); P.AttachToBone(LeftTrail, 'lthigh'); RightTrail = Spawn(class'TransTrail', P,, P.Location, P.rotation); P.AttachToBone(RightTrail, 'Rthigh');

Jump mutations And then destroy them in: function StopEffect(xPawn P) { if (RightTrail != None) LeftTrail.Destroy(); if (RightTrail != None) RightTrail.Destroy();

Jump mutations You can attach xEmitters to any bone in the pawn. Here are all the bones in the Jugg mesh. The alias names should be the same for all the character meshes.

Jump mutations Bone nameAlias name Bone_weapon Bip01 R Clavicle Bip01 L Clavicle Bip01 R Foot Bip01 L Foot Bip01 Head bip01 Spine Bip01 R Calf Bip01 L Calf Bip01 R Forearm Bip01 L Forearm Righthand FlagHand Rshoulder Lshoulder Rfoot Lfoot Head Spine Rthigh Lthigh Rfarm lfarm

Jump mutations I also found this image online which has a good layout of the bone structure for a human character.

Jump mutations To find out more about specific bones in ANY mesh, you can view them through the animations browser in the editor. I would recommend using this as a reference only. Give preference to what the editor says.

Jump mutations

Animations List View area, watch the ani play Settings Play controls

Jump mutations All the bones are listed in the sockets pull down of the settings window. And you can attach you emitter to ANY of the AttachAlias names.

Jump mutations Lastly, as promised, getting the bots to use the jump mutator. This is done through the RecomendCombo function found in the mutator class.

Jump mutations function string RecommendCombo(string ComboName) { if ( NextMutator != None ) return NextMutator.RecommendCombo(ComboName); return ComboName; }

Jump mutations Notice that is uses stings to determine what combo to play. So we override this & give it a preference to use ours. Essentially, cut & paste the function & insert our preferences…

Jump mutations local float rnd; if ( (ComboName != "xGame.ComboSpeed") && (ComboName != "xGame.ComboInvis") && (comboName != "eze.SuperJumpCombo")) { rnd=FRand(); if ( rnd < 0.4 ) ComboName = "xGame.ComboInvis"; else if(rnd < 0.7 ) ComboName = "eze.SuperJumpCombo"; else ComboName = "xGame.ComboSpeed"; }

Jump mutations In effect, we’re simple providing a list of combo’s that are available for the bots to use. And assigning ours as one of the options. The only thing that’s now missing is to get to bots to prefer vertical movement as this makes for a much more difficult target. But that’s something we will go over when we deal with controllers.

End of the road That’s enough bouncing around for today… Next day we’ll wrap this up into a UMOD installer for distribution to the world.