Here's another proof that I worked on AIT2 in last 4 months (in silence). I made various "engines" for different tasks: one of these is the Objects (or Actors, nevermind) engine which handles all kind of objects in a room: the switch, the pushable crates, and from now: turrets and bullets!
The turrets are - in fact - invisible objects which only spawn bullets in given position and direction. Those visible turrets built in the wall (lower video) are simple graphic elements of background.
Each turret has various properties in room definition: speed, shooting pattern (explain soon), shooting direction and bullet type.
Each shooting pattern is a byte (8 bits we know) and the turret rotates this pattern byte bitwise by a determined speed. 1 bit means "shoot" and 0 bit means "wait" in this pattern. So how it works:
For example, turret speed: 10, shooting pattern: "01100101".
1. The turret waits 10 times.
2. The turret checks bit #0, now that's "1". That means "shoot", so the AI of turret spawns a bullet and puts into the object list.
3. Rotate this pattern 1bit to the left, now the pattern is "10110010".
4. The turret waits another 10 times.
5. The turret check bit #0, now it's "0" so the turret does nothing.
6. Go back to step 1.
The bullets are really simple things. After they were created start moving to a given direction (not only left or right but up and down directions are also possible) until they collide with a wall then they disappear (future plans: instead of simple disappearing perhaps some kind of explosion, smoke, etc?)