One thing you should be aware of, however, is that each of these types of motion have their advantages and disadvantages. They all have a different use, and should be applied as you see fit in your levels. Remember, in the end only you, as the designer, know for sure what you want your level to look like.
Straight Line Movement, Part 1
Our first type of straight line movement is by far the easiest to implement. You can find the link for the level here. I will be referencing the circular parts from left to right, starting with 1. The scripting for this is quite easy as well.
Code: Select all
rotatePart, 1, 1, 0, 0, 0
rotatePart, 2, -2, 0, 0, 0
rotatePart, 3, 1, 0, 0, 0
Code: Select all
rotatePart, 1, 1, 0, 0, 0
rotatePart, 2, -2, 0, 0, 0
rotatePartToShip, 3
One thing this type of straight line motion will do, however, is that near the endpoints of the line, the part will slow down. This can either be a hindrance to your level's overall effect or it can add to it. You decide if it's right for you.
Straight Line Motion, Part the Second
If part limits are imposed (see: Minimalist thread), or you'd like to reduce lag a bit, this second option might just be the ticket you are looking for. This technique only uses one rotating part, making it especially useful for levels with many parts and/or weapons or a lot of scripting. The major downside to this techinque is that the arc that you use, is generally clearly visible. That is unless you move your parts way off the screen. (I will detail a bit more on how to move your parts off the screen in just a moment.) You can view this type of straight line motion here.
I will be using the piece at the top as the rotator in this example. It will be called part #1 in all code fragments. The code I used for this is also as simple as the rotator itself.
Code: Select all
rotatePart, 1, 0.25, -10, 10, 0
The main advantage of this type of straight line movement is that you can use fewer parts to make things move. The biggest disadvantage is that it is really only a small portion of a circle's arc. This causes the part to move in a circular fashion, even if only slightly. This can cause problems if you need things to line up in a Cartesian world, although not so much if everything is spinning around anyways. One other disadvantage is that if you place the rotator outside of the playing field, you have to be careful when moving and rotating the core that you keep it out of sight at all times.
Straight Lines: Three Time's a Charm
So there was giong to be a third segment to this article, but I can't seem to make any sense of the trig I compiled to figure what it actually means anymore tonite. I did, however, know exactly how it worked when I wrote it down. Sometimes I hate getting old. If I figure it out, I will post it here.
Please discuss anything about this post here. Share some things that worked for you, or ideas you might have on making this actually work a bit better. And if you have an idea for the next episode of Pushing the Limits, let me know. I'd be happy to figure it out.