A method of making a capsule comprising a plurality of compartments, the method comprising: initiating extrusion of a filament solution through a filament extruder; laying the filament solution to form a base of the capsule; forming a first compartment in the plurality of compartments, wherein the forming creates a first barrier wall having a first predetermined release time; forming a second compartment in the plurality of compartments, wherein the forming creates a second barrier wall having a second predetermined release time; filling the first compartment with a first material; filling the second compartment with a second material; and sealing the plurality of compartments thereby forming the capsule with a first sealed compartment and a second sealed compartment.