Teardown

Teardown

Synthetic Swarm
Geneosis  [developer] 16 Jul, 2024 @ 8:51am
Dev notes
Well I think we have a new winner to the contest of the mod that I took the longest for me to release :p And I even reused some of the code from my Tameable Dragon mod, so it could have been even worst...
Anyway, this mod is basically the result of a suggestion Mad Max posted in the comments of my Control mod a while ago ^^ I kept the idea in mind for a while, not being sure if it would be relevant or interesting to play with... I even considered doing something in the same vibe but drastically different to play with the Ant Colony algorithm in Teardown, but sort of gave up after thinking about how to share information between the ants. In the end I mixed both ideas of making self-replicating drones and having them share information with each other in some way to end up with this mod :)
As you may know I am pretty bad at modeling anything in any game, so before I would start the mod I looked for someone on Discord that would be interested in helping me with that part. Gladly Ethanol was up for the task and we started discussing what models would be needed and refining how they looked together.
Once the drones models were almost ready, I started working on an AI for them. I thought about starting from scratch to get a clean code base, but after looking again at the AI from my Tameable Dragon mod, I decided that a lot of code in there could be reused, so I started from that and stripped all the unnecessary parts. This way I had so basic flight and attack functions for the drones.
When that part was stable enough, I created the factory code which was basically counting how many voxels were collected and building drones when it had enough voxels. I also added the energy shield mechanic based on the armor from the Dragons but in a slightly different way so that its regeneration would be based on the number of drones owned.
I planned on making the Factory go off with a boom when the player destroyed it, but it turned out to be very laggy... So Instead I took some of the code from my Black Hole mod and made the Factory implode into a black hole along with the explosions to clear up the debris over time. With that the drone factory was complete and ready to use.
Then I added an important feature I wanted for the drones which is some path recording and sharing with the factory: the idea was that if a miner drone encountered some voxels it was able to mine, it would share it with the factory, then the factory would give that path to other mining drones looking for materials to mine. I then extended this logic to fighter drones so that they could share enemies found with the factory as well.
Once the path building and sharing was working, I added the drilling animation and code for the mining drones. For that I took the laser from the main game code and added some voxel vacuum effect on top of it to make it look that the voxel drilled are actually collected. Then I added a bunch of voxels going out from the drone to the factory when the drone wants to deposit some voxels.
After that I added the attack code for the fighter drones by replacing the fireball code from the Dragon with different weapons based on the drone level. Level 1 drones use regular bullets doing 1DPS and are very accurate once they took aim on their target by leading its movement. Level 2 drones use rockets at 2DPS and are also deadly accurate with both code to lead target movement and code to predict the rocket drop. And the level 3 drones use the laser as an actual weapon, doing 4DPS of damage (and only 1DPS to players as more was way too deadly as the drone have perfect aim).
Finally I added the GUI for the player to spawn drones manually with the player-controlled factory and tweaked the drones cost a little to avoid that drone production snowballs too fast, and the Drone Swarm was complete!
< >
Showing 1-3 of 3 comments
dragyLan 20 Jul, 2024 @ 4:12pm 
your the one who made the tameable ender dragon? noice
Geneosis  [developer] 21 Jul, 2024 @ 1:48am 
That was definitely me ;) At least for the AI, not the model itself ^^
Last edited by Geneosis; 21 Jul, 2024 @ 1:48am
these drones are cool as anything
< >
Showing 1-3 of 3 comments
Per page: 1530 50