Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Traffic Racer (3D Endless Racing) for iOS

Discussion in 'Made With Unity' started by rextr09, Sep 26, 2012.

  1. refsus

    refsus

    Joined:
    Oct 23, 2012
    Posts:
    6
    hi rextr09, what about the animation of the car? can you explain that?how many animation you use for the car?and how you play it?
     
  2. rextr09

    rextr09

    Joined:
    Dec 22, 2011
    Posts:
    416
    Haha, too bad it's the slowest car in the game :)
     
  3. rextr09

    rextr09

    Joined:
    Dec 22, 2011
    Posts:
    416
    There is no actual animation in the car model. I animate them manually with script.
     
  4. stuartb

    stuartb

    Joined:
    Aug 19, 2013
    Posts:
    21
    Awesome game. I love it!
     
  5. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    I would figure on the actual model you could do smooth animations for body roll and sway without interfering with with a rigidbody elsewhere in the hierarchy. Smooth lerping between a still state and a state that is rotated a bit. By the way, the game is awesome!
     
  6. Gooseman_1977

    Gooseman_1977

    Joined:
    Aug 15, 2013
    Posts:
    89
    Any plans on making an Android version?
     
  7. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
  8. Gooseman_1977

    Gooseman_1977

    Joined:
    Aug 15, 2013
    Posts:
    89
    oh snap, thanks.. gonna go check that out now :)
     
  9. Imtiaj-Ahmed

    Imtiaj-Ahmed

    Joined:
    Apr 15, 2014
    Posts:
    1
    Hi rextr09. I just wonder about the smoothness of the game. It's amazing! I am having trouble to get the smoothness on mobile devices. But not even closer I get. Jerks now and then. Searched all the forum, applied lot of tweaks, optimizations, everything I get new, I tried. I know you have been through this earlier ;). Why is your game so smooth? I am jealous :D.
     
  10. Daviddunn92

    Daviddunn92

    Joined:
    Mar 14, 2014
    Posts:
    35
  11. idurvesh

    idurvesh

    Joined:
    Jun 9, 2014
    Posts:
    495
    Could you share how you added dynamic shadows over car?

     
    YagirX likes this.
  12. idurvesh

    idurvesh

    Joined:
    Jun 9, 2014
    Posts:
    495
    JamesArndt likes this.
  13. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    There a few solutions to accomplish the effect. The camera being a fixed distance and angle is the key to making this easier to do. All you have to do is think about how you can darken only certain areas between the vehicle and the camera. My first thought was the use of projectors, and then I realize that if this is on mobile it might be a bit expensive to use projectors. The other option is the use of light cookies, but again, real time lights may or may not be expensive on mobile platforms (depending on how their used). Projectors or lights could be literally pooled with a pooling manager, or just culled in, and culled out, using the same light set over and over. I think one the simplest solutions to this is simply having a quad plane with a nice alpha shadow texture on it and placing those in the world where the dark spots are (no streetlight illuminating that spot). This will work in this instance because of the camera always being the same distance and position away from the vehicle. On a past NFS game for the Nintendo DS we used a simple trick, and that was to adjust the brightness of a texture based on driving through trigger volumes. We would place these triggers under light sources, and when a car drove under it, the paint got brighter. This was a simple trick that worked on an extremely performance-limited platform.
     
    idurvesh likes this.
  14. idurvesh

    idurvesh

    Joined:
    Jun 9, 2014
    Posts:
    495
    Hmm thank you for insights and sharing your experience....Isn't changing material brghtness would change it for complete model?

    In above video look at 39th second...There you will see that only front half of white truck is lighten whereas back side is dark...On 47th second you will see yellow mini bus in only lighten from up side and down is dark.......
     
    JamesArndt likes this.
  15. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Well in our case on the Nintendo DS, the edge of these triggers had a bit of falloff in the code that allowed the brightness to gradually come into effect (a falloff ramp texture)...this was also the DS we're talking about so visual FX were not anything close to a modern smartphone.

    As for this video, looks like the alpha shadow texture technique would accomplish this effect, by only shadowing the spots that are underneath the shadow area. It's pretty much the same thing as a projector, just less intensive. You shouldn't incur too much in the way of overdraw if you keep your shadow areas reasonably sized. I'm sure a more experienced programmer could chime in here and let us know if there is some trick that could be done with the stencil buffer?
     
    idurvesh likes this.
  16. idurvesh

    idurvesh

    Joined:
    Jun 9, 2014
    Posts:
    495
    I will look into alpha shadow texture technique....The game seems to be released before Unity 5..One thought I just had is.....its quite possible that they have baked light probes to prefabs? I am sure before Unity 5 prefab lightmaps were naively supported so they might have used that technique? ...
     
    JamesArndt likes this.
  17. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Yeah Traffic Racer was out before Unity 5, so not sure what technique was used. The levels are extremely long, almost feel indefinite, so I am not convinced that it's baked light probes, but I really have no clue. Now I'm wishing the developer would chime in and clear up the mystery for us all :)
     
  18. GhulamJewel

    GhulamJewel

    Joined:
    May 23, 2014
    Posts:
    351
    I see you have two insanely successful games. Any advice on how you marketed the game to get those insane download figures?
     
    JamesArndt likes this.
  19. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Oh we might not have a chance of seeing the developer in here...checked his profile to see this --->
    "rextr09 was last seen Oct 19, 2015"
     
    idurvesh likes this.
  20. idurvesh

    idurvesh

    Joined:
    Jun 9, 2014
    Posts:
    495
    Indeed ...I tried to add light probes and its working quite good for static environment..
    ...

    Now trying to bake light probes to prefab using this API http://docs.unity3d.com/ScriptReference/LightmapSettings-lightProbes.html to dynamically spawn... ..But find no sample code...Can you please check in it too?
     
    JamesArndt likes this.
  21. GhulamJewel

    GhulamJewel

    Joined:
    May 23, 2014
    Posts:
    351
    Guess enjoying his new found fortune
     
    idurvesh and JamesArndt like this.
  22. rextr09

    rextr09

    Joined:
    Dec 22, 2011
    Posts:
    416
    Hi, there is no shadow in the night scene of traffic racer. The darkened areas come from the low brightness of the scene. The light areas come from the point lights. If this was a day scene, you were right. You would need some other kind of techniques. However, in this case you just need a low brigtness scene and let the point lights do the rest.
     
    lightali, JamesArndt and idurvesh like this.
  23. idurvesh

    idurvesh

    Joined:
    Jun 9, 2014
    Posts:
    495
    Wow,Thank you so much for coming back and answering...We appreciate it....

    Would you also mind sharing which shader you used for grounds in Traffic Rider? I am getting this blurry headlight(using spotlight) when player speed increases,


    If I use standard shaders then that blurriness goes though it affects performance..So it must be problem with shaders...or you used completely diffrent technique for headlight effect?...

    BTW Congratulations of success...Kudos...keep it up
     
  24. Ehsan-Malik

    Ehsan-Malik

    Joined:
    May 12, 2017
    Posts:
    1
    i want my Player car to move like (only forward) the traffic racer game exactly same can anyone guide me i am currently use Rcc V3 and disable its reverse button but that is not similar to traffic racer
     
  25. MattDiamond

    MattDiamond

    Joined:
    Jul 4, 2017
    Posts:
    3
    Hi. Great game Traffic Racer!!! Could you share how do you made the lighting and how the cars have so smooth borders? I am making a game, an endless game, and the cars have so ugly borders.... Aren't so smooth...
     
  26. minta2

    minta2

    Joined:
    Jul 24, 2017
    Posts:
    16
    Traffic Racer looks so cool!
     
  27. CarrieFischer

    CarrieFischer

    Joined:
    Aug 6, 2023
    Posts:
    1
    "Fantastic article! The review of 'Traffic Racer 3D' on iOS was spot-on, providing in-depth insights into the game's endless racing experience. The author's analysis of its stunning graphics, smooth controls, and addictive gameplay was informative. For more gaming updates, I highly recommend visiting UPDATEWAVE.COM Kudos to the author for a well-written and engaging piece!"
     
  28. YagirX

    YagirX

    Joined:
    Jan 16, 2016
    Posts:
    15
    Traffic Racer 3D - legendary game! Thanks for childhood :)