top of page

Tank Game

Tank Game is a 3D co-op action game where you and your crew customise tanks with various weapons, chassis, and equipment to tackle the missions and enemies laid out ahead of you in strategic or chaotic fashion with a unserious vibe. Currently this is a project I am working on with a Designer and Artist we are aiming for a release on steam (we recently did a playtest at a Game Dev Group Bring your Own Game Event, see picture.)
 

The project uses Mirror as the authoritative multiplayer layer. TankGameNetworkManager which is a custom NetworkRoomManager, centralizes connection, lobby flow, and scene transitions. Ensuring that players enter a lobby, have the opportunity to pick equipment and cannons for their tank before readying up. The player's loadout, is saved as json and sent over to the server as a string, once everyone has readied up the server will transition the players over to their selected mission. Where their loadouts are unpacked back into json the server sends instructions to each client to create the player's selected weapons and equipment on the tank it has spawned for them.

Every Tank Chassis has a number of MountPoints which can take specific types of 'Mountable' objects. At the moment we have Main Cannons, Guns and Equipment. The number, position and what Mountables are compatible are completely up to the designer. aside from the Tank Chassis Prefab itself, there is a 'TankBody' scriptable object which I use as a data container, a custom script reads the attached Chassis Prefab displaying the number and mountable compatibility of each mountpoint. This is so our Loadout UI can remain fully Data-Driven and display the correct details about the Tank Chassis when the player selects it.

The AI system is buildt from Behiavour Designer as it was a simple and efficient way of implementing FSMs. I've custom coded AI tasks which get executed on the Server, each AI tank follows it's behiavour tree logic, right now we have:
TurretAimAndSearch, TurretAimAtTarget, TankPatrol and TankDriveToTarget. Every task is fully data driven allowing the designer to tweak to their hearts content things like the engagement range or the range at which it will spot the player tanks. 

We're planning on expanding the AI as we go, but at the moment the tanks patrol set waypoints, searching for the players, when they either find one (in the search cone at the front of the tank or the search cone  that is aimed by the turret.) The AI will drive to an engagement range, Aim it's turret and fire when within a certain bounds. The driving task requests a path from a Unity Navmesh, and actually drives the tank the same way the player does, all the same logic is used just with the AI 'simulating' the player's input. A targeting brain keeps track of player targets and ensures both the turret and the tank's behiavour trees are in sync aiming and driving towards the same target. This is intentionally expandable for the future, there's no limit to the number of turrets a tank could have!

We recently did a playtest at Leamington's Gave Dev Group Bring youre Own Game Meetup. 12 players played the game and gave us excellent feedback! It was a blast to show it off and see people play it for the first time! We certainly gained some experience in running a playtest not everything went perfectly! Our setup was a little clunky for one having to manually enter IPs to get the game running through lan. Next time we're certainly going to tweak our playtest build so we can be a real pick up and play experience, with us not having to stop and explain controls or that the players were shooting their allies!

 

bottom of page