Blocks Crossing!

This one's more of an obstacle than a "trap" since it's not triggered by anything and it's active and running right from the start.

The "trick" is, how to get a block to move across the shaft, and then go back to where it started and go across again.
A couple of early ideas...
Something like "PONG", where the block goes across one way, then comes back.
Something like a machine gun, with a load of blocks on one side, that drop into the "barrel" and get fired across one after the other. I think this would have worked, but you have a finite amount of "ammo", so if the player takes ages to get there, you'll have run out by the time they do.
(Editor's comment: Maybe that would have worked, if you route the blocks around the level, like the Goo Balls in "Alice and Bob and the Third Party" [AB3])

Make it Spin!

The "neat" answer: Have just one block, and make it spin in a very large circle.
So it goes across the shaft, then moves round (outside the game area) and back where it started and then goes across again.

Despite the fact that this should be simple to make, it was in fact rather annoying. The problem seems to be.. WoG's physics engine doesn't handle rotating, unbalanced objects very well.

Original Setup

Just a single rectangle and a hinge a LONG way above it, and set it to rotate, so the rectangle moves in a big circle. But it was juddery and the rectangle kept moving away from the hinge and catching on other geometry and getting stuck.


View Setup I did say the hinge was a LONG way above it.

The new setup has a compgoem object which has 2 rectangles in it (block #1 and #2) These are a long way apart (about 7500 px) and there's a hinge in the middle.
The important thing is that its nicely balanced, and spins great!

The complication with doing it this way, is you can only have 1 image on any compgeom object, so I had to make a tall picture with a little block at the top and one at the bottom.


Having written this guide, I decided that it would be nice to show that these "mechanisms" could also be used to help you, rather than just killing Goo Balls.
So I added a new "feature" to the level, the "Do Not Pull" handle.
The idea was simple; add a lever that can be pulled to stop the blocks. Doing it proved less simple.
View Setup Image
The problem was I wanted a moving lever that would push a "killer" block (tagged geomkiller) into the path of the fast moving blocks, and destroy them. However, because the lever is also a dynamic object the "killer" block killed the lever as well. The key was [DIY compositegeom] so that the pushed block and killer block move as a single object, but can have different tags. A similar idea was used in a few of the original levels, Red Carpet for one, but for different reasons.
View Image

The lever is pulled, this pushes the "pushed and killer" blocks into the support field, which keeps them in position, and the next time one of the fast moving block comes around.. the whole "spinner" object is destroyed.
The killer block is also tagged deadly so kills the UtilNuker Goo, which makes the "siren,shut down, hiss" noise.
The "Damping Field" is there to stop the "Do Not Pull" sign from swinging really wildly when the lever is pulled. It is a normal linearforcefield, but it applies no force and just has a dampeningfactor


I found another "bug" in WoG..
The nogeomcollisions attribute doesn't work when applied non-static compgeom objects, but it's fine on static ones.

So instead.... View Solution
I split the walls on both sides, and added nogeomcollisions rectangle over each pipe mouth.
This stops Goo Balls going into, or getting stuck on, the mouth of the pipe, but it lets the blocks through to kill them just fine Evil