How would I have a moving level independent from characters in a shmup?

Bit of a general question, but for my portfolio I’ve decided to make something relatively simple to prove I can finish a game specifically in Unreal beyond the prototypes and university work I’ve made, and yet for some reason this has always stumped me in any engine. The game is only simple, but designed to feature most aspects of Unreal to prove I know my way around the engine.

I wanted to make a shmup featuring a handful of enemies, using AI, animations, shaders, blueprints, etc. But I’ve found myself stumped when it comes to scrolling the level. I want the level to have physical terrain rather than simply a background, but I’m not sure how to give the illusion of the player moving through this terrain, WHILE also being able to move up down left and right independently within the confines of the screen.

I know this is a bit of an ironic question giving the nature of the game, but for some reason it’s always stumped me! Doesn’t matter the engine or language, I never know what black magic they use to make it work, and pull off the illusion well.
An example of what I’m after:

1 Like

Hey there @Jole_C! So much of the 3D backgrounds you see in the in games like this is actually just a 2D plane with parallax and shader tricks like World Position Offset. The actual playspace of the player is not moving at all usually. The player is actually completely stationary aside from the relative movement in frame and the enemies and other actually interactable objects spawn slightly off screen where they need to be and follow preset movement patterns on the board.

Thanks, I know it’s a very simple question but for some reason I haven’t been able to wrap my head around how they pull it off.

My current idea is to parent the player ship to the camera, and have the level, enemies and bullets move downwards. They will have a global variable to control the speed, plus their own offset.

You’ve got it! Best to have the player ship stay within a frame and have the enemies/scene spawn and come down to you. This avoids any floating point precision issues for massive levels, no locational movement number bloat, and you can make ship relative abilities much cleaner.

Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.

Found a mostly solid example if you’d like it:

1 Like