I’m going to develop a shot em up game like Gradius (horizontal scrolling).
For the levels, instead of moving the space ship, I’m going to move the level, spawning the actors which are going to appear on the right of the screen, and destroy them when they disappear. But I don’t know how to do it.
I have thought to have some kind of data structure with the actors, and a counter (or something similar). With this counter I will access the data structure and I get the actors to spawn. And also, another counter to destroy them.
Another option is level streaming.
Are there other options to do it? Or, what do you recommend me?
Yes…why not just move the camera?
Your ship actor can have the camera included.
The camera always moves to the right.
The ship is attached to the camera so if you don’t do anything your ship will move with the camera and stay fixed in the screen.
You can clamp the horizontal location of the ship so you have limits in the screen you can’t surpass.
you can put two box colliders in the same camera/ship actor: one is in front, outside the camera view (far right side) that ACTIVATES the other actors (enemies/powerups/whatever
other box collider behind, outside the camera view too that will destroy the elements left behind.
For scrolling you move the whole ship/camera/colliders actor.
yes…The concept is to have a Ship actor that moves to the right,the ship holds two colliders to enable the enemies in the stage…enemies are standing in the level and are enabled when the starter collider hits and then when ships hit the end collider then they are destroyied because they are left behind
thank you for your explanaition. I am trying to build the same logic, but some things have changed in UE 5.2. I don’t get the scrolling movement to work with the new enhanced input system and there seems to be a new mechanism for the clamping.
If you find it in your heart to help again, it would mean so much to me.