Link to Immersion build (use Chrome)
Platform: Unity 6000.0.28f1
- Overview
- Architecture
- Unity Techniques
- Programming Practices
- Gameplay Systems
- Setup and Installation
- Contributing
- License
This Unity 3D first-person shooter project demonstrates essential game development mechanics, focusing on player movement, camera, environmental interaction, and combat systems in a simple 3D level. Key features include:
- Basic level built with simple objects (e.g., planes and cubes).
- Includes corridors, stairs, moving platforms, and an abyss.
- Smooth movement with WSAD keys (forward/backward/strafe).
- Mouse-based rotation and jumping with the Space key.
- Prevents falling off the level while allowing controlled jumps.
- Speed and jump boost (+50%) for a limited time.
- Damage enhancement for the player's weapon.
- Two weapons:
- Fast-firing weapon (25 HP damage per shot).
- Splash-damage weapon (125 HP per shot).
- Two types of stationary enemies:
- 200 HP and 500 HP.
- Enemies change color based on health: green > yellow > red.
- Simple user interface displaying the player's state (e.g., moving, jumping).
- Component-Based Architecture
- Separate components:
PlayerController,CameraController,Health.
- Separate components:
- Observer Pattern
- Events:
Health.OnHealthChanged,PlayerController.OnPlayerStateChanged.
- Events:
- State Pattern
PlayerStatestructure inPlayerController.
- Interfaces
IDamageableimplemented byEnemyandPlayer.
- Inheritance
- Base class
PowerUpextended bySpeedBoost.
- Base class
- Serialized Fields
- Example:
[SerializeField] private float moveSpeedin controllers.
- Example:
- Rigidbody Physics
- Example:
PlayerController.Move()usingrb.velocity.
- Example:
- Raycasting
- Example: Ground check in
PlayerController.GroundCheck()usingPhysics.Raycast.
- Example: Ground check in
- Coroutines
- Example: Temporal effects like
EnemyController.ShakeOnDamage().
- Example: Temporal effects like
- Event-Based Communication
- Example:
UIManagersubscribing toHealth.OnHealthChanged.
- Example:
- Component Caching
- Example:
rb = GetComponent<Rigidbody>();in theStart()method.
- Example:
- Smooth Interpolation
- Example: Camera movement using
SmoothDampinCameraController.
- Example: Camera movement using
- Object Pooling for Projectiles
- Managed by a
ProjectilePool.
- Managed by a
- Health System
- Methods:
Health.TakeDamage(),Health.Heal().
- Methods:
- Moving Platforms System
- Controlled by the
MovingPlatformController.
- Controlled by the
- Power-Up System
- Virtual methods:
PowerUp.Activate(),PowerUp.Deactivate().
- Virtual methods:
- Visual Feedback Mechanism
- Material color change in the
EnemyControllerupon receiving damage.
- Material color change in the
-
Clone the repository:
git clone https://github.com/zizul/ImmersionGame.git -
Open the project in Unity (version 6000.0.28f1 or later).
-
Run the project from the Unity Editor or build it for your target platform.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Submit a pull request with a clear description of changes.
This project is licensed under the MIT License. Feel free to use, modify, and distribute this project as per the terms of the license.