How do I make AI Player for Brick Breaker Smoothly?

0 favourites
  • 5 posts
From the Asset Store
Brick Dodge
$2.80 USD
60% off
Keep dodging the falling bricks for as long as possible.
  • Hi, can anyone help me.

    I want to make Ai player for brickbreaker game, but the move of player looks glitch went moving into the ball. I read that this can be done using lerp, but I can't using it :D

    this is the c3p file link :

    file.io/SQecvkNdwbgD

    thank you

    Tagged:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I would use MoveTo behavior. On every tick move to (Ball.x, self.y) position. Then adjust the parameters like speed, acceleration and deceleration for smooth movement.

  • I would use MoveTo behavior. On every tick move to (Ball.x, self.y) position. Then adjust the parameters like speed, acceleration and deceleration for smooth movement.

    thank you for your help dop200,

    one again, what if I put ball more than one?

    I tried using family but the AI player always following the X of first ball,

    ai player ignoring other ball

  • It may be a difficult task to make a smart AI that can deflect multiple balls.

    You can try a simple method first:

    On every tick pick ball instance nearest to the (player.x, player.y), move player to ball.x

    .

    Also, you don't need a family. You can add multiple instances of the same Ball sprite.

  • It may be a difficult task to make a smart AI that can deflect multiple balls.

    You can try a simple method first:

    On every tick pick ball instance nearest to the (player.x, player.y), move player to ball.x

    .

    Also, you don't need a family. You can add multiple instances of the same Ball sprite.

    thank you, it worked!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)