Search Unity

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:
    2
    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

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    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,887
    I think it's those made-up physics he's asking about. ;)
     
    hippocoder likes this.
  4. brianasu

    brianasu

    Joined:
    Mar 9, 2010
    Posts:
    369
    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:
    2,076
    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.
     
    Joe-Censored likes this.
  6. fetish

    fetish

    Joined:
    Aug 25, 2015
    Posts:
    73
    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:
    501
    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:
    92
    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)
     
  9. Dennis_eA

    Dennis_eA

    Joined:
    Jan 17, 2011
    Posts:
    380
    a modern similar take on that fake-physics topic could be ThumbDrift (mobile).
    I don't think they used any physic-engine (physx) at all

    It's really simple as long as everything is happening on (just) a 2D-plane (Daytona USA)
    Making the car go up and down can than be another layer (raycast down or simply by checking the position)
     
  10. nitrofurano

    nitrofurano

    Joined:
    Jun 7, 2019
    Posts:
    92
    Daytona USA, and even Virtua Racing, are not 2d-plane - the easiest circuit from Daytona USA 1 have inclined curves (for "centrifugal force"), and the middle and hardest circuits has ups and downs (like before crossing the bridge) - the same happening on Virtua Racing - anyway, i think that is not that hard to implement avoiding physx - just analyze them carefully, from seeing videos (like from youtube), or playing them - from Daytona USA 2, i think all circuits has ups and downs
     
  11. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,076
    I currently play Daytona Usa on the dreamcast/reicast emulator.
    And after playing it so many times, I have always had this strange suspicion, that sega didn't use much physics, in that game. I think most of the car and road physics, is hard coded. And even though I am not an expert coder, I myself believe, that the daytona physics, is probably not that hard to implement or code, for a racing game.
     
    Last edited: Sep 1, 2019
    nitrofurano likes this.
  12. Deleted User

    Deleted User

    Guest

    Ah yes. That was a childhood favorite of my pal and mine. We never really raced properly. We just turned about and tried to create the biggest baddest carnage we could! It was great fun, haha!
     
  13. DBarlok

    DBarlok

    Joined:
    Apr 24, 2013
    Posts:
    268
    You're correct.
     
    nitrofurano likes this.