Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/twestpha/FirstPersonEngine
An Open-source, First-Person Shooter framework, written in C# for Unity
https://github.com/twestpha/FirstPersonEngine
first-person-shooter shooter unity3d
Last synced: about 2 months ago
JSON representation
An Open-source, First-Person Shooter framework, written in C# for Unity
- Host: GitHub
- URL: https://github.com/twestpha/FirstPersonEngine
- Owner: twestpha
- License: gpl-3.0
- Created: 2020-11-30T03:07:52.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-01-28T22:24:23.000Z (11 months ago)
- Last Synced: 2024-08-02T05:13:59.070Z (5 months ago)
- Topics: first-person-shooter, shooter, unity3d
- Language: C#
- Homepage:
- Size: 8.69 MB
- Stars: 18
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# First Person Engine
This project is an open-source, first-person shooter framework, written in C# for Unity.
The repository is structured as a Unity project, and there are example levels included for demonstrating the gameplay components. This is a framework applicable for many different types of shooter games, but it's especially suited for retro or "boomer" shooters, including code for 2d guns, sprite enemies, and various map import options.[![Demo Video](https://i.imgur.com/TxvAlyh.png)](https://www.youtube.com/watch?v=vT7TpG5HoC0 "Demonstration Video - Click to Watch")
# Installation and Setup
Setup should be minimal. Clone this repo and place it in a folder of your choosing. You will need Unity 2021.1.16f1 or newer, and Blender 2.79b or earlier to import the *.blend files.
Then, add the project in Unity Hub, and import the project.# Current Feature List
Shooting Components, used for shooting a bullet and dealing damage to damageables
* 2D flat gun component, with sprite animations, light tinting, and gun bob settings
* 3D animated gun components, with unity animation settings
* Gun, Bullet, and Damageable Components
* Simple Gun SelectionPlayer Components, for managing the first person player
* First Person Player, with movement, aiming, player sounds, and death/respawning
* First Person Player HUD, showing current gun, ammo, and damage flashBillboard Sprites Components, used for 2D sprites in 3d space, much like Doom or Wolfenstein 3D.
* Rotatable, with AnimationEnemy Components, used for managing enemies and their actions
* Enemy Manager
* Enemy Behavior
* Sprite Enemy Behavior
* Attack Token
* BarkLevel Components, used for generating levels from common level editor programs, level loading, and lighting changes
* Tiled Builder (Import *.csv files from Tiled)
* Level Manager
* Level Trigger
* Level Lighting VolumeSound Components, used for managing the sounds within the game
* Sound Manager, with Sound Component and Ambient Sound ManagerLibraries, for helping with general tasks
* Custom Math
* Localizer
* Timer
* Pooled GameObject Manager
* Console output to game with tilde key# Code Overview
The code is structured in the \Assets\Scripts folder. There are two major groups of code structure; "Components" and "Behaviors". These are contained in their respective folders.Components represent a systemic, predictable API for interacting with the framework. These are meant to be added to Unity GameObjects, and to have functions called on them to perform behavior. A gameobject might have many different components on it. For example, a Gun Component might have a Shoot() function, and when called, will shoot a bullet into the world. These components also have data on them.
Behaviors are less restrictive, and represent the open ended nature of video game scripting. They are meant to be a bridge between the more rigid, systemic components, and the variety of actions that occur in games. For example, an Enemy Behavior might be responsible for playing animations, making sounds, and firing a gun (All of which are components, and therefore systemic). Behaviors often make a variety of calls to components to accomplish their tasks. Usually, only one of these is added to a given GameObject, and the naming of these behaviors is relevant to the specific behavior it implements. For example, a Sniper Enemy might have a SniperEnemyBehavior, and it's only used for them.
A good rule of thumb: Components can talk to other components, but components should have no knowledge of behaviors.
# Future Work
* Clean up the TODOs
* Settings Manager system
* STRETCH GOAL: WAD file importing
* Make files more modular/packaged, so features can be added or removed exclusively