MameUI [formerly Mame32] is the GUI version of the M.ultiple A.rcade M.achine E.mulator, a program which seeks to document the internal hardware and code of all arcade games.
Or when your player dies, you can say in code, if enemy exists, do nothing, but if enemy does not exist, then create enemy at certain spot. (This would be a pain tho for lots of emeies)