Skip to content

feat: RPS#29

Merged
Thomlam merged 6 commits intodevelopfrom
feature/rock_paper_scissors
Oct 24, 2024
Merged

feat: RPS#29
Thomlam merged 6 commits intodevelopfrom
feature/rock_paper_scissors

Conversation

@AyakorK
Copy link
Copy Markdown
Contributor

@AyakorK AyakorK commented Oct 24, 2024

Summary by CodeRabbit

  • Nouvelles Fonctionnalités

    • Ajout d'un jeu interactif de Pierre-Papier-Ciseaux avec des éléments visuels et des interactions utilisateur.
    • Intégration de la fonctionnalité multijoueur en ligne via Socket.IO.
    • Ajout d'une interface utilisateur pour sélectionner les choix du joueur et afficher les résultats.
  • Modifications de Scène

    • Ajout de nouveaux objets de jeu dans les scènes, y compris des éléments d'interface utilisateur et des totems pour le jeu.
  • Mises à jour de Métadonnées

    • Création de nouveaux fichiers de métadonnées pour les préfabriqués et les actifs d'image, facilitant la gestion des ressources dans Unity.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Oct 24, 2024

Walkthrough

Cette mise à jour introduit un nouveau prefab pour un jeu de Pierre-Papier-Ciseaux dans Unity, comprenant des objets de jeu pour chaque élément (Pierre, Papier, Ciseaux) et une zone d'affichage des résultats. Des fichiers de métadonnées associés sont également créés pour le prefab et une image. De plus, des modifications sont apportées à plusieurs scènes, ajoutant de nouveaux objets de jeu et ajustant les propriétés de ceux existants, tout en maintenant la logique de jeu dans le script GameTracker. Un nouveau script RockPaperScissors.cs est également ajouté pour gérer la logique du jeu et les interactions en ligne.

Changes

Fichier Résumé des changements
Assets/Prefabs/RockPaperCissorGame.prefab Ajout de nouveaux GameObjects : RockPaperCissorGame, Rock, Paper, Cissor, ResultText, Results.
Assets/Prefabs/RockPaperCissorGame.prefab.meta Création d'un fichier de métadonnées pour le prefab, incluant fileFormatVersion et guid.
Assets/Resources/CorridorEventsRessources/ROCKPAPERCISSOR.png.meta Création d'un fichier de métadonnées pour l'image avec des paramètres d'importation de texture.
Assets/Scenes/DevRoom.unity Ajout de nouveaux GameObjects : Text (TMP), InteractionCanvas, RockPaperCissorTotem. Modifications de Altar.
Assets/Scenes/EmptyRoom_2.unity Modifications de plusieurs GameObjects, y compris des changements de noms et de propriétés.
Assets/Scripts/GameTracker.cs Modifications cosmétiques pour améliorer la lisibilité, sans changement de logique.
Assets/Scripts/RockPaperScissors.cs Ajout d'une nouvelle classe pour gérer la logique du jeu Pierre-Papier-Ciseaux avec des capacités multijoueurs.
Assets/Scripts/RockPaperScissors.cs.meta Création d'un fichier de métadonnées pour le script, incluant des paramètres de configuration.

Possibly related PRs

Suggested reviewers

  • Thomlam

🐰 Dans le jardin, je saute et je joue,
Avec Pierre, Papier, Ciseaux, quel beau ballet !
Les choix s'affichent, les rires s'élèvent,
Un jeu d'amis, où chacun s'achève.
Dans la forêt, la joie s'installe,
Avec ce nouveau jeu, la fête est royale ! 🎉


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@AyakorK AyakorK requested a review from Thomlam October 24, 2024 20:50
Copy link
Copy Markdown
Contributor

@Thomlam Thomlam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@Thomlam Thomlam merged commit 273e8b0 into develop Oct 24, 2024
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🧹 Outside diff range and nitpick comments (3)
Assets/Scripts/RockPaperScissors.cs (1)

1-14: Ajoutez de la documentation XML pour améliorer la maintenabilité.

La structure de la classe est bien organisée, mais l'ajout de documentation XML permettrait une meilleure compréhension du code pour les autres développeurs.

Exemple de documentation à ajouter :

+/// <summary>
+/// Gère la logique du jeu Pierre-Papier-Ciseaux et la communication réseau.
+/// </summary>
 public class RockPaperScissors : MonoBehaviour
 {
+    /// <summary>
+    /// Représente les choix possibles pour le joueur.
+    /// </summary>
     public enum Choice { Rock, Paper, Scissors, None }
Assets/Scenes/DevRoom.unity (2)

274-301: Considérer l'ajustement de la taille de la police pour une meilleure lisibilité.

La taille de police actuelle de 0.2 pourrait être trop petite pour être facilement lisible par les joueurs. Envisagez d'augmenter légèrement la taille tout en maintenant l'équilibre visuel.

- m_fontSize: 0.2
- m_fontSizeBase: 0.2
+ m_fontSize: 0.35
+ m_fontSizeBase: 0.35

Line range hint 779-923: Ajouter un collider pour l'interaction.

Le totem nécessite un composant Collider pour permettre l'interaction avec le joueur. Cela est essentiel pour déclencher le jeu Pierre-Papier-Ciseaux.

  - component: {fileID: 2078549730}
  - component: {fileID: 2078549731}
+ - component: {fileID: 2078549732}
  m_Layer: 0
  m_Name: RockPaperCissorTotem
...
+ --- !u!65 &2078549732
+ BoxCollider:
+   m_ObjectHideFlags: 0
+   m_GameObject: {fileID: 2078549729}
+   m_Material: {fileID: 0}
+   m_IsTrigger: true
+   m_Enabled: 1
+   serializedVersion: 3
+   m_Size: {x: 0.875, y: 2.0625, z: 0.2}
+   m_Center: {x: 0, y: 0, z: 0}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 8422573 and aa889ed.

⛔ Files ignored due to path filters (1)
  • Assets/Resources/CorridorEventsRessources/ROCKPAPERCISSOR.png is excluded by !**/*.png
📒 Files selected for processing (9)
  • Assets/Prefabs/RockPaperCissorGame.prefab (1 hunks)
  • Assets/Prefabs/RockPaperCissorGame.prefab.meta (1 hunks)
  • Assets/Resources/CorridorEventsRessources/ROCKPAPERCISSOR.png.meta (1 hunks)
  • Assets/Resources/Font/pixel dead SDF.asset (1 hunks)
  • Assets/Scenes/DevRoom.unity (5 hunks)
  • Assets/Scenes/EmptyRoom_2.unity (3 hunks)
  • Assets/Scripts/GameTracker.cs (3 hunks)
  • Assets/Scripts/RockPaperScissors.cs (1 hunks)
  • Assets/Scripts/RockPaperScissors.cs.meta (1 hunks)
🔥 Files not summarized due to errors (1)
  • Assets/Resources/Font/pixel dead SDF.asset: Error: Server error: no LLM provider could handle the message
✅ Files skipped from review due to trivial changes (3)
  • Assets/Prefabs/RockPaperCissorGame.prefab.meta
  • Assets/Scripts/GameTracker.cs
  • Assets/Scripts/RockPaperScissors.cs.meta
🔇 Additional comments (6)
Assets/Resources/CorridorEventsRessources/ROCKPAPERCISSOR.png.meta (2)

35-42: Configuration appropriée pour un jeu en pixel art

Les paramètres de texture sont bien configurés pour un style pixel art :

  • Filter Mode à 0 (Point)
  • Wrap Mode à 1 (Clamp)

176-195: ⚠️ Potential issue

Vérifier la pertinence du sprite ROCKPAPERCISSOR_3

Ce sprite semble anormalement petit (9x13 pixels) par rapport aux autres éléments. Il pourrait s'agir d'un artéfact ou d'un élément indésirable dans l'image source.

Je vous conseille de :

  1. Vérifier si ce sprite est réellement nécessaire
  2. Le supprimer s'il s'agit d'un artéfact
Assets/Scenes/EmptyRoom_2.unity (2)

382-466: LGTM: Configuration correcte du prefab RockPaperCissorGame !

L'instanciation du prefab est bien réalisée avec tous les composants et références nécessaires correctement configurés.


1253-1253: Vérifier l'intégrité de la hiérarchie de la scène

La racine de scène a été mise à jour pour inclure le nouveau prefab RockPaperCissorGame. Assurez-vous que toutes les dépendances sont correctement résolues lors de l'exécution.

✅ Verification successful

La hiérarchie de la scène semble correctement configurée

La vérification montre que :

  • Le fileID 1122242796 est bien référencé dans EmptyRoom_2.unity
  • Le prefab RockPaperCissorGame est présent dans les scènes EmptyRoom_2 et DevRoom
  • Aucune référence de script manquante n'a été détectée
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Vérifier les références manquantes dans la scène
# Rechercher les références de composants manquantes qui pourraient causer des erreurs

rg -l "m_Script: {fileID: 0}"

Length of output: 146


Script:

#!/bin/bash
# Rechercher les références de composants dans la scène Unity
rg -l "fileID: 1122242796" Assets/Scenes/

# Vérifier les références au prefab RockPaperCissorGame
rg -l "RockPaperCissorGame" Assets/Scenes/

# Rechercher les références potentiellement manquantes dans la scène
rg "m_Script: \{fileID: 0\}" Assets/Scenes/EmptyRoom_2.unity

Length of output: 241

Assets/Scenes/DevRoom.unity (1)

594-650: Configuration de l'Altar validée.

Le positionnement à l'origine avec un léger décalage en Z semble approprié pour l'interaction avec le joueur.

Assets/Prefabs/RockPaperCissorGame.prefab (1)

15-15: ⚠️ Potential issue

Correction de l'orthographe du nom "Cissor"

Le terme "Cissor" semble être une faute d'orthographe de "Scissor". Pour assurer la cohérence et éviter toute confusion, veuillez remplacer "Cissor" par "Scissor".

Appliquez cette correction :

- m_Name: Cissor
+ m_Name: Scissor

Likely invalid or redundant comment.

Comment on lines +13 to +24
public Choice playerChoice = Choice.None;

public Button rockButton;
public Button paperButton;
public Button scissorsButton;

private SocketIOUnity clientSocket;
public GameObject canvas;

public TextMeshProUGUI resultsText; // Utiliser TextMeshProUGUI

private Choice savedChoice = Choice.None;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Simplifiez la gestion d'état et validez les éléments UI.

La classe utilise deux variables pour stocker le choix du joueur et ne vérifie pas la nullité des éléments UI.

Suggestions d'amélioration :

  1. Fusionnez playerChoice et savedChoice
  2. Ajoutez la validation des éléments UI
-public Choice playerChoice = Choice.None;
-private Choice savedChoice = Choice.None;
+private Choice playerChoice = Choice.None;

+private void ValidateComponents()
+{
+    if (rockButton == null) throw new UnityException("Rock button non assigné");
+    if (paperButton == null) throw new UnityException("Paper button non assigné");
+    if (scissorsButton == null) throw new UnityException("Scissors button non assigné");
+    if (resultsText == null) throw new UnityException("Results text non assigné");
+    if (canvas == null) throw new UnityException("Canvas non assigné");
+}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public Choice playerChoice = Choice.None;
public Button rockButton;
public Button paperButton;
public Button scissorsButton;
private SocketIOUnity clientSocket;
public GameObject canvas;
public TextMeshProUGUI resultsText; // Utiliser TextMeshProUGUI
private Choice savedChoice = Choice.None;
private Choice playerChoice = Choice.None;
public Button rockButton;
public Button paperButton;
public Button scissorsButton;
private SocketIOUnity clientSocket;
public GameObject canvas;
public TextMeshProUGUI resultsText; // Utiliser TextMeshProUGUI
private void ValidateComponents()
{
if (rockButton == null) throw new UnityException("Rock button non assigné");
if (paperButton == null) throw new UnityException("Paper button non assigné");
if (scissorsButton == null) throw new UnityException("Scissors button non assigné");
if (resultsText == null) throw new UnityException("Results text non assigné");
if (canvas == null) throw new UnityException("Canvas non assigné");
}

Comment on lines +95 to +104
void CloseCanvas()
{
canvas.SetActive(false);
}

public Choice GetSavedChoice()
{
return savedChoice;
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Ajoutez des méthodes pour gérer l'état du jeu.

La classe manque de fonctionnalités pour gérer complètement l'état du jeu.

Suggestions d'ajouts :

+private bool isGameInProgress = false;

+public void ResetGame()
+{
+    playerChoice = Choice.None;
+    isGameInProgress = false;
+    resultsText.text = "";
+    canvas.SetActive(true);
+}

+public bool IsGameInProgress()
+{
+    return isGameInProgress;
+}

 public Choice GetSavedChoice()
 {
-    return savedChoice;
+    return playerChoice;
 }

Committable suggestion was skipped due to low confidence.

Comment on lines +70 to +78
async void SendChoiceToBackend()
{
var data = new Dictionary<string, string>
{
{ "move", FormatChoice(playerChoice) }
};

await clientSocket.EmitAsync("rps:select", data);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Ajoutez une gestion d'erreur pour les opérations réseau.

La méthode SendChoiceToBackend() ne gère pas les erreurs réseau potentielles.

Voici la correction suggérée :

-async void SendChoiceToBackend()
+async Task SendChoiceToBackend()
 {
-    var data = new Dictionary<string, string>
-    {
-        { "move", FormatChoice(playerChoice) }
-    };
-
-    await clientSocket.EmitAsync("rps:select", data);
+    try
+    {
+        var data = new Dictionary<string, string>
+        {
+            { "move", FormatChoice(playerChoice) }
+        };
+
+        await clientSocket.EmitAsync("rps:select", data);
+    }
+    catch (Exception ex)
+    {
+        Debug.LogError($"Erreur lors de l'envoi du choix : {ex.Message}");
+        resultsText.text = "Erreur de connexion. Veuillez réessayer.";
+    }
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
async void SendChoiceToBackend()
{
var data = new Dictionary<string, string>
{
{ "move", FormatChoice(playerChoice) }
};
await clientSocket.EmitAsync("rps:select", data);
}
async Task SendChoiceToBackend()
{
try
{
var data = new Dictionary<string, string>
{
{ "move", FormatChoice(playerChoice) }
};
await clientSocket.EmitAsync("rps:select", data);
}
catch (Exception ex)
{
Debug.LogError($"Erreur lors de l'envoi du choix : {ex.Message}");
resultsText.text = "Erreur de connexion. Veuillez réessayer.";
}
}

Comment on lines +35 to +55
void Update()
{
clientSocket.On("rps:results", response =>
{
Debug.Log("Results received!");

JArray jsonResponse = JArray.Parse(response.ToString());

foreach (var result in jsonResponse)
{
Debug.Log("Result: " + result);
Debug.Log("Result type: " + result.GetType());
Debug.Log("Result type: " + result["result"]);

resultsText.text = result["result"].ToString();
}

Debug.Log("jsonResponse: " + jsonResponse);
// resultsText.text = jsonResponse["result"].ToString();
});
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Déplacez l'enregistrement des événements Socket.IO dans Start().

L'enregistrement des événements dans Update() va créer de multiples gestionnaires d'événements à chaque frame, ce qui peut causer des fuites de mémoire et des comportements inattendus.

Voici la correction suggérée :

 void Start()
 {
     clientSocket = SocketManager.Instance.ClientSocket;
 
     rockButton.onClick.AddListener(() => OnPlayerChoice(Choice.Rock));
     paperButton.onClick.AddListener(() => OnPlayerChoice(Choice.Paper));
     scissorsButton.onClick.AddListener(() => OnPlayerChoice(Choice.Scissors));
+    
+    clientSocket.On("rps:results", HandleResults);
 }
 
-void Update()
+private void HandleResults(SocketIOResponse response)
 {
-    clientSocket.On("rps:results", response =>
-    {
-        Debug.Log("Results received!");
+    JArray jsonResponse = JArray.Parse(response.ToString());
 
-        JArray jsonResponse = JArray.Parse(response.ToString());
-
-        foreach (var result in jsonResponse)
-        {
-            Debug.Log("Result: " + result);
-            Debug.Log("Result type: " + result.GetType());
-            Debug.Log("Result type: " + result["result"]);
-
-            resultsText.text = result["result"].ToString();
-        }
-
-        Debug.Log("jsonResponse: " + jsonResponse);
-        // resultsText.text = jsonResponse["result"].ToString();
-    });
+    foreach (var result in jsonResponse)
+    {
+        resultsText.text = result["result"].ToString();
+    }
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
void Update()
{
clientSocket.On("rps:results", response =>
{
Debug.Log("Results received!");
JArray jsonResponse = JArray.Parse(response.ToString());
foreach (var result in jsonResponse)
{
Debug.Log("Result: " + result);
Debug.Log("Result type: " + result.GetType());
Debug.Log("Result type: " + result["result"]);
resultsText.text = result["result"].ToString();
}
Debug.Log("jsonResponse: " + jsonResponse);
// resultsText.text = jsonResponse["result"].ToString();
});
}
void Start()
{
clientSocket = SocketManager.Instance.ClientSocket;
rockButton.onClick.AddListener(() => OnPlayerChoice(Choice.Rock));
paperButton.onClick.AddListener(() => OnPlayerChoice(Choice.Paper));
scissorsButton.onClick.AddListener(() => OnPlayerChoice(Choice.Scissors));
clientSocket.On("rps:results", HandleResults);
}
private void HandleResults(SocketIOResponse response)
{
JArray jsonResponse = JArray.Parse(response.ToString());
foreach (var result in jsonResponse)
{
resultsText.text = result["result"].ToString();
}
}

Comment on lines +69 to +108
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Optimiser les paramètres de compression pour les différentes plateformes

Les paramètres actuels présentent quelques incohérences :

  • La compression est désactivée sur la plateforme par défaut mais activée sur WebGL/Standalone
  • La taille maximale de texture n'est pas optimisée pour WebGL

Je suggère d'appliquer les modifications suivantes :

  - serializedVersion: 3
    buildTarget: WebGL
    maxTextureSize: 2048
-   textureCompression: 1
+   textureCompression: 0
    compressionQuality: 50

Cela permettra d'assurer une cohérence dans la qualité visuelle sur toutes les plateformes.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0

Comment on lines +2932 to +2979
- target: {fileID: 4239213568335062079, guid: a29b258ccf5dc90498df6e925ee2a3e5, type: 3}
propertyPath: m_LocalPosition.x
value: -27.67523
value: 503.8351
objectReference: {fileID: 0}
- target: {fileID: 5828893578867469893, guid: e4326c266f4d3fc4482daabdf57ea4f3, type: 3}
- target: {fileID: 4239213568335062079, guid: a29b258ccf5dc90498df6e925ee2a3e5, type: 3}
propertyPath: m_LocalPosition.y
value: 3.442474
value: 304.09262
objectReference: {fileID: 0}
- target: {fileID: 5828893578867469893, guid: e4326c266f4d3fc4482daabdf57ea4f3, type: 3}
- target: {fileID: 4239213568335062079, guid: a29b258ccf5dc90498df6e925ee2a3e5, type: 3}
propertyPath: m_LocalPosition.z
value: 0.032936197
value: -0.04251155
objectReference: {fileID: 0}
- target: {fileID: 5828893578867469893, guid: e4326c266f4d3fc4482daabdf57ea4f3, type: 3}
- target: {fileID: 4239213568335062079, guid: a29b258ccf5dc90498df6e925ee2a3e5, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5828893578867469893, guid: e4326c266f4d3fc4482daabdf57ea4f3, type: 3}
- target: {fileID: 4239213568335062079, guid: a29b258ccf5dc90498df6e925ee2a3e5, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5828893578867469893, guid: e4326c266f4d3fc4482daabdf57ea4f3, type: 3}
- target: {fileID: 4239213568335062079, guid: a29b258ccf5dc90498df6e925ee2a3e5, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5828893578867469893, guid: e4326c266f4d3fc4482daabdf57ea4f3, type: 3}
- target: {fileID: 4239213568335062079, guid: a29b258ccf5dc90498df6e925ee2a3e5, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5828893578867469893, guid: e4326c266f4d3fc4482daabdf57ea4f3, type: 3}
- target: {fileID: 4239213568335062079, guid: a29b258ccf5dc90498df6e925ee2a3e5, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5828893578867469893, guid: e4326c266f4d3fc4482daabdf57ea4f3, type: 3}
- target: {fileID: 4239213568335062079, guid: a29b258ccf5dc90498df6e925ee2a3e5, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5828893578867469893, guid: e4326c266f4d3fc4482daabdf57ea4f3, type: 3}
- target: {fileID: 4239213568335062079, guid: a29b258ccf5dc90498df6e925ee2a3e5, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7792937700425213044, guid: a29b258ccf5dc90498df6e925ee2a3e5, type: 3}
propertyPath: m_Name
value: RockPaperCissorGame
objectReference: {fileID: 0}
- target: {fileID: 8054260996891625916, guid: a29b258ccf5dc90498df6e925ee2a3e5, type: 3}
propertyPath: canvas
value:
objectReference: {fileID: 1031121084}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Position du prefab RockPaperCissorGame confirmée comme problématique

La position actuelle (503, 304, -0.04) est effectivement anormale car :

  • La même instance du prefab dans EmptyRoom_2.unity utilise des coordonnées similaires (503.8351, 304.09262, -0.04251155)
  • Les autres éléments UI dans les scènes utilisent des positions plus conventionnelles (par exemple, 0,0,0 ou des valeurs proches de l'origine)
  • Ces valeurs élevées peuvent causer des problèmes d'affichage et d'interaction avec l'interface utilisateur

➤ Recommandation : Réinitialiser la position du prefab à (0, 0, 0) ou à des coordonnées plus proches de l'origine de la scène.

🔗 Analysis chain

Vérifier la position du prefab RockPaperCissorGame.

La position actuelle (503, 304, -0.04) semble être très éloignée de l'origine de la scène. Cela pourrait causer des problèmes de visibilité ou d'interaction.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Vérifier les références au prefab RockPaperCissorGame
# Test: Rechercher d'autres instances du prefab pour confirmer le positionnement habituel

rg -l "RockPaperCissorGame" --type unity

Length of output: 70


Script:

#!/bin/bash
# Search for any files containing RockPaperCissorGame
rg -l "RockPaperCissorGame"

# Also search for the GUID to find related prefab references
rg -l "a29b258ccf5dc90498df6e925ee2a3e5"

Length of output: 277


Script:

#!/bin/bash
# Rechercher les positions du prefab dans l'autre scène pour comparer
rg "RockPaperCissorGame" "Assets/Scenes/EmptyRoom_2.unity" -A 15

Length of output: 733


Script:

#!/bin/bash
# Rechercher les coordonnées de position dans EmptyRoom_2.unity
rg "m_LocalPosition" "Assets/Scenes/EmptyRoom_2.unity" -B 5 -A 10

Length of output: 11133

- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
- _FaceColor: {r: 1, g: 0, b: 0, a: 1}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Attention à l'utilisation de la couleur rouge pour cette police spécifique

La modification de la couleur en rouge pur (1,0,0) pour la police "pixel dead" semble être un cas isolé, car les autres polices du projet utilisent généralement une couleur blanche (1,1,1) pour une meilleure lisibilité. Cette police est la seule à utiliser une couleur rouge vive.

Suggestions :

  • Envisager une teinte de rouge plus douce (par exemple : r: 0.8, g: 0.2, b: 0.2)
  • Ajouter un contour clair pour améliorer la lisibilité sur fond sombre
  • Considérer l'utilisation d'une variable dans le code pour permettre un ajustement facile de la couleur
🔗 Analysis chain

Attention à l'utilisation du rouge pur dans l'interface utilisateur.

La couleur rouge pure (1,0,0) peut être trop agressive visuellement et pourrait poser des problèmes de lisibilité selon le fond utilisé.

Suggestions d'amélioration :

  • Envisager une teinte de rouge plus douce (par exemple : r: 0.8, g: 0, b: 0)
  • Vérifier les ratios de contraste pour l'accessibilité
  • Considérer rendre la couleur configurable via l'inspecteur Unity pour faciliter les ajustements
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Vérifier l'utilisation de cette police dans les scènes
# pour s'assurer que le texte reste lisible

# Rechercher les références à cette police dans les scènes
rg -l "pixel dead SDF"

Length of output: 67


Script:

#!/bin/bash
# Search for TextMeshPro components in scene files and prefabs
rg -l "TextMeshPro" --type unity

# Search for any color settings in scene files that might affect this font
rg "_FaceColor" --type unity -C 3

Length of output: 126


Script:

#!/bin/bash
# Search for TextMeshPro components in all files
rg -l "TextMeshPro"

# Search for scene files
fd -e unity

# Search for prefab files
fd -e prefab

# Search for any color settings that might affect this font
rg "_FaceColor" -C 3

Length of output: 48404

- component: {fileID: 6299309790131184269}
- component: {fileID: 1306315471653705830}
m_Layer: 5
m_Name: RockPaperCissor
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Correction de l'orthographe dans "RockPaperCissor"

Le nom "RockPaperCissor" contient une faute d'orthographe. "Cissor" devrait être "Scissor". Veuillez corriger le nom en "RockPaperScissor" pour assurer la cohérence.

Appliquez cette correction :

- m_Name: RockPaperCissor
+ m_Name: RockPaperScissor
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
m_Name: RockPaperCissor
m_Name: RockPaperScissor

- component: {fileID: 4239213568335062079}
- component: {fileID: 8054260996891625916}
m_Layer: 0
m_Name: RockPaperCissorGame
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Correction de l'orthographe dans "RockPaperCissorGame"

Le nom "RockPaperCissorGame" contient une faute d'orthographe. "Cissor" devrait être "Scissor". Veuillez corriger le nom en "RockPaperScissorGame" pour assurer la cohérence.

Appliquez cette correction :

- m_Name: RockPaperCissorGame
+ m_Name: RockPaperScissorGame
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
m_Name: RockPaperCissorGame
m_Name: RockPaperScissorGame

Thomlam added a commit that referenced this pull request Oct 26, 2024
* feat : add multiple option and itemscollider for RockPaperCissor

* feat: Link Rock Paper Scissors to backend socket

* feat: Link RockPaperScissors, but display missing

---------

Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com>
AyakorK added a commit that referenced this pull request Oct 27, 2024
* Chore/shadering map (#24)

* technical : add shadering and post-traitement system, adapt asset and sprite for using this

* feat: update Room2

* feat: Link the chat to the back sockets (#25)

* feat: Link chat to backend (#26)

* feat: Link the chat to the back sockets

* fix: Move the dialogue script outside the canvas to avoid it to be disabled while the canvas is going to be disabled

* fix: remove dual camera

* fix: fix crossbow system (#27)

* fix: add request to back (room name)

* fix: Revert trap manager

* hotfix: Fix things that weren't working

* feat: RPS (#29)

* feat : add multiple option and itemscollider for RockPaperCissor

* feat: Link Rock Paper Scissors to backend socket

* feat: Link RockPaperScissors, but display missing

---------

Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com>

* hotfix: Change RPS size to match the screen

* fix: fix Crossbow up sprite and arrow system, change color pixel dead font

* chore: change EmptyRoom2

* feat: add death system (#30)

* feat: add death system

* chore: add socket emiter for end game

* fix: fix heart generator if develop don't have socket

* fix: remove crossbow

* feature: add audio system and fix crossbow with sound (#32)

Co-authored-by: Guillaume MORET <90462045+AyakorK@users.noreply.github.com>

* chore: Fix env for windows (#31)

* feat: add death system

* chore: add socket emiter for end game

* fix: fix heart generator if develop don't have socket

* fix: remove crossbow

* chore: try to fix .env for Windows and Unity

* fix: Quick Fix in production

* fix: QuickFx PlayerHealth fail merge

* Fix: fix Room

* feat: Adapt Waiting Room (#33)

* feat: Instantiate waiting room when arriving in the corridor 0

* fix: Add a flag to change message one time and avoid repetition of it

* feat: Add the creation of the room when instanciating the WaitingRoom process

* feat: Try to remove the Door collider before game has started

* fix: fix lock and door system, add waiting room, last fix for dialogue system for pity

---------

Co-authored-by: Thomlam <lamiablethomas@gmail.com>

* fix: rename bear_trap to prefab

* fix: quick fix prefab room for crossbow

* fix: quickfix for bear_trap

* feat: Add room deletion when disconnection from a game

* Wip/streaming back (#35)

* feat: add streaming system with recording and sending frame jpeg

* feat: add config

* feat: first try to add socketIOSystem

* feat: Add the right socket

* feature : deploy for 60fps

---------

Co-authored-by: AyakorK <guillaume.moret@yahoo.com>

* hotfix: Get rid of a Debug

* fix: fix arrows component and stade 24 fps to streaming

* fix: Global rendering fixes (#36)

* fix: Update corridor displays + additions of colliders to avoid glitching

* fix: Add a door transition lock

* feat: Add collision to the walls in the room

* fix: Fix collisions of the hole

* fix: Fix glitched hitboxes

* fix: Destory arrows when going to an other room

---------

Co-authored-by: Guillaume MORET <90462045+AyakorK@users.noreply.github.com>
Co-authored-by: AyakorK <guillaume.moret@yahoo.com>
@AyakorK AyakorK deleted the feature/rock_paper_scissors branch October 28, 2024 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants