-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Add Components to more naturally spawn other Thangs #69
Description
It would be great to have things like barracks which can produce Thangs. Currently when one wants to do a battle against waves of Thangs, like in Zone of Danger, one has to create all the enemies in the beginning and use the existence.DelaysExistence Componennt to make them show up in sequence.
What would be great is to just create a few Ogre Barracks (or whatever) that could pump out new Ogres, like in a real-time strategy game. One can already add an existence.Spawns Component to a Thang which allows it to take another Thang as a template, make it not exist, and then create clones of it. All ranged units that shoot things like arrows, spears, beams, and shells already do this as part of the combat.Shoots Component, which depends on existence.Spawns, but it's not very natural to use combat.Shoots to produce more enemies.
A related improvement we need to make is that it's currently kind of strange to place a Thang, configure it, and then tell the spawning Thang to use it as a template. (In this way, anything that combat.Shoots currently just doesn't shoot anything until the Artisan has taken this undocumented step.) If these kinds of existence.Spawns parent Thangs could be made to also place their necessary spawnee Thangs by default, that'd be much more intuitive.
A further extension of this could let the barracks produce enemies based on resources like time or gold, but that's probably getting ahead of ourselves and would need more Components.