Parker_Jones: PongRL Week 1 #1
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Code Exploration
Non-Header Files
PongBallController.CSPurpose & Importance:
Manages the behavior, movement, and interactions of the pong ball in the game.
Important Methods & Variables:
MoveLocal(): Handles the core movement logic, including scoring, rebounding, and vertical wall collisions.Player.csPurpose & Importance:
Manages player attributes, controls, and physics in the game. Serves as the backbone for player interaction.
Important Methods & Variables:
playerData: Stores data for machine learning and save/loading features.scoreboard: Manages the player's score.CreateNew(): Initializes a new player.ScorePoint(): Adds a point to the scoreboard.ForceMap.csPurpose & Importance:
Helps calculate the force/physics of the ball.
Important Methods & Variables:
ApplyAt: Manages the velocity/collision of the ball & paddle.CalculateRelativeAngle: Determines the paddle-ball collision angle.IsNormalAngle: Decides if the collision angle was normal.Header Files
_Pong.csPurpose & Importance:
A good storage place for variables to quickly change game logic, rules, and play.
Important Classes & Variables:
GameConstants: Contains constants like winning score, ball's center, paddle positions.GameCache: Creates a cache for relevant variables._Pong-GamePlayer.csPurpose & Importance:
Unifies player controls and later the data for the AI.
Important Classes & Variables:
PlayerData: Not implemented yet, but crucial for AI control.PlayerControls: Synthesizes player controls.PongBall.csPurpose & Importance:
Controls logic for scoring and rebounding.
Important Classes & Variables:
Initialize: Initializes the ball.Serve: Resets the ball.Destroy Ball: Removes the sprite.Reset: Repositions the sprite.Testing
Example #1
MoveLocalinPongBallControllerExample #2
GameConstantsin_PongExample #3
ForceMapDocumentation
Non-header files:
Pong with RL/Assets/Source/Scripts/Pong/Ball/PongBallController.csPong with RL/Assets/Source/Scripts/Pong/GamePlayer/Player.csAssets/Source/Scripts/Pong/GamePlayer/Force/ForceMap.csHeader files:
Assets/Source/Scripts/Pong/_Pong.csAssets/Source/Scripts/Pong/GamePlayer/_Pong-GamePlayer.csAssets/Source/Scripts/Pong/Ball/Pong-Ball.cs