Consertando a inteligência artificial do Cyberpunk 2077

Programando Games
18 Apr 202109:17

Summary

TLDRIn this engaging video, the creator explores the mechanics of open-world games, focusing on improving the AI behavior of police in Cyberpunk 2077. They embark on a project to develop a more intelligent police navigation system within the city, using graph theory and algorithms like the Breadth-First Search. The tutorial covers creating FPS mechanics, city levels, and vehicle behavior, culminating in a visually appealing and functionally enhanced police pursuit system. The video is a valuable resource for game developers interested in AI and game mechanics.

Takeaways

  • 🎮 The script discusses the development of an improved police AI behavior in the game Cyberpunk 2077, focusing on fixing issues with the game's original implementation.
  • 🚔 The creator aims to implement a police AI that can plan routes within the city to chase the player, showcasing the algorithms used in the process.
  • 🛠️ The project requires three main components: a First-Person Shooter (FPS) mechanic, a city level, and a vehicle mechanic, which are necessary for creating the police chase dynamics.
  • 📚 The FPS mechanic was already prepared from previous projects, emphasizing the importance of developing game mechanics independently for easy reusability.
  • 🏙️ A Cyberpunk-style city level was chosen for the aesthetic of the experiment, highlighting the value of good level design in open-world games.
  • 🚗 The vehicle mechanic, specifically for the police car, was developed with a focus on realistic movement and behavior, avoiding the use of the Unity's Rigidbody for a more natural feel.
  • 🔍 The script introduces a custom editor script to visualize and connect nodes for the police AI's pathfinding, demonstrating the use of graph theory in game development.
  • 📐 The Breadth-First Search algorithm was chosen for pathfinding due to its simplicity and effectiveness, even though it's not the most efficient for large graphs.
  • 👮‍♂️ Additional features like a wanted system and a Finite State Machine were implemented to control the police's behavior at different pursuit levels.
  • 🛠️ The creator provides tips on organizing and scaling game projects as they grow, suggesting the use of Unity's editor for efficiency.
  • 🎥 The video concludes with a demonstration of the final result, showing the police AI effectively navigating the city and chasing the player.

Q & A

  • What is the main focus of the video script?

    -The main focus of the video script is to explore and improve the police AI behavior in open-world games, specifically addressing the issues found in Cyberpunk 2077.

  • What game is mentioned as an example of poor police AI behavior?

    -Cyberpunk 2077 is mentioned as an example of a game with poor police AI behavior due to the abundance of bugs.

  • What are the three components necessary to create a police chase dynamic in the game?

    -The three components necessary to create a police chase dynamic are a FPS (First Person Shooter) mechanic, a city level, and a vehicle mechanic.

  • Why is it recommended to develop game mechanics independently in separate projects?

    -Developing game mechanics independently in separate projects is recommended because it simplifies the process of reusing and integrating those mechanics into new projects without having to recreate them from scratch.

  • What is the aesthetic style chosen for the city level in the experiment?

    -The aesthetic style chosen for the city level in the experiment is Cyberpunk, aiming to create a visually appealing environment for the AI police behavior experiment.

  • What is the approach taken for the vehicle movement in the game?

    -The approach taken for the vehicle movement in the game involves importing and adapting existing scripts from a previous tutorial, focusing on the behavior of the vehicle's body while it moves.

  • Why was the RigidBody not used for the vehicle's movement?

    -The RigidBody was not used for the vehicle's movement because the creator wanted a more realistic physics approach than what Unity's Rigidbody offers, which is not as realistic as needed for this project.

  • What mathematical tool is used to create a predefined path for the AI agent in the game?

    -A graph, a mathematical tool consisting of nodes and connections, is used to create a predefined path for the AI agent to navigate within the game environment.

  • What is the algorithm used for the police AI to find the shortest path from one node to another?

    -The algorithm used for the police AI to find the shortest path is called the Breadth-First Search algorithm, which creates connections between the starting node and the target node and then reconstructs the path from back to front.

  • What additional features were added to enhance the realism of the police AI behavior?

    -Additional features added to enhance the realism of the police AI behavior include a more natural car movement system, a wanted level system that triggers a police chase, and a finite state machine to control police behavior at different levels of pursuit.

  • What is the creator's plan for future content based on the script?

    -The creator plans to make more videos in the same style, focusing on game mechanics and techniques, and encourages viewers to like, share, and subscribe to the channel to support the production of this type of content.

Outlines

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant

Mindmap

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant

Keywords

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant

Highlights

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant

Transcripts

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant
Rate This

5.0 / 5 (0 votes)

Étiquettes Connexes
Game DevelopmentAI BehaviorCyberpunk 2077Police AIOpen WorldPathfindingVehicle MechanicsFPS MechanicsCity LevelGraph TheoryBreadth-First Search
Besoin d'un résumé en anglais ?