Skip to content

Add Components to more naturally spawn other Thangs #69

@nwinter

Description

@nwinter

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions