UFPS Feature List
Addictive Weapon Sway
Boost your game with the smoothest weapon moves in gaming! UFPS will take any weapon model (animated or not) and breathe life into it with gorgeous realtime-generated sway and recoil forces.
- This works by feeding player movements (looking, moving, jumping, stepping, falling, sliding, firing) into a system of springs, sinus bob and noise algorithms – allowing for a vast range of complex, realtime-generated behaviors.
- This makes UFPS a great quick-prototyping platform for FPS games. Hit the ground running with amazing gun motions from day one – and worry about reload animations later.
- That said, combined with canned animation (e.g. a detailed reload sequence) this approach will give stunning results.
Player Event System
UFPS has a very powerful state- and event system for smooth, responsive control and switching seamlessly between multiple player states. No need for coding complex state machines.
- The player event system declares a number of Activities, Values, Attempts and Messages, for example: Crouch, Run, Reload, Attack and Jump.
- Any subscribing script may disallow or react to Activities and Attempts using callbacks. This allows you to define new gameplay rules very easily in script. Prevent the player from jumping? Just return false from a ‘CanStart_Jump’ delegate.
- Every declared event has a rule set limiting its min/max duration and min pause duration.
- Most player object components (such as camera, controller and weapons) are aware of player events and are able to recombine using properties from several states using a sophisticated, layered state system.
Advanced Surface System
The incredibly powerful Surface System allows for dynamic effect spawning upon collisions and impacts. Grass will behave like grass, concrete like concrete, etc.
- The Surface Effect system can spawn random sounds, prefabs, and decals upon impact/collision with objects and players
- The Decal Manager will remove bullet holes if they overlap wall corners, and ages remaining ones. Decals may fade and rotate
- The Player Foot FX Handler handles footstep and footprint effects with three footstep detection modes, along with jump and fall impact sounds
- The Rigidbody FX system allows for rigidbodies to produce sounds, decals, and particles dynamically depending on contact.
- Surface Identifiers allow you to assign surface type per object
- Fallbacks will figure out the best effect to play, with texture fallbacks even supporting UV regions within textures.
Pickups & Powerups
The game world can contain items that give the player weapons, ammo or items on contact, along with demo powerups for health, speed and slow motion.
- The ItemPickup component can be added to any object to give the player access to a certain inventory item on collision.
- A picked-up object can be removed from the level, or temporarily hidden and respawned after a set time.
- The UFPS demo also includes three simple powerup scripts: Health (replenishes player health), Slomo (for awesome Judge Dredd-style bullet time) and MegaSpeed (which is a demo of how to temporarily manipulate the controller component).
The moving platform system allows you to create everything from simple elevators to complex platform puzzles, cunning traps and epic dropships.
- Platforms can use 10 motion- and rotation interpolation modes and travel between them using waypoints.
- Platforms can patrol a route automatically or be activated on player contact, or via script (pressing an elevator button).
- Platforms can push away the player upon collision. Tip: attach a KillZone object to the bottom of an elevator to enable it to crush the player.
- The player will ride platforms correctly even with elaborate setups, for instance: a hidden platform dragging around several rigidbodies interconnected by spring joints.
- Sound fx can be assigned for Start, Stop, Waypoints and Move (looping).
Grabbing and Throwing
This feature allows the player to pick up, drop and throw rigidbody props. If the objects have damage handlers, they may break or explode on collision.
- Similar to weapons, the grab system has sophisticated logic to animate the object procedurally while carried. For example – camera bob is carried over into subtle step motions on the carried object.
- The grab system has functions to handle various physics and collision cases. For example – if you carry a box and bump into a wall, the box will twist in your virtual grip.
Full Body Awareness
UFPS comes loaded with player body features to make your character feel like a human with a body (and not just a floating camera).
- Body animator – Hooks up the UFPS player event system to a Mecanim animator controller, with many special cases for realistic movement. For example: standing still, your feet won’t move unless you turn 90 degrees.
- Headlook animates bone falloffs within the spine according to player states in very lifelike ways. This is most noticeable in multiplayer and 3rd person.
- Extra care is taken to keep the camera in sync with your 3d head, making sure the view doesn’t clip the body model, while allowing the camera to move around as freely as possible. The weapon class has logic to procedurally and smoothly move weapons into realistic positions when looking down.
- Hand- aiming and recoil – (experimental) Rotates the hand to make it aim a weapon correctly, and propagates recoil force from the weapon onto the hand.
Oculus VR Support
Immerse yourself with native Oculus VR support.
- The VR integration is a collection of scripts intended to save you time by removing some of the research tasks that everyone would have to go through porting an UFPS game to VR.
- Contains settings and demos allowing you to fine-tune your FPS for three common comfort ratings: “Intense”, “Moderate” and “Comfortable”.
- Can move the character with a controller or by teleporting.
The damage system lets you add health, death and respawn behavior to any object in your game world. With cool on-screen damage indicators and blood splatter fx for the local player.
- Damage exists in several types, including bullets, fall impacts, physics collisions, melee attacks, explosions and kill zones by default.
- It can be sent either as a regular Unity message (for compatibility with most 3rd-party assets), or in UFPS format for the more advanced features such as type, tracking and transferring between objects.
- GUI features include a sweet directional damage indicator with fullscreen damage flash, blood spatter effect and support for unlimited simultaneous inflictors. Note that this is currently implemented using OnGui calls. It will be ported to the new Unity UI at some point (to be determined).
Explosions support range, physics force, damage, cover and brutal camera shakes.
- Explosions with cover detection will fail to do damage whenever the target hides behind a solid object. However, camera shakes will still occur with undiminished furiosity. This makes tossing a grenade into a room and taking cover right next to the door opening possible – and quite intense.
- Damage in UFPS is tracked from object to object – meaning who set off the chain explosion gets the frag!
The optional inventory system has a simple drag & drop editor workflow. It supports item pickups, item and ammo caps and seamless interaction with the weapon systems.
- Items can be limited by amount, space or weight.
- The inventory system is completely optional. Prefer to to write your own inventory? Disabling / removing the UFPS inventory will simply give the player access to unlimited weapons and ammo. From there on out, your own scripts can hook into the player event system to allow or disallow the wielding or firing of weapons as you see fit.
- Items come in three fundamental flavors: Items, UnitBanks (weapons) and Units (ammo). The base system is written for general use and doesn’t really care whether it sits on a player or a vending machine, or whether a ‘UnitBank’ is a flame thrower or a Pez dispenser. In other words: there is plenty of room for creativity!
- Item type icons will automatically show up in the HUD when wielded as weapons or ammo.
- Level items can be given an ID to signify a special item. This is useful in games with quests or puzzles.
- NOTE: The inventory system is logical only and has no on-screen GUI. If you’re making a crafting or roleplaying game (typically with complex on-screen inventories) check out the add-on section for some awesome third-party inventory systems that are compatible with UFPS.
UFPS has a powerful spawn system including point & area spawnpoints, respawn delays, team spawn points, ground snapping and a clever placement logic to avoid object intersection.
- Spawnpoint parameters can be combined to produce point- or area spawnpoints that face a certain direction or pick a random direction upon spawn.
- The Respawner system selects an (optionally) random spawnpoint based on tag (can be used for distinguishing between multiplayer teams, AI or a singleplayer mode) for respawning killed objects.
- The Placement logic makes sure objects are placed smartly, snapped to ground or otherwise and adjusted for the current obstruction rules and conditions.
- Spawnpoints can have unique colors, gizmos and ground snap settings. Use different prefabs for different types of object.
- Use the RandomSpawner script to instantiate a random item from a user-populated list (commonly used for loot drops).
- Finally, anything – not just players – can use the spawnpoint system as long as it has a Respawner component.
Procedural Camera Motion
The camera system is the heart of UFPS. Not only is it a most capable traditional FPS camera – it uses a powerful spring system for violent camera shakes and smooth shaky cam.
- Mouse smoothing interpolates mouse input over several frames to reduce jittering.
- Mouse acceleration along with low mouse sensitivity allows high precision without loss of turn speed.
- Explosions will result in violent camera shakes – one of the coolest aspects of UFPS.
- Give your game a documentary feel using subtle shaky cam – perhaps depending on player state such as shock or wetness. Great for cutscenes and horror games!
- Traditional view bob is great for old school games. UFPS allows bob along all vectors for creative setups. It’s easy to make the camera behave like a big ogre, a stomping mech or a T-rex.
- Bob step detection allows you to execute logic when the camera bob dips. Great for “dino-thumps”.
- Kneeling allows the camera to be pushed down upon fall impact. Gives a very cool feel of being grounded to the surface.
- Earthquake mode makes the camera shake ominously for a set amount of seconds. Great for a sense of impending doom, the temple crumbling around you – or a reactor overheating.
- Camera collision is great for backing up against walls in 3rd person modes.
- Pitch and Yaw Limit – for static cutscene cameras and vehicle turrets.
- All parameters can be configured to suit different player states.
- Great care has been taken to make sure the camera system works with full body models, avoiding body-to-camera clipping at all times.
Powerful FPS Controller
UFPS has a battle-tested character controller with many cool mobility features. Many special cases and common ‘gotchas’ of Unity controller scripting have been taken care of, saving you tons of trouble.
- Configure acceleration and damping to get movement just right for your game. Not a fan of “slidy” movement? Make it snappy in an instant!
- Ride stuff! The controller will be moved and rotated correctly along with moving platforms. Great for elevators, viking ships, floating logs, sleds, you name it.
- Get flung off. The controller will inherit the velocity of a moving object when falling or jumping away from it.
- Sliding: Get shoved away from explosions, slide down wet / slimy surfaces, or off a wet roof or icy slope. Sliding can happen at a set pace, or in an uncontrolled and accelerating manner. Sliding works perfectly on rotating and tilted moving objects.
- Physics: The player can push around rigidbodies. It will be flung by external forces such as explosions, and will deflect or bounce away from walls.
- Configurable jump logic with lots of parameters to let you design just the right jump feel for your game, whether it be an impulse-based or a hold-to-accumulate-force logic.
- The Free Fly option is excellent for spectator- and underwater modes.
- Backwards- and air speed modifiers.
- Optionally, you may force the player toslow down walking uphill – and speed up downhill.
- Crouching reduces the scale of the collider.
- Fall impacts are forwarded via the event system to a range of systems that care about it, for weapon sway, sound effects, damage handling, pain HUD etc.
- A lightweight base class is provided for AI and multiplayer remote players (using a simpe Unity Capsule Collider and much less logic).
“Ragdolling” is always lots of fun and entertaining in action, especially with a suitable application of high explosives!
- The Ragdoll Handler script is used with full body setups to automate initialization and death / respawn behavior of ragdoll physics. It’s designed to save you time since this can otherwise be very tricky to get working right.
- Momentum of the player controller can be carried over into velocity on the ragdoll upon death.
- The 1st-person camera is locked to the body as it falls over organically, making ragdolling most immersive in 1st person!
Demolition & Loot
A destructable gameworld can be most enjoyable (and addicting). UFPS has features to make things burst, break and emit loot in spectacular ways.
- Props and players can emit any number of debris prefabs upon death for gibs and demolition fx.
- Item pickups can be emitted according to the loot list and probability of your choice.
- Rigidbody pickups can be given positional and angular spawn force. This allows for classic “loot” popping out of chests / crates that are opened or crushed.
Scriptable Triggers & Switches
Triggers and Switches allow you to send a Unity message to any target object for great scripting flexibility.
- Triggers activate on player contact.
- Switches can be activated by looking at them within range and pressing a Use button.
- Platform Switches allow the control of UFPS’ built-in moving platforms; useful for opening and closing doors or calling an elevator when the player pushes a button.
An experimental melee attack component that creates dynamic, fluid melee animations where your arm bounces back hitting stuff. Allows up to six randomly alternated strikes. Two demo configurations are included: a modern combat knife setup and a fantasy mace setup.
Full C# Source Code
UFPS comes with the full C# source code – a veritable treasure trove of FPS programming tricks-of-the-trade! All scripts are well-commented throughout. Systems are programmed in a modular way with strong conventions and clear, consistent formatting that makes the code very easy to follow.
5 AAA quality weapons and 4 low-end weapons are provided for prototyping purposes. HD weapons include: Pistol, AssaultRifle, Shotgun, Knife and Hand Grenade (these include keyframe animations for the reload sequence). Low-end weapons include: Mace, Revolver, Pistol, and Tommygun. All guns are gorgeously animated by the procedural animation system to follow the player’s every move with natural motion.
Realistic Shell Physics
We had some great fun studying real brass cartridges carefully to try and come up with the most realistic shell physics in gaming. The result was a script to make shells bounce, jingle and come to rest in the specific way that only true brass cartridges can. Just like in The Matrix 🙂 !
A basic 3rd-person view, designed for testing the body systems at runtime. Provided as-is, for animation testing purposes and as an example for those who may be interested in developing it further.
- The prototype HUD is currently using OnGUI calls. It will be ported to the new Unity UI at some point (to be determined).
- Overall, UFPS has very little GUI code because we believe every game has its own unique GUI challenges – quickly creeping beyond generic core FPS features.
A basic ladder system. Works for simple games and prototyping. This is one of the oldest features and is up for a complete rewrite.