Sorry, I have never played Temple Run. But if you do that tutorial and if you just change the camera angle and add sideways movement then you should have great a blueprint/prototype for a 3D runner to build on.
I don't have a tutorial but I can give a high level overview of how you would design it. When created a game that includes procedurally generated content one of the biggest questions that you have to ask yourself is how do you decide what content to generate. In the case of an infinite runner similar to temple run, it is a little bit easier in that you are just deciding what prefabs to spawn versus creating the mesh/textures procedurally. Now, to spawn those prefabs you could do something as simple as taking the prefab that has the highest Random.value value. However, with that approach you aren't going to have any order in which your prefabs spawn. You could then make it more complex and have prefabs spawn based on the location within the game or based on other previous prefabs that have already spawned. Going along with deciding what prefab to spawn, you also have to decide where to spawn the prefab as UNITY3D_TEAM alluded to. In the case of an infinite runner like temple runner it is pretty easy in that the next prefab should spawn right after the previous prefab (no need to use Random.Range in that case). Once you figure out how to spawn all of the objects, you will then need to consider what happens if a player is really, really good at the game. Vector3 uses three floats for the position. If the player is very, very out in the distance because they have been running a lot, you'll start to run into precision errors with the locations of the objects that are being spawned. When these precision errors begin you won't really notice anything (who really cares if one prefab overlaps another by 0.01m?), but as the player continues to run out into the distance these precision errors will become more and more noticeable (you'll definitely see the error when the next platform is 100m away from the one that you are running on). With all that said, the simplest way to solve this issue is to have the player stay in the same position and all of the other objects do the moving. I consider those two concepts the basics of a game within the infinite runner genre. Once you solve those issues you can then add the fun stuff: obstacles, coins, power ups, different characters, a store, etc. All of those features aren't specific to the infinite runner genre and there are probably plenty of tutorials (or code snippets) on how to implement them. Hopefully that will give you a quick overview on how to create an infinite runner similar to temple runner. That said, I've solved all of these issues in a starter pack that I've listed on the asset store at https://www.assetstore.unity3d.com/#/content/8949.
The best thing to do when approaching a big task like this is to just break it up and do one "objective" at a time. Opsive gave an awesome overview of the general approach now you just need to figure out implementation. Start with the bare bones functionality. Create a cube prefab and make it move toward your player. then write a script that will keep generating new cubes as the previous cube moves forward. BOOM you have the basic functionality of an endless runner. After that you just keep adding functionalities like... Allowing your player to jump moving side to side turning powerups just take it one small bite at a time and before you know it you have a full game
Hey, Thanx a lot for the solution... Can you please mention the C# code to generate prefabes and add those prefabs as they passes? It will a great help for me. Thanx in advance!!!
Sounds like you need to do some more generalized tutorials to get yourself used to programming before you attempt a custom game.
Hi all, I have just started writing tutorials for endless runner game. you can find the tutorials on http://unitygamedevtuts.blogspot.com/. I will be updating the blog regularly. There you can ask related or general questions regarding Unity3d. Thanks
Hi ! @TheValar I have created the main endless track .. but one thing i am not getting... i have made a road which works like in a circular link.. 1st end 2nd start , 2nd end the first comes in front of first... but when i add houses or trees around that road the game stuck a little in instantiating and removing process of the road... if i just add road it works fine but if i add houses besides the road it take a jerk ...
1.Store gameobject data in object space and use it runtime in worldspace. 2.Use random class and other logic 3.Use object polling. 4.Do the transform check for overflow and adjust it properly.
Or keep the player's forward motion static and instead move the platforms themselves and make use of object pooling. Unless you're on a ridiculously tight memory budget, this would probably be more efficient.
Here's a complete tutorial series on endless runner tutorial http://www.thegamecontriver.com/p/your-own-subway.html