Git Product home page Git Product logo

gasshooter's Introduction

GASShooter

Introduction

GASShooter is an advanced FPS/TPS Sample Project for Unreal Engine 4's GameplayAbilitySystem (GAS) plugin. This is a sister project to the GASDocumentation and information about the techniques demonstrated here will be discussed in detail in the README there.

This is not production-ready code but a starting point for evaluating different techniques in GAS relating to using weapons. TargetActors with persistent hit results and ReticleActors particularly do a lot of code on Tick().

Assets included come from Epic Games' ShooterGame learning project, Epic Games' Infinity Blade assets, or made by myself.

GASShooter is current with Unreal Engine 4.27. There are branches of this Sample Project for older versions of Unreal Engine, but they are no longer supported and are liable to have bugs or out of date information.

Keybind Action
T Toggles between first and third person.
Left Mouse Button Activates the weapon's primary ability. Confirms targeting.
Middle Mouse Button Activates the weapon's alternate ability.
Right Mouse Button Activates the weapon's secondary ability.
Mouse Wheel Up Swaps to next weapon in inventory.
Mouse Wheel Down Swaps to previous weapon in inventory.
R Reloads the weapon.
Left Ctrl Cancels targeting.
Left Shift Sprint.
E Interact with interactable objects.
Console Command Action
kill Kills the local player.

The Hero character does have mana but no abilities currently use it. This project's inception started when the new BioShock was announced and the idea was to include BioShock-like upgradeable abilities. That made the scope too large, but it is something that may be revisited in the future.

Secondary ammo is not used. It would be used for things like rifle grenades.

Concepts covered

  • Ability Batching
  • Equippable weapons that grant abilities
  • Predicting weapon switching
  • Weapon ammo
  • Simple weapon inventory
  • Headshot bonus damage
  • Reusable, custom TargetActors
  • GameplayAbilityWorldReticles
  • Play replicated montages on multiple Skeletal Mesh Components belonging to the AvatarActor in an ability
  • Subclassing FGameplayEffectContext to send additional information to GameplayCues
  • Character shield that drains before health is removed by damage
  • Item pickups
  • Single button interaction system. Press or Hold 'E' to interact with interactable objects including player reviving, a weapon chest, and a sliding door.

This project does not show predicting projectiles. I refer you to the Unreal Tournament source code for how to do that using a fake projectile on the owning client.

Weapon Primary Ability (Left Mouse Button) Secondary Ability (Right Mouse Button) Alternate Ability (Middle Mouse Button)
Rifle Fire hitscan bullets based on the current fire mode. Aim down sights, reduces firing spread. Changes fire modes between full auto, semi auto, and burst.
Rocket Launcher Fire a rocket. Aim down sights. Starts lock-on targeting for homing rockets. Press LMB to fire homing rockets at targets. None
Shotgun Fire hitscan pellets based on the current fire mode. Aim down sights, reduces firing spread for pellets. Changes fire modes between semi auto and full auto.

Acknowledgements

KaosSpectrum provided significant contributions to figuring out how the ability batching system works and general feedback. Check out his game development blog.

gasshooter's People

Contributors

tranek avatar sentyaanko avatar matzeogh avatar yawlighthouse avatar nicobatty avatar roidanton avatar pladux avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.