Sega 500 Close Combat weapons Jeff “Ezeikeil” Giles

Slides:



Advertisements
Similar presentations
S2 INVENTOR GAME BOY part one MAIN BODY. S2 INVENTOR Here is what the finished result might look like once put together...
Advertisements

INNER WORKINGS OF UNITY 3D. WHAT WE ARE GOING TO COVER Intro to Unity Physics & Game Objects Cameras & Lighting Textures & Materials Quaternions and Rotation.
Sega 500 The UT2K3 Gunsmith Jeff “Ezeikeil” Giles
Code Club Session 3 Shark Eats Fish. Picture of finished product here.
NAMESPACES AND VISUAL INHERITANCE. OBJECTIVES In this chapter, I will cover the following: Using namespaces Visual inheritance.
Please go to View, then select Slide Show Alternatively, you can hit F5 on a Windows machine Then, hit Return or Enter.
Copyright Laws.
Microsoft ® Office PowerPoint ® 2003 Training Playing movies [Your company name] presents:
GAME:IT Junior Bouncing Ball Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game.
SE 313 – Computer Graphics Lecture 11: Projection Painting and Merging Textures Lecturer: Gazihan Alankuş 1.
SE 313 – Computer Graphics Lecture 10: More Modeling and Texturing Lecturer: Gazihan Alankuş 1.
Unreal Script: An Introduction Parts 9 to 10 Brandon Holbert.
Excel Services II: Requirements, recommendations, and permissions What you need for Excel Services As explained in the first course in the series, “Excel.
Dakota Humphries (Project Lead) Thomas Impellitteri (Tech Lead) Daryl McGhee II (Design Lead) Keith Rosier (Asset Lead)
Sega 500 Making a Flamethrower Jeff “Ezeikeil” Giles
GAME:IT Bouncing Ball Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game.
Sega 500 Intro to Bot AI Jeff “Ezeikeil” Giles
Using Your Calculator to Find the Future Value of a Single Sum with Annual Compounding 1 Dr. Craig Ruff Department of Finance J. Mack Robinson College.
VIDEO GAME PROGRAMMING Video Game Programming Junior – DigiPutt INSTRUCTOR TEACHER’S ASSISTANT.
Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles
EEC-693/793 Applied Computer Vision with Depth Cameras Lecture 13 Wenbing Zhao
JMD2144 – Lesson 4 Web Design & New Media.
Sega 500 More replication Jeff “Ezeikeil” Giles
UE4 Quickstart IMGD 4000 Due: March 25 th, 11:59pm.
Important UDK Classes How they fit together Copyright © 2015 – Curt Hill.
Sega 500 Placing target boxes on the HUD Jeff “Ezeikeil” Giles
How to make a Shooting Target game in Scratch!. WE ARE GOING TO MAKE A TARGET GAME. This game will have: A Target that will move when clicked. A Timer.
Microsoft ® Office SharePoint ® Server 2007 Training Excel Services II: Requirements, recommendations, and permissions [Your company name] presents:
Kinematics in 2-D Concept Map
UFCFS D Technologies for the Web Unity 3D: Review of Topics and Related Concepts.
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.
Sega 500 An Introduction to Replication Jeff “Ezeikeil” Giles
Sega 500 Mutators Jeff “Ezeikeil” Giles
Pogamut 2 Platform for fast development of cognitive agents inside 3D environment UT2004 items and Pogamut API Raycasting Let’s talk about raycasting :-)
Game Maker – Getting Started What is Game Maker?.
Team 2: Gamers & Coders Final Sprint Presentation.
UFCEK-20-3Web Games Programming Unity 3D: Review of Topics Publishing for the Web.
Dakota Humphries (Project Lead) Thomas Impellitteri (Tech Lead) Daryl McGhee II (Design Lead) Keith Rosier (Asset Lead)
Games Development 2 Entity Update & Rendering CO3301 Week 2, Part 1.
Sega 500 GUI & Menus Jeff “Ezeikeil” Giles
Sega 500 Creating a New Game Jeff “Ezeikeil” Giles
More on GLUT Programming Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, September 15, 2003.
Lesson 2: Reading a program. Remember: from yesterday We learned about… Precise language is needed to program Actors and Classes Methods – step by step.
Sega 500 Scripted events and Sequences Jeff “Ezeikeil” Giles
Sega 500 Combo Mutator Jeff “Ezeikeil” Giles
Sega 500 Precaching in UT2003 Jeff “Ezeikeil” Giles
GameDevClub CODE CHEAT SHEET NOTE: ALL OF THE CODE IS CASE-SENSITIVE AND THE SYNTAX IS STRICT SO A LOT OF YOUR ERRORS WILL PROBABLY COME FROM TYPOS If.
Copyright © Curt Hill Meshes A Little More to Know.
Tank Game Part 3 of 6. Secondary Weapons and Pick ups Pick ups will appear randomly in the battle area and can be collected by driving into them. Each.
Unreal Tournament 2004 Tutorial (Examples) Hanshin University Spring 2008.
Exception Handling. VB.NET has an inbuilt class that deals with errors. The Class is called Exception. When an exception error is found, an Exception.
Lecture 6: Basic Entities TEALS MINECRAFT PROJECT.
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
Sega 500 More on Possession and Using Stuff Jeff “Ezeikeil” Giles
EEC-693/793 Applied Computer Vision with Depth Cameras
EEC-693/793 Applied Computer Vision with Depth Cameras
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.
Exponents Scientific Notation
Creating a Tank Game in Scratch
32: Games 3 Functional Data
EEC-693/793 Applied Computer Vision with Depth Cameras
Properties of the Real Numbers Part I
Unit 11 – PowerPoint Interaction
Tank Game Part 2 of 6.
EEC-693/793 Applied Computer Vision with Depth Cameras
Unity Game Development
Presentation transcript:

Sega 500 Close Combat weapons Jeff “Ezeikeil” Giles

So far We’ve created a weapons template for mapping out all the weapon dependencies and a Flamethrower which fired globs of flaming goo.

Today We’re going to get up close & personal by building a Tazer. Using the Shield gun mesh & some of it’s functionality to shock our subject to death. Our goal is to cover the basics of setting up this weapon.

Close Combat At it’s core, a close combat weapon is not all that different from the regular weapons in UT. In effect, to build this I just used the template I build in lesson 21 & copied all these files into a new package. I then added CC as a prefix to the names CC as in “Close combat”.

Close Combat It still derives from the Weapon base class and simply made some name changes…Only the changes are shown here:

Close Combat class CCStick extends Weapon; defaultproperties { ItemName="CCStick" FireModeClass(0)=CCFire //what we shoot FireModeClass(1)=CCFire //the pickup item which spawns this to our inventory PickupClass=class'CCStickPickup' … AttachmentClass=class'CCAttach‘ … bMeleeWeapon=true //yes, I'm a close combat weapon...used in AI }

Close Combat class CCAmmoPickup extends UTAmmoPickup; DefaultProperties { InventoryType=class'CCAmmo' //what item to create in inventory PickupMessage="You picked up some CC-stick ammo“ …

Close Combat class CCAmmo extends Ammunition; defaultproperties { ItemName="CC Charge" //our name PickupClass=class'CCAmmoPickup' … }

Close Combat class CCStickPickup extends UTWeaponPickup; DefaultProperties { //item created in inventory InventoryType=class'CCStick' //pickup message displayed to the player PickupMessage="Close combat BoomStick!!!" PickupForce="CCStickPickup" //mesh & draw type to use StaticMesh=StaticMesh'WeaponStaticMesh.ShieldGunPickup‘ … }

Close Combat class DamTypeCCStick extends WeaponDamageType; defaultproperties { //death messages to the player DeathString="%o got smacked %k's S-Mart special." MaleSuicide="%o Bitch slaped himself" FemaleSuicide="%o Bitch slaped herself" //what weapon class causes this message WeaponClass=class'CCStick' }

Close Combat class CCFire extends WeaponFire; var class DamageType; var int Damage; var float range; defaultproperties { AmmoClass=class'CCAmmo' // what type of ammo to use AmmoPerFire=1 FireAnim=Fire FireAnimRate=1.0 FireEndAnim=None PreFireAnim=Charge // the charge ani in the shield gun FireLoopAnim=None TweenTime=0.0 Damage=50 range=128 DamageType=class'DamTypeCCStick' FireSound=Sound'WeaponSounds.BLightningGunFire' bFireOnRelease=true// fire when mouse button goes up }

Close Combat And these are all the BASIC changes needed to get our weapon in… We can summon it…

Close Combat We can pick it up

Close Combat And we can use it. Notice the sounds & are in and it animates. However, it don’t do jack…no damage… nada…zip…nil!

Close Combat But as you can see that by following this template, we go a new weapon in the game in under 10 minutes… Hooray for good object orientation!!!

Close Combat Ok, granted it doesn’t DO anything other than make some noise, but we have out starting point. Lets start by making it deal some hurt. Then we’ll worry about pretty… Functionality over fashion.

Close Combat So, open up the CCFire class & add one function named DoFireEffect. This fella is going to calculate what we hit & deal damage for us. …In all it’s glory…

Close Combat Function DoFireEffect() { local Vector HitLocation, HitNormal, StartTrace, EndTrace, X,Y,Z; local Rotator Aim; local Actor Other; Instigator.MakeNoise(1.0); Weapon.GetViewAxes(X,Y,Z); //where to start the trace from StartTrace = Instigator.Location //direction + error Aim = AdjustAim(StartTrace, AimError); //where the trace ends EndTrace =a StartTrace + Range * Vector(Aim);

Close Combat //trace from start to finish & returns what I hit Other = Trace(HitLocation, HitNormal, EndTrace, StartTrace, true); if ( Other != None && Other != Instigator ) { if ( Pawn(Other) != None ) { //hurt the opponent Other.TakeDamage(Damage, Instigator, HitLocation, X+vect(0,0,0.5), DamageType); } else Instigator.TakeDamage(Damage/2, Instigator, HitLocation,, DamageType) }

Close Combat Something to note: We’re not using a projectile here. This is an instant hit weapon which is why you see the trace functions. Hence we also dispensed with projectile class from the class list.

Close Combat What’s going on? Weapon.GetViewAxes(X,Y,Z); The orientation of the x,y,z axis of our weapon in model space…not world space

Close Combat StartTrace = Instigator.Location; //direction + error Aim = AdjustAim(StartTrace, AimError); //where the trace ends EndTrace = StartTrace + Range * Vector(Aim); Setting up our start & end points for the trace call.

Close Combat Other = Trace(HitLocation, HitNormal, EndTrace, StartTrace, true); Trace intrinsic(277) final function Actor Trace(out vector HitLocation, out vector HitNormal, vector TraceEnd, optional vector TraceStart, optional bool bTraceActors, optional vector Extent); Traced a line and see what it collides with first. Takes this actor's collision properties into account. Returns first hit actor, Level if hit level, or None if hit nothing.

Close Combat In English…Draws a line from you to the end point in the direction your weapon is facing & returns the actor you hit.

Close Combat Now, deal some damage: if ( Other != None && Other != Instigator ) { if ( Pawn(Other) != None ) { //hurt the opponent Other.TakeDamage(Damage, Instigator, HitLocation, X+vect(0,0,0.5), DamageType); } else //hurt ourselves Instigator.TakeDamage(Damage/2, Instigator, HitLocation,, DamageType);

Close Combat Now we deal some pain…

Close Combat This is all well & good, but we really have to make it interesting to look at. Now that we’ve the function down…time for the fashion. Since a Tazer is an electric shock weapon, lets cause some appropriate effects.

Close Combat What we’re after: Shock effect which ripples over the pawn. A glow. These are 2 separate effects.

Close Combat The first thing to add was the blue flare around the torso of the pawn. Defined here in one of the UT texture packages: XEffectMat.Shock.shock_flare_a

Close Combat Nothing more than a texture which, like the fire from yesterday, is nicely wrapped up into an xEmitter for us. So we can do pretty much the same thing…Spawn it & set it’s base.

Close Combat And that’s all it takes to give a pawn a nice healthy blue glow. local ShockProjElec BFlame; //Add an additional flare effect on target pawn a BFlame=spawn(class'ShockProjElec',,,HitLocation, rotator(HitNormal)); BFlame.setlocation(Other.Location); BFlame.Setbase(Other); BFlame.LifeSpan=1.0;

Close Combat Lastly was the electric shock effect on the pawn. Surprisingly, this is really quite easy to do, it’s just a matter of knowing where to look for it.

Close Combat If you open up the XGameShaders in the texture browser you’ll find this one alone with a bunch of others. Notice that it’s animated.

Close Combat To get this effect in the game, we just have to add 2 lines of code. DamageOverlayMaterial=Material'XGameShaders.PlayerShaders.LightningHit' DamageOverlayTime=1.0 But the big surprise is where.

Close Combat class DamTypeCCStick extends WeaponDamageType; In our custom damage type. But if you think about it… Kind of makes sense. When damage occurs, render the overlay.

Close Combat And that’s it, basic functionality for close combat weapons… Now, some food for thought. Look at *how* this weapon works. It does a trace over a very short range…in effect, functioning like an instant fire weapon

Close Combat This is as far as I got on close combat weapons. There’s a bit more to do, like binding the proper attachments and spawning impact effects on non-actor surfaces (like walls). But the basics of the functionality are in and as you can see it does have a shocking effect on our opponents.