Making an endless runner game in Unity like Subway Surfers in just 90-120 min.
first create a new project and download assets from given links
Now we have to design the Environment you can any type of you want i am creating a simple one just follow steps-
Note- scrips download link download
models download link download
PART-1 Creating Environment.
You can use any asset in designing.
Now we have to design the Evironment you can use any type of you want i am creating a simple one just follow steps-
1. Go to assets/import package/environment
2. Now Go to gameobject and create cube with scale of x=5.5,y=0.01,z=70 rename it as a ground.
3. Now create a 2 cube with scale x=2,y=0.5,z=70 place it as border of ground.
4. Now you create environment by puting trees and some buildings or anything that you want.
5. Put all these in an empty with name of widestraightpath.
5. This whole procedure will take around 15 min.
6. Now your scene will be look like this.
PART-2 Making Character.
You can make your own character or dowload mine that link is given in top of tutorial.
1. Create a gameobject rename it as player.
2. Put your character in player also put the main camera in it just after the character.
3. Add script "arrow key detecter" and "character sideway movement" to player.
4. Go to character folder in zip file that you downloaded there will be a CharacterAnimator add it to your character.
5. Create an empty add script Gamemanager to it.
6. Create another empty select it go to component/event and add event system also add standalone input manager from component/event.
7. Now click on play button to test it.
8. your app will be ow look like this.
PART-3 Creating collectables and obstacles and make all things Infinte.
They are present in zip file or you can use own stuff
1. Create some cube around 30 and put them in series.
2. Create a empty rename it as StuffSpawn add StuffSpawner scriptPat to it.
3. Make sure your not have any mesh,box collider,mesh renderer.
4. Go to stuff spawn click on Stuff spawn points change it size to no. of cubes that you created ad put all one by one in elements.
5. Click on bonus in StuffSpawn change size=4 and put all candy in it.
6. Click on obstacles in StuffSpawn chage size=2 and puth both obstacles.
7. Put StuffSpawn in WideStraightPath.
8. Create a cube of width that it cover your ground and y=10 rename it Path spawn collider also add script of same name make sure it not have any mesh.
9. Create a cube in end of path and rename it NewPathSpawn put it in an empty of name SpwanGOs.
10. Put Pathspawncollider and Newpathspawn in Widestraightpath.
11. Go to Pathspawnn collider click on path spawn collider position y=0.81, element 0=NewPathSpawn, Path=WideStraightPath.
12. Click save and your Game is ready.
You can now test it and play it.
My final game looks like this.
please comment for questions
first create a new project and download assets from given links
Note- scrips download link download
models download link download
PART-1 Creating Environment.
You can use any asset in designing.
Now we have to design the Evironment you can use any type of you want i am creating a simple one just follow steps-
1. Go to assets/import package/environment
2. Now Go to gameobject and create cube with scale of x=5.5,y=0.01,z=70 rename it as a ground.
3. Now create a 2 cube with scale x=2,y=0.5,z=70 place it as border of ground.
4. Now you create environment by puting trees and some buildings or anything that you want.
5. Put all these in an empty with name of widestraightpath.
5. This whole procedure will take around 15 min.
6. Now your scene will be look like this.
PART-2 Making Character.
You can make your own character or dowload mine that link is given in top of tutorial.
1. Create a gameobject rename it as player.
2. Put your character in player also put the main camera in it just after the character.
3. Add script "arrow key detecter" and "character sideway movement" to player.
4. Go to character folder in zip file that you downloaded there will be a CharacterAnimator add it to your character.
5. Create an empty add script Gamemanager to it.
6. Create another empty select it go to component/event and add event system also add standalone input manager from component/event.
7. Now click on play button to test it.
8. your app will be ow look like this.
PART-3 Creating collectables and obstacles and make all things Infinte.
They are present in zip file or you can use own stuff
1. Create some cube around 30 and put them in series.
2. Create a empty rename it as StuffSpawn add StuffSpawner scriptPat to it.
3. Make sure your not have any mesh,box collider,mesh renderer.
4. Go to stuff spawn click on Stuff spawn points change it size to no. of cubes that you created ad put all one by one in elements.
5. Click on bonus in StuffSpawn change size=4 and put all candy in it.
6. Click on obstacles in StuffSpawn chage size=2 and puth both obstacles.
7. Put StuffSpawn in WideStraightPath.
8. Create a cube of width that it cover your ground and y=10 rename it Path spawn collider also add script of same name make sure it not have any mesh.
9. Create a cube in end of path and rename it NewPathSpawn put it in an empty of name SpwanGOs.
10. Put Pathspawncollider and Newpathspawn in Widestraightpath.
11. Go to Pathspawnn collider click on path spawn collider position y=0.81, element 0=NewPathSpawn, Path=WideStraightPath.
12. Click save and your Game is ready.
You can now test it and play it.
My final game looks like this.
please comment for questions