Commit graph

9 commits

Author SHA1 Message Date
b27a44a9b3 build a proper working arm git plugin 2023-05-19 10:41:09 -07:00
9b0ebcefba walls can reset the ball to its starting position
WallManager binds to the BodyEntered signal on the Area2D class and
detects if the body that entered the area is the ball class, and if it
is, it will reset the ball to its starting position. right now, theres
no scoring system. this will be added later.
2023-05-19 00:18:38 -07:00
2805cd0e95 give each wall a seperate collider
this means i can detect if the ball hits the right or left wall, and it makes it easier to maintain.
2023-05-18 10:38:22 -07:00
4200a3e7df add enemy ai to the game
the enemy can now track the player with a cast that uses a shape generated in code. the enemy moves using some fancy math that gets the sign of the distance between the ball and the enemy paddles y position to get a normalised number for velocity and the velocity is lerped to smooth out any janky movement.
2023-05-17 23:41:40 -07:00
e50f0aefb1 add a random starting x direction to the ball
this means the ball can either go left or righ randomly instead of always going left.
2023-05-17 14:16:31 -07:00
133e0fb734 move the maxRandomAngle double to an exported var.
this means you can set the maxRandomAngle in the inspector, without having to modify the code.
2023-05-17 10:52:55 -07:00
4681c2e620 add randomness to the ball and make the paddle smaller. 2023-05-16 23:47:24 -07:00
02c5b90415 make a basic prototype for a scene.
right now theres just a moving ball, inside a box, with a working paddle. i had to make the ball kinematic and tell the ball to bounce when it hits the other direction.
2023-05-16 23:15:31 -07:00
794a3646ed Initial Commit 2023-05-16 20:28:26 -07:00