Search Unity

  1. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  2. Unity 2017.1 is now released.
    Dismiss Notice
  3. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  4. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  5. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice

Endless Runner Sample Game Q&A

Discussion in 'Community Learning & Teaching' started by Aurore, Aug 15, 2017.

  1. Aurore

    Aurore

    Producer Unity Technologies

    Joined:
    Aug 1, 2012
    Posts:
    3,081
    This is the official thread for discussion, issues and Q&A for the Endless Runner Sample Game (Trash Dash)

    Please use this thread if you have any questions, issues or feedback on this project.

    This is a project we have released on the Asset Store

    We also have a user guide in the Instructions of the project, as well as on our Learn Site



    We have also released this full game on the Google Play & App Store with all the proceeds of the game going to Game Changer charity.
     
    Last edited: Aug 15, 2017
    Kasaie and Mauri like this.
  2. f1b0n4cc1

    f1b0n4cc1

    Joined:
    Aug 27, 2015
    Posts:
    37
    Thanks for this project, it will help many game developers to improve their skills on Unity
     
  3. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    100
    Thanks for the project. I've only had a quick look, but the way some of the assets work confuses me. There's a red bin and a blue bin which share the same material and texture with no colour information. What is this voodoo?
     
  4. hellobard

    hellobard

    Joined:
    Sep 26, 2012
    Posts:
    92
    Thanks for sharing this project, very interesting to see how a game like this is made.
    One question though, if I change the name of the asset bundle (Cat) from Trash Cat to anything else, the game loads but without the cat and throws and tells the object I want to instantiate is null. Where is the reference in the code for the name Trash Cat and how can I avoid this?
     
  5. UnityGuillaume

    UnityGuillaume

    Unity Technologies

    Joined:
    Mar 16, 2015
    Posts:
    99
    Lots of objects in the project use vertex color (painted in the 3D software like maya/3ds/blender) to cut down on textures size (and because they all started as using only vertex color and some had textures added later when there was a need for more details).

    If you find the mesh (e.g. search for WheelyBinBody) you can see on the preview at the bottom the inspector that the mesh have uv and colors information per vertex.

    The shader (CurvedCode.cginc) then multiply the vertex color by the texture color (which is greyscale) allowing for varaition in tint across the mesh.

    To keep thing relatively simple, the game use the character name as the key saved in the save file to know which character is owned & used (to be more robust we could build some kind of unique ID system per character so you can change the name and retain the character, but that is left as an exercise to the reader :p)

    When the game create a savefile, it grant ownership of Trash Cat by default. So the game will try to instantiate the character called Trash Cat and will fail if it don't find it.

    To modify that, look for the PlayerData.cs script, and for the function NewSave() in that script. You will see there that we add to the character list Trash Cat (and to the theme list Day). You can change that to the name of your new character here so it work.

    *Note*: after modifying the script, you will need to Clear the save file (either through the Trash Dash Debug menu in the editor or in game, in the settings popup with the Delete Data button) so that the game regenerate a new one with the proper character added to the player save.
     
    Kasaie, theANMATOR2b and Shizola like this.
  6. hellobard

    hellobard

    Joined:
    Sep 26, 2012
    Posts:
    92
    Thank you for the reply!
    That was easy enough, interesting to see how you handled that part of the game.

    Also, I'm trying to find how the pickups are being distributed on the track, but I can't seem to find where that's being done in the code?
     
  7. UnityGuillaume

    UnityGuillaume

    Unity Technologies

    Joined:
    Mar 16, 2015
    Posts:
    99
    If you look in TrackManager.cs, there is a function called SpawnCoinAndPowerup() that take care of spawning the "coins" (here the fishbones), premium currency and powerup. It will pick a purcentage of chance that a powerup will be spawn instead of a "coin" (that purcentage grow with time, so that after a while we are sure to spawn one).
     
  8. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    100
    Can I ask how long it took you to make this project and how many people were involved?
     
  9. UnityGuillaume

    UnityGuillaume

    Unity Technologies

    Joined:
    Mar 16, 2015
    Posts:
    99
    For the time it took, it is a bit hard to tell precisly because it was made in parallel with other thing, But I would reckon that combined, it was roughly 6 month of works from start of the project to release on store.

    As for the team, "full time" : one producer, one artist & one programmer.

    We had an animator who worked a couple of week for the animations and a contractor for sounds/music.

    Finally some "external" QA (i.e. not done by the full time team :D) was done at the end of the project before submitting on the stores by an additional person.
     
  10. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    100
    Thanks Guillaume, this type of information is always useful to me.
     
  11. parag1

    parag1

    Joined:
    Jun 14, 2017
    Posts:
    1
    Thanks for the project.I want to change cat character.Can you help me ?