Dropping The Puck Part 2

I’m making more progress on my air hockey game. It’s taking longer than expected but I thought I would give an update. There’s been a lot of work done and plenty more to go.

Movement Upgrade

The movement system for players and AI has been totally revamped. Previously, paddles would move directly to a position but I found out that I was overriding the built in physics. For example, if the puck is stuck between two paddles, the puck would sometimes pass through one of the paddles. I overcame this by calculating the force I need and applying it to the paddle. This way I wouldn’t accidentally position the paddle inside the puck. The AI and player both provide the movement system with a target position they want the paddle to go to and the movement system calculates a force based on the paddle position and the target position.

Artificial Intelligence

AI versus AI

Node Canvas behavior trees are being used for the paddle AI.

The tree tells the AI to move to the puck if it’s on their side of the arena and back in front of the net if the puck is not on their side. I have a little bit of interception calculations happening but I’m hoping to revisit it later to make the AI smarter.







AI behavior tree

Customizing Paddles

I want players to be able to customize their paddles similar to Rocket League cars. This feature is still in its infancy but it has been working quite well. I’m also thinking about having the AI randomly choose their own paddles.

Monster Paddle!

Google Play Services

I’m currently working on integrating with this service. I’d like to provide the option for players to log into Play Services to use its achievements and cloud saving features.

I’ve successfully been able to connect and view my test achievements so now I’m cleaning up the initialization process.


I’ve upgraded the project to 2018.2 and changed to IL2CPP backend to allow for 64 bit builds. In Aug 2019 Google is making 64-bit builds mandatory, so be prepared!



One thought on “Dropping The Puck Part 2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s