
To create our background scrolling script head back into your assets folder and create a new folder called scripts. I have a tutorial on background parallax effects here: You could make this a parallax effect as well if you like by scrolling at different speeds. Great so now we can start with our background scrolling script. Then on the right hand side you want to make sure that you have checked the repeat option and clicked apply.
Unity create time palette code#
So one more thing which you need to configure before we jump into the code for the scrolling background.Ĭlick on the background in your assets folder. If you did this correctly you should see that unity created a new material folder automatically as well as see your background in the materials slot like this. Unity 2d flappy bird tutorial – infinite scrolling background This will create a new background material.

You now want to drag and drop the background image on top of the quad in the scene view.

Resize the quad up to be the size of the unity camera view like so. So in order to do that lets start off with creating a quad.įor that right click in the hierarchy and create a quad like below. This will allow us to have the feeling of an infinite level this is great for the hyper casual game style which flappy bird falls into. Let’s now start off with the easiest part first and that is to create a scrolling infinite background. Unity 2d flappy bird: infinite scrolling background So for that in ours assets folder I have created a few folders, Background, Sprites,SpriteSheets like below. To start off we want to organize our project so that it is more clean and easy to work with.

I created a basic background and some pipes as well for our player to swim over. If you want to get hold of a copy of these images please download the source code for this project here. I created some basic sprite sheets for our fish in inkscape. Start off by creating a new unity project called Unity 2d flappy bird tutorial. See below example of what we will be building in this flappy bird unity tutorial.įlappy bird assets and sprites are available for download at the bottom of this post. We will rename our game to flappy fish which will be similar in style to flappy bird. Then in this unity 2d flappy bird tutorial we will be building a flappy bird clone using the unity game engine from scratch.
Unity create time palette how to#
If you have ever wondered how to make a flappy bird 2d game in unity.
