GunTruck Patrol


GunTruck patrol was inspired by free modern game dev tools. I wanted to build the game I never could find, and write as much bare-metal engine code as possible in the process. The project took on a life of its own, and almost 3 years later, materialized as the experimental networked PhysX shooter you see here.

This was the engine that was used as a plugin-container to test 3rd party future-proofed API's: Reality Engine Specs at artificialstudios.com

  • PhysX  (NVidia)
  • Raknet (Occulus)
  • Custom Sound Engine Directsound (MS)

This raw rendering pipeline was a perfect fit for rapid-application development with the 'one-man, one-machine' approach . Since there is no active dev team, an exploration of procedural generation using the latest 'Next-Gen & Free' Game Dev Tools was necessary to complete the project in less than 3 years.  Approximately 90% of the assets in the game were placed and/or created by procedural generation.  Most foliage was placed with an in-house AI Tool, and the buildings were created with OpenStreetMaps, Google GIS and Blender automation scripts to slice and dice windows doors and levels into the buildings.


Gameplay Features Coded in C++ 

Sound Engine

The C++ sound engine used a methodology identical to that which I designed and coded for Everquest back in 1999. There is a 32-sample 'voice handler' that manages proximity and time based events using a sophisticated state machine rather than the usual simplified priority system using a single integer value ...(that unnecessarily allocates 3d handles in advance of immediately de-allocating them, (rejected), because the priority system low-level logic is from windows 98 lol)

Shadow Engine

There were a few changes made to the existing rendering engine source to support shadows with a distance-based gradient on all foliage - now shown as Shadow Mapping in the options.


New Gameplay Features Coded in C#

 Dynamic Foliage Class

Run-Time Procedural Generation is fully implemented using 2D bitmap-based rgb color logic to dynamically draw grass and foliage around the player on the 3D terrain. A single bitmap defines the entire distribution dynamic map objects at runtime. The current implemention also supports static objects with collisions being generated on the first frame for the entire map, but that requires the server to communicate those tiles positions to the client....yeah.

Z-buffer foliage sprites are rendered using PhysX FX Scene post-processing, similar to fire but without animating frames. The RTPG system uses a precisely scaled whole-level bitmap up to 16384^2 size to generate the tiles as needed around the player, as they walk around. Static foliage tiles can also be placed directly in the level editor by hand and the foliage objects can be edited in real time to control the mix of foliage types.

AI Player Dykstra NavMesh Library using optimized Goal Oriented Action Planning

The state machine has nodes grouped deterministically, allowing for events like AI players operating a turret  to override the usual priority-handling mechanism. Its currently using some jitter to get unstuck when the ai-player formation is to tight for the surrounding geometry. Accuracy of shots, rate of ray-tracing updates, and chance of navigation locking in highest priority when seeking an objective is controllable with 3 sliders on the server, respectively.

AI Vehicle Auto-Pilot Gameplay Classes

Autonomous vehicles supports static and dynamic paths.  AutoRescue is fully coded and generates a dynamic path to a random extraction location for Live Extraction with a door gunner at the end of each mission. Additionally, Auto-Pilot can be switched on/off by network clients enabling complete control of mission insertion, where players may want to spend some time allowing the AI backup to board vehicles before moving out.

Analog Turret Traversal & Prediction Gameplay Classes

Successful implementation of client-server gameplay based on predictive physics where the AI-attackers use a 5-point firing solution. Turret based weapon systems' aiming logic simulates the response of a human player, allowing for both a realistic prediction from the attacker and reasonable recovery period for the defender. The fear of being bracketed by direct fire strikes fear into the players hearts.


Autonomous Vehicle Networking and Destruction Classes

A system of network messaging has been created from scratch that enables updating clients with vehicle destruction and other parameters in real-time. Initialization of vehicle-specific features such as paint job, turrets or optional seats is defined for All Client/Server using this messaging system. Destructable doors with open/close animations are running on the HumV.


Breakable Object Factory Classes

I created a networked breakable prefab based on optimized PhysX rigidbody system, which uses a plain vanilla PhysX RigidBody scene. Extended to support multiple types of physics interactions in the editor. Optimized to remove extra information that clients don't need.


AI Door Class

Realizing the importance of integrating this feature into the AI navigation states, I coded a networked breakable door from scratch.  It synchronizes all possible states with clients in real time and clients who join after the state has been set on the server. Transforms are in place for bullet-hole penetration, client server-synced while animating, and providing player collisions while closed. As with all objects in GunTruckPatrol, it has a burn timer. AI Nav points can be added to the nav mesh to set up a cover point between the door hinge and the center of the doorway. This is a guard cover cell where the AI will cover the doorway rather than just run through. It also solves issues with a rotated or too low rez of nav mesh failing to allow navigation through a tight doorway. AI can open and close doors as needed when they determine their path is blocked.

GuntruckPatrol World Builder (formerly RealityBuilder)

Dedicated editor supports original file format of the engine (.xml,.reb), as well as extended classes and features provided to build GTPatrol specific assets. I have designed my own resource system that uses object oriented components within the editor to control and respond to run-time events. 3 Types of Triggers handle all game determinate events. Tools were added to support scattering, optimizing meshes, and vehicle path points. An ambient streaming sound emitter SoundAmbient was added as a derived class from the original SoundSource class.

Get GunTruck Patrol

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.