/Kosm-Classic-FPS-Template-UE4

Classic Arena First-Person-Shooter Mechanics for Unreal Engine 4.

MIT LicenseMIT

Kosm: Classic FPS Template For Unreal Engine 4

Classic Arena First-Person-Shooter Mechanics.

Project with fully customizable Blueprints to tune your project up - it includes 2 Character Blueprints with distinct movement, defined as VQ3 and CPMA, an AI Bot and Ragdoll, Spectator Mode, 9 Weapons, 2 Maps for you to make all your testing, an Health/Armor/Ammo System and much more, all replicated for online gameplay.

This template is composed by a .uproject file which you can freely customize using Unreal Engine 4.

Current Published Build: v0.7 (view Changelog)
Unreal Engine Compatibility Version: v4.26
Network Replicated: Yes. (WIP)
Platform Compatibility: PC, PS4, Xbox and VR (Oculus, Steam, Valve Index, Vive).
Input Compatibility: Keyboard/Mouse, Gamepad Controller and VR Set Compatible.
Supported Operating System: Windows 32/64-bit, Linux and Oculus-Rift ready.

Download Demo

Check Releases section to download the binaries for your platform.


Kosm: Classic FPS Template

■ 2 CHARACTERS with distinct movement:

  • VQ3 Strafe-Jumping movement Character
    Longer the Bunny-hop, faster the travel.
  • CPMA Air Control movement Character
    Full Air Control - forward vector is controlled by the direction of player's crosshair and Character gains Acceleration when swinging mouse.

■ 9 WEAPONS:

  • Crowbar
  • Rocket Launcher
  • Nailgun
  • Railgun
  • Lightning Gun (WIP)
  • Shotgun
  • Portal Gun (WIP)
  • Machinegun
  • Grenade Launcher

■ MAIN & OPTIONS MENU

■ AI BOT with Hearing/Sight Perception System

■ SPECTATOR MODE including Player View Target, Third-Person View and Free Roam Camera

■ HEALTH/ARMOR/AMMO Pickup System

■ 2 MAPS:

  • Fortress FFA/TDM Map (based on dm20)
  • Testing Grounds Map

■ FEATURES:

  • Footsteps, Misc Sounds and Attenuation Settings
  • Custom Crosshairs and Speedometer
  • Scoreboard
  • Character Selection
  • Grapple Hook
  • Damage System
  • Respawn System
  • Mega Health and Mega Armor
  • Camera Toggle
  • Cycle Center/Right Weapons
  • Player HUD
  • Visual Damage & Blood Splashes
  • OnDamage Audio Indicator
  • Radial/Splash Damage
  • Damage Indicator
  • Healthbar
  • JumpPad
  • Bunny-hop
  • Toggle/Hold Crouch
  • Crouch Slide
  • Weapon Zoom
  • Double Jump
  • Dash
  • Walk

Patch Notes:

Below you'll find all changes and tweaks made from previous to current version of the project:

v0.8 (In Development...)
  • Upgraded project compatibility to v4.27.
  • Reverted Forward Shading to its default setting. (Off)
  • Creation and setup of Kosm Dedicated Server build - it will be made available when v0.8 officially releases.
  • Upgraded Portals performance by reducing draw calls on render target, conserving same quality level.
  • All players now spawn with Crowbar instead of Rocket Launcher by default, with the ability to change Starting Weapon (or unlock all) before entering map.
  • Adjusted Character's Air Control movement while falling/when jumping on a JumpPad.
v0.7 - Release#17.02.2021
  • Added Melee Weapon.
  • Added Main Menu.
  • Added Options Menu.
  • Added Spectator Mode.
  • Added Grapple Hook.
  • Added Keyboard Arrow Navigation on Menus.
  • Added Killfeed.
  • Added Kill log.
  • Simplified Crouch and Crouch Slide Mechanics.
  • Damage Indicators are now relative to World Space instead of Player Screen.
  • Added Scoreboard Widget - for now it will only show the names of Actors spawned in level.
  • Save/Load Game System to keep variables value between Editor/Packaged sessions.
  • Upgraded Project Compatibility to UE v4.26.
  • Reworked Character Selection Widget.
  • Reworked Damage System and Projectile BPs.
  • Added Mega Armor and Mega Health.
  • Simplified Event On Landed, Deathscream, Fall Damage, Double/Pogo Jump systems.
  • Forward Shading activated - multiple fixes and improvements to get increased performance.
  • Damage Audio Pitch only activates on another Actor and not on Self-Damage. The same goes for Damage Indicators.
  • Fixed multiple replication issues for a smoother experience on Client.
v0.6 - Release#15.07.2020
  • Added Grenade Launcher Projectile.
  • Added Machine Gun Projectile.
  • Rigged 3rdPerson Mesh Animations using Blendspaces.
  • Updated Portals In/Out Behavior, Performance and Visuals - e.g. No render delay; PhysicsActor and Projectiles (not all of them) can now pass through Portals.
  • Fixed some Replication issues related to Character's movement.
  • Upgraded Project Compatibility to UE v4.25.
  • 3rdPersonGun now changes material accordingly to selected Weapon.
  • PhysicsActor now interact with JumpPad and Portals.
  • You can now Step Up on Characters.
  • Added Critical Damage when hitting the Head bone of the Opponent Mesh - it will do twice as Damage and the Indicator is displayed in red.
  • Updated HealthBars behavior and visuals, now they only appear when crosshair is hovering the specific Actor. Jittery edges and Aliasing have been removed.
  • Added Crouch Slide Mechanic.
  • Further tuned Tap-Jump detection for both Characters.
  • Added the ability to fire projectiles while using 3rdPersonCamera.
  • Align Decals and Projectiles with Crosshair based on Hit Info and Line Trace.
  • Added Weapon/Ammo Refill System - grab Ammo from the ground to refill your Weapon.
  • Noobot now switches between Rocket Launcher and Nailgun Projectiles.
  • Added Blood splashes on Event Hit and Visual damage to Skeletal Meshes.
  • Added Hit Sound on Opponent Damage - Pitch is modulated by the amount of Damage done.
  • Added Wind sound FX when falling over 4000 ZVelocity.
  • Added Speed Blendspace to 1stPerson Mesh.
  • Added Ground Accel when swinging mouse for greater jump impulse.
  • Normalized Transform (Rotation and Scale) across all Characters.
  • Added Instanced Static Mesh version of fortress.umap to decrease loading time and boost performance while level is open.
  • Improved Accessibility and Readability by adding more important comments, collapsing nodes into functions and reorganized variables by category and type on main BPs.
  • Attached Muzzle Sprites and Projectile Spawns to Muzzle Component so it follows weapon when moving.
  • Added minimum Zvelocity you need to fall in order to produce on_land noise. This will help in reaching new heights without triggering any perceivable noise event.
  • Added Ragdoll State when opponent is killed to Ragdoll_Noobot and Noobot_AI. VQ3 and CPMA still use the on_death animation.
  • Added Hotkeys (I and O) for Double Jump Selection Mode - DoubleJump Active, DoubleJump Disabled and Infinite DoubleJump.
  • Added Hotkey (L) to Refill Ammo.
  • Characters will now pass under obstacles while Crouched.
  • Linetrace to check if objects are above character while Crouched.
  • Added Animated Meshes of Health and Armor to UI.
  • Revamped Character Selection system (Tab key) - now it opens up a menu for you to choose active character.
  • Added Switch Weapons sound FX.
  • Added Weapon Sway on 1PersonMesh.
v0.5 - Release#10.03.2020
  • Added Network Replication for Online Gameplay.
  • Added Shotgun Bullet Sprites to Weapon Muzzle when firing.
  • Shotgun pellets are now traced, which increases its Spread.
  • Improved VQ3 and CPMA Acceleration detection.
  • Fixed various Audio duplicates on Network.
  • Fixed Lighting issues on Fortress map.
  • Changed maximum XY Velocity to 4000 for VQ3 and 4200 for CPMA.
v0.4 - Release#27.12.2019
  • Added Portal Gun Projectiles. (In/Out Flow)
  • Added Shotgun Projectile. (Namely "Shutgun")
  • Added Lightning Gun Projectile.
  • Added JumpPads.
  • Further upgraded VQ3 Character jump gained Acceleration.
  • Aligned Projectile with Crosshair on Weapon Zoom-In.
  • Added variable to reduce Zoom-In Mouse Sensitivity.
  • Fixed applied Ground Friction on VQ3 Character Tap-Jump.
  • Weapon won't change to the already selected one.
  • Dash uses only X/Y Axis, now you won't be able to gain Height while using it.
  • Speedometer aligned to center when number of digits increase.
  • Fixed previous existing delay on the next fired Projectile when firing any weapon and immediately switching to another one at the same time.
  • Added Audio Spatialization to Footsteps, Jump and Double Jump, Projectiles, On Hit Explosions and Landing so you can better perceive where the sound is coming from (behind, below, directional left/right, etc)
  • Added 1st/3rd Person Camera Toggle.
  • Added Deathcam.
  • Player will no longer keep firing Projectiles if killed while shooting.
  • Fixed Nailgun Splash Damage, now it won't propagate to characters that are really close to each other.
  • Added diagonal Dash movement.
  • Added Crouch movement Animation on 3rd Person Camera.
  • Added smooth Crouch.
  • Upgraded Project Compatibility to UE v4.24.
  • Added Deathscream and Fatal Fall Damage.
  • Bots no longer freeze when killed while in the air.
  • Added Lightning Gun kickback impulse.
  • Added Zoomout Animation on Deathcam.
  • Added Center/Right Weapon Selection.
v0.3 - Release#12.10.2019
  • Increased Terminal Z Velocity.
  • Corrected "Physics and Collisions" for Player Controlled Characters.
  • Added Lifespan to Projectiles so they won't propagate infinitely.
  • Added level restart on KillZ trigger.
  • Added Auto-Respawn to Player Characters.
  • Further tuned VQ3 Character movement.
  • Added Damage Indicators.
  • Added Sound Attenuation over distance.
  • Added Radial/Splash Damage.
  • Added AI with Sight and Hear Perception.
  • Added Footsteps Audio.
  • Added Health/Armor System.
  • Added Health and Armor Pickups.
  • Added Nailgun and Railgun Projectiles.
  • Added Individual HUDs for each Character.
v0.2 - Release#25.08.2019
  • Optimized Mouse Acceleration detection for the VQ3 character to work better. (further updates will be coming on next patch)
  • Revamped Rocket Launcher Projectile animations and particles.
  • Aligned Projectile with Crosshair.
  • Fixed a SpawnedDecal error.
  • Upgraded Project compatibility to support Unreal Engine v4.23.0 Preview 6.
  • Added an extra ragdoll for you to test collision and physics.
  • Each character has its own HUD and individual speedometer, which now displays and works correctly when switching Characters.
  • Removed jump cooldown node so CPMA character won't stay glued to the ground when jumping on the edge of a slope or when the space between stairs is too narrow.
  • Increased map Bound Scale limits to remove artifacts from viewport.
  • Checked Use Flat Base for Floor to avoid the situation where characters slowly lower off the side of a ledge. (as their capsule "balances" on the edge)
  • Increased trimp multiplier on slopes.
  • Added Character and Weapon Switch capability.
  • Increased step height so character can step up stairs.
v0.1 - Release#05.08.2019
  • First build deployed.

Bug Tracker:

  • [SPECTATOR-MODE] Weapon Sway is not replicating on Spectator Mode.
  • [SPECTATOR-MODE] While spectating a VQ3 Character, if that Player changes to CPMA Character, Spectator won't hook the right HUD to be displayed.
  • [NETWORK-DAMAGE-INDICATORS-CLIENT] Damage Indicators appear in all Clients instead of Owning Client.
  • [NETWORK-WEAPONS-CLIENT] Railgun Visual FX not appearing on client.
  • [NETWORK-WEAPONS-CLIENT] Fix Lightning Gun delay issues. Fix Lightning Gun beam, visually it should be Target Dynamic and not rely solely on distance.
  • [NETWORK-WEAPONS-CLIENT] Projectiles appear to have different location offsets when spawned from client to server.
  • [NETWORK-GAMEPLAY-SLIDE-CLIENT] Slide is misconfigured to use while on Client.
  • [STANDALONE-GAMEPLAY] Fix Center Weapon Offset of Melee Weapon.
  • [STANDALONE-MENU-OPTIONS] Button CREDITS and REVERT ALL TO DEFAULT are not yet assigned.
  • [STANDALONE-MENU-OPTIONS] Borderless Window Mode is not setting the chosen resolution in-game - instead, it's reading the current desktop's resolution.
  • [STANDALONE-PORTALS] Fix render recursion when looking to current portal through another one.
  • [STANDALONE-PORTALS] Projectiles that pass through Portals have a small deviation on direction.
  • [STANDALONE-PORTALS] Sometimes, Projectiles won't Apply Damage when hitting a Character through Portals.
  • [STANDALONE-PORTALS] Projectiles that are Insta Hit (Machine Gun, Railgun, Lightning Gun and Shotgun) won't pass through them.
  • [STANDALONE-PORTALS] Portals need to be pre-allocated as Actors on the map.
  • Found a bug? Contact us.

Installation:

This template is composed of a .uproject file that you can open on-the-fly using Unreal Engine. A .pdf manual is included for further installation instructions, blueprint editing and network settings. (Manual Guide and Documentation)

Buy:

Unreal Engine 4 QoL Improvements

Here's some tips to improve your experience using Unreal Engine:

■ Show Frame Rate and Memory in Editor
Go into Edit > Editor Preferences and type "Show Frame Rate and Memory" in Search Details, then check it.

■ Use New Editor Window (PIE)
Click the drop-down arrow near Play and select New Editor Window (PIE) - it is more responsive, boost performance and have less input lag.

■ t.MaxFPS 300
When playing the active level in editor viewport, it caps your fps to 60. To increase the cap, go to Edit > Project Settings and type "Console" in Search Details field to bind your Console key. Now click Play from the Editor Viewport, click your binded key and write t.maxfps 300 in the newly opened command prompt.)

■ r.VSync 0
With your Console key already binded, click Play in the Editor Viewport and write r.vsync 0 to disable Vertical Sync.

■ Uncheck FOV Scaling
Go into Project Settings and type "FOV Scaling" in Search Details, then uncheck it.

■ Uncheck Mouse Smoothness
Go into Project Settings and type "Mouse Smooth" in Search Details, then uncheck it.

■ Change Mouse Sensitivity
Go into Project Settings and select Input from the left column, then scroll down until you see Turn and LookUp inside Axis Mappings, then just change the Scale property.

■ Enable Blutilities
Go to Editor Preferences and search for Blutility and check the box to enable it. With Blutilities you'll be able to design several new kinds of tools and workflows based on Blueprints that add new capabilities to the Editor like Scripted Actions (e.g. Bulk Actions), Automation and Editor Widgets. Right-click in Content Browser and select Editor Utilities > Blutility/Editor Widget to start using them.


Creative Commons and Fair Use Content

Audio: (referring to MainMenu Music, we use a custom sample of)

  • Justice - Stress (Auto Remix)
  • Kevin Macleod - Basement Floor
  • Charles Holme - Safeguard
  • Substan - Virtual Forces

Image: (referring to MainMenu and LoadingLevel background images)

  • 'Environment 2' by k04sk
  • 'Castellum' by Whiluna

Contributing

If you'd like to contribute to this project in any way, please feel free to contact us directly.


Contact

Website
www.vtxfactory.org

Feedback & Information
info@vtxfactory.org

Bug Report & Dev Support
support@vtxfactory.org


Licensing

This project is published under MIT License which allows very broad use for both academic and commercial purposes.

You are very welcome to modify these mechanics and use them for your own commercial use - if doing so, please keep a link to the original repository and refer to Manual Guide and Documentation for more information.