• Register

Drovoid is a game about designing spaceships by assembling modules, programming them, and sending your ships to colonize space through mining and space battles. Spaceships can be manually controlled, or fully automated, or both. Drovoid can be played in solo or in multiplayer thanks to the included server. Automated battle ships can be uploaded to the Arena to compete!

Report RSS Swarms in Drovoid

Drovoid can simulate a lot of ships. This video shows swarms of ships, and also reveals CPU usage.

Posted by on

Before doing more tutorials, I wanted to give a few details regarding the engine behind Drovoid.

Drovoid is using a custom engine written in C++ that I optimize carefully to be able to simulate many ships at once. I wanted to have swarms of player-created or NPC ships attacking each others. The video below shows this, and also reveals the CPU usage after launching many ships.

One of the challenges in designing the engine is that every (active) module of every ship runs a script (written in lua). All these scripts interact with each others, exchange data, and make requests to the physics engine (the amazing Box2D library is used here). So that's a lot of CPU power if not done right.

Drovoid is massively parallelized, so that any additional CPU core benefits the game immediately.

The video also shows an interesting gameplay element: there is a tradeoff between complexity and brute force. A single, very complex ship can sustain an attack for a very long time. However, a swarm of small, inexpensive ships can go a long way towards victory!

(Note: this is running on a Core i5-3570, 3.4 GHz)

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: