Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

How do Sega Daytona USA physics work?

Discussion in 'Game Design' started by qopsinonstudios2, Sep 3, 2017.

  1. qopsinonstudios2

    qopsinonstudios2

    Joined:
    Dec 9, 2014
    Posts:
    1
    Hello everybody, I have a question that maybe someone will help me to find out the answer.
    I wanna design a racing game like Sega Daytona USA, with the same physics style, but I don't know how to recreate that kind of physics. Unity offers vehicle physics that are more realistics than this old arcade, but I want the old arcade style.

    Here's an example video:


    Thanks in advance.

    Regards,
    Julio.
     
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,334
    Probably uses a single 'raycast' down to grab a decent normal and then does some classic made-up arcade physics with the result.
     
  3. HolBol

    HolBol

    Joined:
    Feb 9, 2010
    Posts:
    2,886
    I think it's those made-up physics he's asking about. ;)
     
    hippocoder likes this.
  4. brianasu

    brianasu

    Joined:
    Mar 9, 2010
    Posts:
    368
    I remember some old handheld racing games did all there calculation based on the spline of the road. If you have that you can position any car based on a time T of the curve + some horizontal offset.
     
    hippocoder likes this.
  5. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    1,151
    Wow! Talk about coincidence.
    I was playing Daytona for the last 2 weeks on dreamcast. Fun game.
    And I will admit, the car physics in that game, is rather interesting.
    When one car hits another from behind, or to the side, they sometimes
    bounce ahead or away, or pitch far forward ahead of you.

    For a semi-realistic, yet cool arcadey game like this:
    I think the best thing to do, would be to make your own, simple physics code.
    It might take some time, to make it. But it'll be worth it in the end.
     
  6. fetish

    fetish

    Joined:
    Aug 25, 2015
    Posts:
    54
    The basic concept is that is that your turning radius is proportional to your speed - if you're trying to turn more than your current speed will allow, you skid or spin out.

    I might do something like normalize your steering input from -90 to 90 (this number should always drift back towards 0, by the way); then have a formula which says the maximum rate at which a vehicle can turn in a given time frame. (expressed in the number of degrees/sec, for example)

    All these numbers are arbitrary, but I imagine something like

    MaxSteeringAngle = 90 / Velocity.

    Then compare the attempted steering angle to the max steering angle; something basic like float x = AttemptedSteeringAngle / MaxSteeringAngle; then do something like:

    if(X > 0) { car.Decelerate(AttemptedSteeringAngle * DecelerationFactor); }

    If(X <= 1) { car.Rotate(AttemptedSteeringAngle * time.DeltaTime); }
    else if(X > 1 && X < 1.5) { car.Skid() }
    else if(X >= 1.5) { car.SpinOut(); }
     
  7. MathewHI

    MathewHI

    Joined:
    Mar 29, 2016
    Posts:
    106
    Hey Fetish thanks for the response, don't know what your situation is but any chance you'd be interested in collaborating on a game of this style? I'm actually trying to do a game with Daytona handling but I think the wheel colliders are not the best solution. Let me know if interested maybe we can work something out.
    Thanks Matt
     
  8. nitrofurano

    nitrofurano

    Joined:
    Jun 7, 2019
    Posts:
    46
    i'm afraid to think that physics (as the physics from Unity) are totally ignored in whatever Daytona USA version, even on all Virtua Racing ports (i think that both Daytona USA and Virtua Racing work in a very similar way ) - perhaps it uses some kind of calculations or animation arrays - perhaps the best approach for starting is totally forget that physics, solidbody and colliders even existed in Unity - but i might be totally wrong (perhaps we will only know for sure when the game would be totally disassembled for research purposes, or far better, when Sega would release the whole source code of the game)