Meet Collin R.! He’s teamed up with instructor Blake as part of Game-U’s New York Accelerate program. Collin’s an arcade game fan, so he and Blake work in the Clickteam Fusion editor to build a collection of arcade-inspired games. Collin’s latest installment? Pong! Check out the enemy artificial intelligence (AI) he built to challenge his players.
AIs come in many different packages. For a non-player character in a video game, an AI can be as simple as the ability to detect and react to the player’s approach. A complex AI, like Apple’s Siri or Amazon’s Alexa, can complete your online orders, remember your habits, calculate your ETAs, respond to your questions, transcribe your texts, play your music, and much more. According to science fiction, really complex AIs – think Terminator – will someday rule the planet! Collin’s AI, while only slightly more complex than the non-player character, still manages to beat or tie with all human comers.
Creating an Object
Collin designed his AI by first creating an object (a diamond) that shares the ball’s Y-coordinate information and follows it on a constant X-coordinate. Since the whole screen is one grid, the Y-coordinate tracks the ball’s vertical location, and the X-coordinate tracks its horizontal location. Collin didn’t want the diamond bouncing all over the screen with the ball, so he confined it to a single point on the X-axis while letting it run up and down the Y-axis. Then he coded the pong paddle to follow the diamond at a specific speed. The paddle catches the ball nearly every time! By the end of the game shown above, the AI and the human are tied with 1 point each.
Nice work, Collin! Your pong game makes a cool addition to your collection of arcade adventures. Blake says you’ve also got plans to modify the AI to perform at several different difficulty levels! We’re excited to see your progress on this project and we enjoy learning along with you. Game on!