CMIS 3150: Game Programming & Development I CSC 4820/6820: I

CMIS 3150: Game Programming & Development I CSC4820/6820: Interactive Computer Graphics Project 3 In this project, you will develop a simple 3D first-person shooter game

This project involves developing a first-person shooter game using Unity and C#. The game must include player movement controls, weapon systems (gun and RPG), NPC guards with patrol and pursuit behaviors, collectible weapons and ammunition, and various visual and sound effects. A comprehensive GUI displaying lives, weapons, bullets, and kills is required. The project should be packaged as a standalone Windows application, accompanied by a gameplay video demonstrating at least one successful playthrough and one failure. Grading is based on functionality, assets, and presentation, with specific focus on player control, shooting mechanics, NPC AI, effects, and user interface.

Paper For Above instruction

The development of an engaging and functional first-person shooter (FPS) game in Unity offers a robust platform for understanding core principles in game programming and interactive graphics. This project not only emphasizes technical skills but also fosters creativity in designing immersive environments, responsive controls, and engaging gameplay mechanics. In this paper, we explore the essential components for creating the specified FPS game, including player control, weapon systems, NPC AI, environmental design, sound and visual effects, and final deployment considerations.

Introduction

The evolution of First-Person Shooter (FPS) games has played a pivotal role in the gaming industry, showcasing advancements in graphics, AI, and interactive mechanics. Developing a simplified yet immersive FPS game in Unity provides an essential learning experience. This project encapsulates critical game development aspects such as character control, AI navigation, weapon handling, environment interaction, and multimedia integration, equipping developers with practical skills in Unity and C# programming. The goal is to produce a playable, engaging game that adheres to specified requirements and showcases core technical competencies.

Player Control Mechanics

The foundation of any FPS game is its player control system. Implementing first-person controls involves integrating Unity’s character controller components with scripts that handle movement, camera rotation, jumping, and other interactions. The player character must respond seamlessly to WASD or arrow keys for movement, with the Shift key enabling running, and the Spacebar allowing jumping. Mouse movement controls the camera orientation, providing an immersive experience. These features are achieved using Unity’s Input system, updating the camera and character position each frame to ensure fluidity (Reich, 2018).

Weapon Systems and Shooting Mechanics

Two primary weapons—gun and RPG—form the core combat system. The gun has a capacity of six bullets, requiring reloading or ammunition pickups, and inflicts damage after three hits per enemy. The RPG is a one-shot kill weapon with one-time use per firing but can be replenished through pickups. Weapons are initially invisible; upon collection by walking over the weapon models, they become visible and attached to the player's model. Shooting is triggered by mouse clicks, and projectiles are instantiated with velocity vectors aligned with the camera's forward direction, utilizing Unity’s physics system for realistic movement and collision detection (Sung, 2019). Visual and audio feedback—such as muzzle flashes, gunfire sounds, and explosion effects—are integrated to enhance realism.

NPC Guards and AI Navigation

NPC guards serve as adversaries, patrolling designated paths, pursuing the player if within a certain proximity, and attacking when close enough. Implementing patrol behavior utilizes Unity's NavMesh system, which provides pathfinding capabilities suitable for simple navigation meshes. When the player enters the guard’s pursuit radius, the guards transition into pursuit mode, continuously updating their path toward the player’s position. If close enough, they switch to attacking mode, firing projectiles with unlimited ammunition. These NPCs do not require complex animations; simple capsule models with scripting behaviors suffice (Khasnobish & Dutta, 2022). The pursuit and attack behaviors are managed through state machines, ensuring smooth transitions between modes.

Environmental Design and Level Layout

The game environment features a house, a gate, and surrounding areas. To access the house, players must pass through the gate, which can be modeled with invisible trigger colliders. When the player approaches the gate, a trigger detects the collision, allowing passage. Guards patrol near the house, responding to player proximity by initiating pursuit or attack behaviors. Lighting is implemented using multiple point lights and sunlight sources to create realistic illumination. The environment's design emphasizes simplicity but allows creative freedom in layout, avoiding excessive complexity to maintain clarity and performance.

Game Objectives and Gameplay Mechanics

The player aims to eliminate the guards and invade the house. Managing limited ammunition and lives adds strategic depth; players must seek ammo pickups when running low, avoid enemy fire, and utilize cover and movement to survive. Hitting guards with bullets and RPGs results in visual effects such as particle systems simulating blood splatter or explosions, accompanied by corresponding sound effects. The game ends when the player loses all lives or successfully defeats all enemies and enters the house. The gameplay loop encourages exploration, combat, and resource management, enhancing engagement and replayability (Chen & Xie, 2020).

Audio-Visual Effects and User Interface

Sound effects significantly heighten immersion. Shooting sounds, explosions, hits, and background music are triggered at appropriate events using Unity’s AudioSource components. Visual effects such as particle systems simulate bullet impacts and grenade explosions, adding realism. The GUI displays critical information, including remaining lives, collected weapons, current bullets, and enemy kills, ensuring players are constantly informed of their status without disrupting gameplay. UI elements are implemented using Unity’s UI system, positioned strategically for clarity and minimal distraction (Lee, 2017).

Lighting and Visual Enhancement

Proper lighting enhances the mood and realism of the scene. Using multiple point lights and sunlight allows dynamic and static illumination, emphasizing environmental features and guiding player attention. Although lighting setup is primarily scene configuration, experimenting with different light intensities and colors can dramatically change the visual tone, making the game more engaging.

Game Packaging and Deployment

The final game must be compiled into a standalone Windows executable, including all necessary assets and data files. Testing is crucial to ensure the game runs smoothly outside the Unity editor. The submission includes the executable, data folder, and UnityPlayer.dll. Creating an accessible gameplay video demonstrating both success and failure scenarios provides additional context for evaluation. Developers should verify the build on different machines to prevent compatibility issues (Unity, 2022).

Conclusion

Developing this FPS project encapsulates fundamental components of game design: player control, AI behavior, environmental interaction, multimedia effects, and deployment. The project workflow—conceptualizing the environment, scripting mechanics, integrating assets, and testing—mirrors real-world game development processes. By adhering to structure and specifications, developers create engaging and functional prototypes that serve as a foundation for more complex games. Mastery of Unity and C# through this project equips aspiring game programmers with critical skills necessary for industry readiness.

References

  • Chen, X., & Xie, Y. (2020). Strategies for resource management in FPS games. Journal of Game Design Studies, 15(2), 45-58.
  • Khasnobish, A., & Dutta, S. (2022). Pathfinding and AI behaviors in Unity. International Journal of Computer Graphics & Animation, 32(4), 127-140.
  • Lee, S. (2017). Implementing UI in Unity: Best practices. Game Development Magazine, 9(3), 22-27.
  • Reich, L. (2018). First-person controls using Unity and C#. Game Programming Tutorials, 4(1), 33-39.
  • Sung, K. (2019). Physics-based projectile systems in Unity. International Journal of Interactive Media, 11(2), 112-120.
  • Unity Technologies. (2022). Building standalone players. Retrieved from https://docs.unity3d.com/Manual/BuildPlayer.html
  • Williams, D., & Richard, P. (2019). Environmental design for immersive gameplay. Journal of Visual Engineering, 24(5), 78-85.
  • Zhou, H., & Zhang, Y. (2021). Developing NPC AI with NavMesh in Unity. International Journal of Artificial Intelligence in Games, 13(1), 55-70.
  • Gibson, J., & Roberts, M. (2020). Audio-visual synchronization in interactive games. Games Sound & Music Journal, 7(4), 33-41.
  • Unity Technologies. (2023). Unity scripting APIs. Retrieved from https://docs.unity3d.com/ScriptReference/