Whitebox Prototype Progress


Currently the whitebox scene is semi playable. It has the basic functionality of deploying and re-deploying drones implemented. Each drone is controlled by its own logic, currently only chase movement is supported. Drones in this mode will try to get close enough to the target (for now it's determined by central point distances only) for its weapon to fire, and will return to mothership when its resources (in this demo they are fuel and ammo) are depleted.

A little bit of discussion on the architecture here, since it's the main thing I'm trying to set up in this bare minimum white box. To spawn drone, a drone deployer object gets user input and tries to activated a drone object that's instantiated previously. Then it initializes the parameters on this drone object, telling it to perform a certain command, which is encoded by a Command object. Mothership, on the other hand, controls an array of weapons, including the abstraction of drone deployer. User can choose which weapon is activated, and only when it's activated can the drone deployer take user input.

Drones, on the other hand, is almost totally independent of mothership. Think of them as bullets instead of minions. After firing, mothership will lose all references to this drone, until later when it comes back and request for docking. Unless a drone determines its resources are depleted (at least one of the resource types), it calculates distance from its current target and attempts to move in range (actual movement is done by navmesh agent, as I mentioned in the devlog for goldfish simulator, implementing such a system from scratch is really pain in the ass). Weapon is a component attached to the drone object, which runs unaware of the drone script; its only functionality is fire when when target is in range, or tell the drone script there's no ammo. 

Thus the current prototype scene is implemented. I'll add other basic functionality in later to make it more like an actual gameplay demo.

Files

Project Drones (web).zip Play in browser
May 15, 2021

Leave a comment

Log in with itch.io to leave a comment.