What's the best way to have the enemies come in? Is it best to have the whole level layed out in front of the player say like 5,000 pixels tall and you are actually moving forward or is it better to create some kind of animation that makes it look like the player is moving forward and then have all the enemies set up in patterns that are activated by scrolling actives you collide with or by some kind of timer event?
Also if possible anyone have any examples of making Shmups?
For customisation purposes I'd say have the level with backgrounds all laid out. Have enemies spawn from triggers though, say have one trigger on a timer that creates an enemy that behaves in a certain way every second or so until it has deployed around 10 of them. And have another trigger that creates a few, but tougher enemies from a spot on another occasion.
OR
Run it all off a counter and script.
100= Create X enemie, 10, random position
200= Create Y enemie, 1, central position (etc)
This way you could have boss/guardian enemies that pause the counter until they're destroyed.
If the screen size is over 640x480 I'd definitely use the timer method, just because older computers will struggle to scroll larger screens smoothly.
Otherwise, you can get away with mapping out the whole level, which is probably going to be easier.
Custom Sine wave?
Thats easy... Add a value to the object you want to have the movement, call it "dir360" or something.
then insert
Always ---> add 10(lower or higher) to dir360
Always ---> set Object Xposition(or Yposition) to ObjectsDesiredXposition(or Yposition) pluss Sin(dir360)*10(you don't need to use 10, this value will amplify the th sin Wave movement, higher number makes bigger wave)
so it's
Always ---> add 10 to dir360
Always ---> set Object Xposition to ObjectsDesiredXposition pluss Sin(dir360)*10
You can play around with it and see what suites you, its realy easy. You can change Sin to Cos to get somethign slightly different.
Whoa it worked!! That's awesome(i'm so simple minded) Any other cool tricks like that?
(edit) While it does do the sine movement it seemed to favor going left. Is that because it's always adding 10? Would subtracting 10 make it favor the right?
Always ---> add 10 to dir360
Always ---> set Object Xposition to ObjectsDesiredXposition pluss Sin(dir360)*10
you used the objects Xposition, in here ^^^^^^^^^^^^
Since the Sine movement changes objects position, well, it changes position.
What you would want to do is give the object two new values Xposition_ and Yposition_ (set values to other than +0)
Now if you want to move the object, you will have to do so by changing theese values, wich might be a small bugger if your not used to it.
then change
Always ---> set Object Xposition to Xposition_
alternatively you could change ^^^^^^ to any other objects X/ Yposition, or X/ Y position on screen, its just because you use the X position of the object that uses the Sine Wave that it moves to the left.
And the *10 at the end, the larger this number, the larger/ wider movement of the 'wave'. Set it to 1 and almost no movement will happen
ANd not to sound like a math freak or anything, but just play around with the numbers, experiment with Sin and Cos and you will stumble uppon lots mad stuff. For starters try;
give the object two new values Xposition_ and Yposition_ (set values to other than +0)
Always ---> add 10 to dir360
Always ---> set Object Xposition to Xposition_ pluss Sin(dir360)*10
Always ---> set Object Yposition to Yposition_ minus Sin(dir360)*10