You will lose if you the enemies touch your base enough, so you can buy machines to destroy the enemies.
Tell me in the comments if I should make a better one, with different enemies, more machines, and a bigger map!