Time Pilot — Movement Experiments

Paul Marsh
3 min readMay 6, 2021

--

Time Pilot Movement Experiment

Recap

My challenge is to implement the movement mechanics of Time Pilot, i.e. the player stays central to the screen whilst navigating around the game area. In this specific set of tests I am also using the Pixel Perfect camera components.

Experiment 1 —Camera Follow

In theory this should be a relatively easy mechanism to implement. As the player moves in a specific direction their (x,y) position is altered to reflect that. However, this would mean the player would move away from the central position. So the camera has a script that exactly follows the player, i.e. it will appear as if the player is static in the middle but the world is moving around them. Exactly what we want.

Camera Follow

However, the result is not good. The plane appears to shudder along. If I turn off the Pixel Perfect component it works fine. So the theory is good but if I want to continue with the same components then I need to try something else.

Experiment 2 —Move the Game Area

If I cannot move the camera then I need the whole world to move around the camera. E.g when the player flies in a northerly direction then I need to move the world at the same speed in a southerly direction. The world consists of anything that is not the camera or the player. That includes enemy fighters and clouds.

The player is moving the game area

It feels slightly odd because the player controller is not on the player, it is on the game area itself. But it seems to work. Before I show the example I should talk about the clouds.

Parallax Clouds

The clouds have an additional requirement. They use a form of parallax scrolling. In my example the large clouds appear to be near the player (and the player flies behind them), the middle clouds in the middle distance and finally the small clouds in the far distance.

In this experiment I achieved this by having separate Game Areas for each layer of the parallax and using a Parallax Follow script.

Parallax Game Areas

The script itself is a basic follow-the-transform script with the exception that is has speed modifier. This allows the specific game area to move at a different relative speed.

The final result seem to work well.

Note: this is prototype code, I am not trying to correctly use pooled spawning, etc.

What next?

I could continue to recreate Time Pilot, much like I did with Xevious, but for me the real challenge was cracking the movement mechanics, and I think I have achieved that. Maybe the curiosity of adding a two player dog-fight mode might make me revisit it…hmm…

--

--

Paul Marsh
Paul Marsh

Written by Paul Marsh

Unity, VR, Enterprise and .Net Developer

No responses yet