Artificial Intelligence in Game Opponents

I needed a CPU AI opponent for a simple game, so I decided to build one, and this article details my process. There’s no specific Unity content or project for this article – it’s all theory. What is Game Artificial Intelligence? Game artificial intelligence (AI) provides opponents for a human player. Those opponents need to simulate human (or robot, … Read moreArtificial Intelligence in Game Opponents

Giving Enemies the Power of Sight!

Enemies are more challenging when they have some intelligence. A great start to building enemy AI is to grant enemies the power of sight! Sight is really a test that there is clear space between the enemy’s eyes and the player. With that knowledge it’s simple to work out a solution. You can download the sample project at the bottom of … Read moreGiving Enemies the Power of Sight!

Beginner’s Guide: Create a Pong Clone in Unity: Part 10

Polishing it Off We’re now at the end of our fun, enlightening, and probably exhausting journey to recreate Pong. In this final part we will add polish to the game and learn a few more titbits of Unity wisdom before signing off on Pong (or whatever you’ve called your version). Then we’ll build a standalone … Read moreBeginner’s Guide: Create a Pong Clone in Unity: Part 10

Beginner’s Guide: Create a Pong Clone in Unity: Part 9

Wired for Sound In this part of our Pong tutorial series we will finally add sound to our game! We’ll also get a bit more practice with scripting and the Unity UI system. Sound Assets You probably know the drill by now – create a new folder within Assets called ‘Audio’, and drag the sound … Read moreBeginner’s Guide: Create a Pong Clone in Unity: Part 9

Change a Sprite’s Transparency

Adjusting a sprite’s transparency can add dynamic ‘juice’ to your game. You can make items flash on and off, make translucent ghost, or fade away your UI buttons. It happens to be really easy to achieve via Unity’s SpriteRenderer component. Change a Sprite’s Transparency You can’t change the alpha value directly, so instead you need … Read moreChange a Sprite’s Transparency

Beginner’s Guide: Create a Pong Clone in Unity: Part 8

What’s on the Menu? By the end of Part 7 we had a mostly feature-complete Pong clone. But there’s still work to do, and there are still lots of cool things to learn about using Unity. In this part we’ll dip our toes into Unity graphical user interface (GUI) features to display the score, create a … Read moreBeginner’s Guide: Create a Pong Clone in Unity: Part 8

Beginner’s Guide: Create a Pong Clone in Unity: Part 7

What’s the Score? Our game is missing something vital…a way to know who is the best player…a way for one player to beat the other…a game has to have a winner! In this part we’ll add scoring to our game. Here’s how we’ll do it:  Add goals Add a game manager script to keep track … Read moreBeginner’s Guide: Create a Pong Clone in Unity: Part 7

Beginner’s Guide: Create a Pong Clone in Unity: Part 6

Paddling Towards a Complete Game Now that we have a skeleton of a game it’s time to fill in the feature gaps. In Part 6 we’ll work on the player paddles. We will: Adjust the ball angle according to the direction of the player’s paddle when the ball hits – giving the player a bit … Read moreBeginner’s Guide: Create a Pong Clone in Unity: Part 6