Working With NeoFPS
Overview
NeoFPS is a framework for building PC and console based first person games.
Since it is impossible to cover all of the first person game types in a single asset, instead NeoFPS concentrates on the core mechanics of FPS games. Namely: movement, camera, interaction and shooting. It also provides implementations for features that Unity lacks out of the box, but which are especially important in first person games such as bindable controls, surface based effects, runtime settings and separating physics for shooting and movement.
NeoFPS was designed with the following goals:
- To help raise the quality bar of first person games created with the Unity game engine.
- To make it possible for a developer to achieve their vision of a first person game without placing constraints on how the game plays.
- To make the more complex mechanics of first person shooters accessible with a minimum of coding required.
- To allow developers to choose which features to use and which to replace without having to modify the code.
Installation
NeoFPS is a complex asset that requires a number of custom settings and has dependencies on other packages. Please see the Installation Instructions for a guide to getting NeoFPS up and running.
Getting Started
If this is your first time using NeoFPS, take a look at the Getting Started section for details on where to start. The Common Tasks section runs through some of the early tasks that are frequently raised in the NeoFPS Discord server and can point you in the right direction for the steps and documentation required.
Generated Constants
To meet the goals of enabling developers to achieve their vision and create complex mechanics without rewriting code, a flexible way of referencing objects and states is required. It would be easy to implement somthing using strings for keys, but the performance and memory impact of this can be a problem if the system is used in a lot of places or many times a frame. NeoFPS gets around this by providing a simple interface for creating constants similar to Unity's layers. These constants are turned into code that makes the constants easy to use in scripts as well as using them for properties in the inspector.
For more information see Generated Constants.
Layers and Tags
NeoFPS makes heavy use of Unity layers to enable complex features and to separate out scene elements for better performance.
For more information see Layers and Tags.
Game Settings
NeoFPS exposes a number of runtime settings to the player through text based settings files.
For more information see Game Settings.