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.
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.
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.
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.
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!