I’m at a point where I can actually start making a playable level but am a bit lost when it comes to placing enemies in my level. So what I have is a camera that moves forward and my player ship stays within that camera boundary like R-Type or Gradius.
Do I set these objects up on timer and then figure out when when I’ll reach them and then spawn them off camera? What about triggers, can I just put triggers that the camera will touch and then instantiate them? Are there better ways?
Oh dang, that sounds super dope!
Setting and instantiated the enemy objects outside of the camera sounds good! Once they reach past a certain point behind your camera object they can be destroyed to safe space.
Triggers sounds like a great idea for instantiating enemy objects. Just attached a trigger collider and you can plan on from there!
A scene manager which takes the most right coordinates of your moving camera, and add a couple of pixel (so they can instantiate outside player eyes), instantiate any enemy objects (maybe a quick coordinate randomizer within the differences between the camera object and the allocated space). A timer would most likely be a good idea on the rate of spawning enemies.
The timer is the way I am going. Just got a test script working that spawns a single object after so many seconds then destroys the spawn point a second later. Thanks for the idea!
Happy to help!
Now that I think about it, you’re right - timer would probably be a better idea. A trigger just might make the game a little predictable…