AI play

Shadowghost135Shadowghost135 Member Posts: 38
edited November -1 in Working with GS (Mac)
Hey guys,
Using the pong template is there any way to make the computer play one paddle? That way one person can play alone?

Thanks

Comments

  • IntelligentDesignerIntelligentDesigner Member Posts: 517
    Assign a behavior to the "enemy" paddle that senses the whereabouts of the "ball" and moves to block it.

    For instance: the paddles usually cover the areas on the Y axis at their end, so interrogate the position of the "ball" "y" wise, and move to that area.
  • quantumsheepquantumsheep Member Posts: 8,188
    Also - add in a random feature so that it will sometimes miss the ball.

    Super AI is no fun :(

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

Sign In or Register to comment.