Search Unity

  1. We want you to join us at GDC this year! Take a peek at all of the events we will be hosting during the week of GDC.
    Dismiss Notice
  2. Tell us about your experience here and you’ll get early access to the 2018 Game Studios report + more goodies.
    Dismiss Notice
  3. Unity 2017.3 has arrived! Read about it here.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  5. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    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:
    21,138
    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,873
    I think it's those made-up physics he's asking about. ;)
     
    hippocoder likes this.
  4. brianasu

    brianasu

    Joined:
    Mar 9, 2010
    Posts:
    367
    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:
    598
    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:
    37
    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(); }