Dictyostelid
As separate amoebae, they feed and divide normally. They mostly eat soil bacteria. When the food supply runs out, they come together to form a kind of slug-like thing. The slug has a definite front and rear. It responds to light and temperature differences, and can move. Under the right conditions the slug becomes a sporocarp (fruiting body). A stalk holds up one or more balls of spores.  These spores are inactive cells protected by tough cell walls. They become new amoebae when food is available.