I spend about a day working on this. I used some various older code and tried to make it work, which took a while(bugs and tweaking)
A random map is created of random width/height and filled with a number of turret. Zombies are spawned into the map and as times goes by more and more. The turrets turn towards the nearest zombie and shoot. They also shoot an invisible bullet to see if it hits a wall or not. They have random properties like turnspeed and reload speed.
I made no attempt to create graphics for it. I might put the code in a mojo3d project in the future.
The code is on my github (pakz001) in the monkeyx repository or on my monkey step by step blog.