Playing Around With Quads And Repeating Textures

I’m working on a new endless runner example in Unity. Going for as simple of an engine as possible. The solution is to use quads for the foreground and background with repeating textures:


I created a little script that will take the quad and stretch it out to fill the screen and I can also control if it repeats horizontally or vertically which is how I did the floor.

Ember 2

Then I have another script which manages the speed at which I scroll the texture’s offset so it looks like the background is moving. I can also set the speed of the background and foreground to get a parallax scrolling effect like this:


With only a few lines of code and primitive 3d objects I’m able to achieve some impressive results!

Subscribe To My Mailing List

Want to learn how to make a game? Not sure where to start? Even if you are a seasoned game maker there is still a lot you can learn from my mailing list. I'll be covering tips and tricks for how to build, release and market games each month.

Simply sign up for my mailing list and also get access to a 50% off discount code for my eBooks and other content. I promise to not spam your inbox!

Join Now